biomaRt getFeature function
1
0
Entering edit mode
Paul Hammer ▴ 220
@paul-hammer-2635
Last seen 9.6 years ago
Dear folks, I've installed the package biomaRt currently and I tried to use the function "getFeature". But I had to notice that this function does not exist. So since what time is that function removed from the package and is there now a comparable function? By the way I try to get out following. I have a lot of dna fragments. I know from every fragment the location on the genome (chromosom, start and end base position). Now I would like to know if a fragment is located directly in a gene (that would be easy with the getFeature function from biomaRt :) ). If a fragment is not located in a gene I would like to get out which and where the next gene is located upstream and downstream. Normally I would code a simple perl script which would compare the fragment positions with the annotated cDNA positions but I want to do it in R because all my other analysis I've done also in R. Maybe somebody knows a easy trick to solve my question... Thanks in advance, Paul
biomaRt biomaRt • 812 views
ADD COMMENT
0
Entering edit mode
Paul Hammer ▴ 220
@paul-hammer-2635
Last seen 9.6 years ago
Dear folks, I've installed the package biomaRt currently and I tried to use the function "getFeature". But I had to notice that this function does not exist. So since what time is that function removed from the package and is there now a comparable function? By the way I try to get out following. I have a lot of dna fragments. I know from every fragment the location on the genome (chromosom, start and end base position). Now I would like to know if a fragment is located directly in a gene (that would be easy with the getFeature function from biomaRt :) ). If a fragment is not located in a gene I would like to get out which and where the next gene is located upstream and downstream. Normally I would code a simple perl script which would compare the fragment positions with the annotated cDNA positions but I want to do it in R because all my other analysis I've done also in R. Maybe somebody knows a easy trick to solve my question... Thanks in advance, Paul > sessionInfo() R version 2.8.0 (2008-10-20) x86_64-unknown-linux-gnu locale: LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US .UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_N AME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTI FICATION=C attached base packages: [1] splines tools stats graphics grDevices utils datasets [8] methods base other attached packages: [1] brainwaver_1.4 waveslim_1.6.1 exonmap_2.0.0 [4] RMySQL_0.6-1 DBI_0.2-4 RColorBrewer_1.0-2 [7] genefilter_1.20.0 survival_2.34-1 biomaRt_1.16.0 [10] affy_1.18.1 preprocessCore_1.2.1 affyio_1.8.0 [13] HELP_1.0.0 Biobase_2.0.1 loaded via a namespace (and not attached): [1] annotate_1.18.0 AnnotationDbi_1.2.1 RCurl_0.91-0 [4] RSQLite_0.7-0 XML_1.98-1
ADD COMMENT
0
Entering edit mode
Hi Paul, getFeature has been removed a few versions ago as it contained a lot of hard-coded code. The main query function in biomaRt is getBM, this is a very general function which allows you to do any possible query to BioMart systems that are within one dataset. For your problem I would retrieve all Ensembl gene locations and use that output to iterate over to figure out which of your fragments are in genes or which is the closest gene to your fragments. So you need one biomaRt query which will retrieve all ensembl gene coordinates: library(biomaRt) ensembl = useMart("ensembl", dataset="hsapiens_gene_ensembl") geneLocs = getBM(c("ensembl_gene_id","strand","chromosome_name","start_position", "end_position"), mart=ensembl) Cheers, Steffen > Dear folks, > > I've installed the package biomaRt currently and I tried to use the > function "getFeature". But I had to notice that this function does not > exist. So since what time is that function removed from the package and > is there now a comparable function? > > By the way I try to get out following. I have a lot of dna fragments. I > know from every fragment the location on the genome (chromosom, start > and end base position). Now I would like to know if a fragment is > located directly in a gene (that would be easy with the getFeature > function from biomaRt :) ). If a fragment is not located in a gene I > would like to get out which and where the next gene is located upstream > and downstream. Normally I would code a simple perl script which would > compare the fragment positions with the annotated cDNA positions but I > want to do it in R because all my other analysis I've done also in R. > Maybe somebody knows a easy trick to solve my question... > > Thanks in advance, > Paul > > > sessionInfo() > R version 2.8.0 (2008-10-20) > x86_64-unknown-linux-gnu > > locale: > LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_ US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC _NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDEN TIFICATION=C > > attached base packages: > [1] splines tools stats graphics grDevices utils datasets > [8] methods base > > other attached packages: > [1] brainwaver_1.4 waveslim_1.6.1 exonmap_2.0.0 > [4] RMySQL_0.6-1 DBI_0.2-4 RColorBrewer_1.0-2 > [7] genefilter_1.20.0 survival_2.34-1 biomaRt_1.16.0 > [10] affy_1.18.1 preprocessCore_1.2.1 affyio_1.8.0 > [13] HELP_1.0.0 Biobase_2.0.1 > > loaded via a namespace (and not attached): > [1] annotate_1.18.0 AnnotationDbi_1.2.1 RCurl_0.91-0 > [4] RSQLite_0.7-0 XML_1.98-1 > > _______________________________________________ > 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 REPLY

Login before adding your answer.

Traffic: 938 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