-
Notifications
You must be signed in to change notification settings - Fork 0
/
HsEntrezGeneQueries.R
168 lines (166 loc) · 3.87 KB
/
HsEntrezGeneQueries.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
source("MongoDBConnection.R")
#' Title
#'
#' @param entrezhsallrecords
#'
#' @return
#' @export
#'
#' @examples
HsEntrezGeneQueries <-
function(entrezhsallrecords) {
# find all entries for Hs tax id
# hstax_id is count of all rows where tax id = 9606
hstax_idcount <- nrow(entrezhsallrecords %>% select({
}))
return (hstax_idcount)
}
#' Title
#'
#' @param homosapiensmongodbconnection
#'
#' @return
#' @export
#'
#' @examples
entrezhsdistinctgeneids <- function(entrezhumangenedataallrecords) {
entrezhumangenedistinctgeneids <-
entrezhumangenedataallrecords %>% select("GeneID", "Symbol")
return (entrezhumangenedistinctgeneids)
}
#' Title
#'
#' @param homosapiensmongodbconnection
#'
#' @return
#' @export
#'
#' @examples
entrezhsallrecords <- function(homosapiensmongodbconnection) {
entrezhumangenedatallrecords <-
homosapiensmongodbconnection$find('{}')
return (entrezhumangenedatallrecords)
}
#' Title
#'
#' @param entrezhumangenedataallrecords
#'
#' @return
#' @export
#'
#' @examples
hsSymbolsSynonymsFeaturetype <-
function(entrezhumangenedataallrecords) {
entrezSymbolSynonymsfeaturetype <-
entrezhumangenedataallrecords %>% select("Symbol", "Synonyms", "Feature_type")
return (entrezSymbolSynonymsfeaturetype)
}
# Count all symbols and display along with gene ids, synonyms and
#' Title
#'
#' @param entrezhumangenedataallrecords
#'
#' @return
#' @export
#'
#' @examples
hsGeneSymbolsFeaturetypes <-
function(entrezhumangenedataallrecords) {
entrezhsGenesWithSymbolsAndFeatureTypes <-
entrezhumangenedataallrecords %>% select("Symbol", "Feature_type")
return(entrezhsGenesWithSymbolsAndFeatureTypes)
}
#' Title
#'
#' @param entrezhumangenedataallrecords
#'
#' @return
#' @export
#'
#' @examples
hsLocusTags <- function(entrezhumangenedataallrecords) {
entrezhsLocusTag <-
unique(entrezhumangenedataallrecords %>% select("LocusTag"))
return (entrezhsLocusTag)
}
#' Title
#'
#' @param homosapiensmongodbconnection
#'
#' @return
#' @export
#'
#' @examples
hsSynonyms <- function(homosapiensmongodbconnection) {
entrezhsSynonyms <-
unique(homosapiensmongodbconnection$distinct("Synonyms"))
return (entrezhsSynonyms)
}
#' Title
#'
#' @param entrezhumangenedataallrecords
#'
#' @return
#' @export
#'
#' @examples
geneSymbolsAnddbCrossRefs <-
function(entrezhumangenedataallrecords) {
entrezhsgenesymbolsanddbXrefs <-
entrezhumangenedataallrecords %>% select("Symbol", "dbXrefs")
return (entrezhsgenesymbolsanddbXrefs)
}
#' Title
#'
#' @param entrezhumangenedataallrecords
#'
#' @return
#' @export
#'
#' @examples
genesymbolandmaplocation <-
function(entrezhumangenedataallrecords) {
entrezhsgenesymbolsandmap_location <-
entrezhumangenedataallrecords %>% select("Symbol", "map_location")
return (entrezhsgenesymbolsandmap_location)
}
#' Title
#'
#' @param entrezhumangenedataallrecords
#'
#' @return
#' @export
#'
#' @examples
extractTypeOfGene <- function(entrezhumangenedataallrecords) {
entrezhstype_of_gene <-
unique(entrezhumangenedataallrecords %>% select("type_of_gene"))
return (entrezhstype_of_gene)
}
#' Title
#'
#' @param entrezhumangenedataallrecords
#'
#' @return
#' @export
#'
#' @examples
extractfeaturetype <- function(entrezhumangenedataallrecords) {
entrezhsfeature_type <-
unique(entrezhumangenedataallrecords %>% select("Feature_type"))
return(entrezhsfeature_type)
}
#' Title
#'
#' @param entrezhumangenedataallrecords
#'
#' @return
#' @export
#'
#' @examples
extractdescriptionfeaturetype <-
function(entrezhumangenedataallrecords) {
entrezgene_description_featuretype <-
entrezhumangenedataallrecords %>% select("Symbol", "description", "Feature_type")
return(entrezgene_description_featuretype)
}