[BioC] biomaRt * search
Steffen at stat.Berkeley.EDU
Steffen at stat.Berkeley.EDU
Thu Nov 5 20:16:32 CET 2009
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
>
More information about the Bioconductor
mailing list