biomaRt * search
1
0
Entering edit mode
Paul Hammer ▴ 220
@paul-hammer-2635
Last seen 10.2 years ago
Dear folks, I try to search for all PDE genes within the biomaRt Ensembl database. I am looking for a simple code for searching with the * symbol like under linux (e.g. grep function). here my imaginary, not working code: library(biomaRt) ensembl = useMart("ensembl", dataset = "hsapiens_gene_ensembl") PDE_infos = getBM(attributes = c("hgnc_symbol", "ensembl_gene_id"), filters = "hgnc_symbol", values = "*PDE*", mart = ensembl) Is there any easy way to do such a * search? I mean I could first download all genes and then I could filter via regular expression for PDE genes. But I guess there is a way to use * in R or? Thanks, Paul
biomaRt biomaRt • 1.3k views
ADD COMMENT
1
Entering edit mode
@steffenstatberkeleyedu-2907
Last seen 10.2 years ago
Hi Paul, The * symbol is not usable in your biomaRt query. But you could do the following: library(biomaRt) ensembl = useMart("ensembl", dataset = "hsapiens_gene_ensembl") hgnc=getBM(attributes = c("hgnc_symbol", "ensembl_gene_id"), filters="with_hgnc", values=TRUE,mart=ensembl) hgnc[grep("PDE", hgnc[,1]),] this should give you: hgnc_symbol ensembl_gene_id 440 PDE6B ENSG00000133256 2600 PDE4D ENSG00000113448 2738 PDE6H ENSG00000139053 2942 PDE9A ENSG00000160191 3070 PDE3A ENSG00000172572 3888 PDE8B ENSG00000113231 4224 PDE3B ENSG00000152270 4361 PDE7A ENSG00000205268 5258 PDE4A ENSG00000065989 6714 PDE1C ENSG00000154678 7217 PDE5A ENSG00000138735 ..... Cheers, Steffen > Dear folks, > > I try to search for all PDE genes within the biomaRt Ensembl database. I > am looking for a simple code for searching with the * symbol like under > linux (e.g. grep function). here my imaginary, not working code: > > library(biomaRt) > ensembl = useMart("ensembl", dataset = "hsapiens_gene_ensembl") > PDE_infos = getBM(attributes = c("hgnc_symbol", "ensembl_gene_id"), > filters = "hgnc_symbol", values = "*PDE*", mart = ensembl) > > Is there any easy way to do such a * search? I mean I could first > download all genes and then I could filter via regular expression for > PDE genes. But I guess there is a way to use * in R or? > > Thanks, > Paul > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD COMMENT

Login before adding your answer.

Traffic: 721 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6