getSequence from biomaRt changes the order of sequences given as input - is it normal?
1
0
Entering edit mode
Emmanuel Levy ▴ 270
@emmanuel-levy-1240
Last seen 6.9 years ago
Hello, I started using biomaRt and find it really convenient. One thing I noticed is that the function getSequence reorders the sequences when multiple ids are given as input. I'm not sure if this is normal or if I missed an option? Here is what I do: > ensembl.yeast = useMart(biomart="ensembl", dataset = "scerevisiae_gene_ensembl") > ids = c("S000005528","S000000221" ,"S000005993", "S000003105", "S000004200") > yeast.gen = getSequence( id=ids, mart=ensembl.yeast, seqType=c("cdna"), type="sgd_transcript" ) > yeast.gen[[2]] [1] "S000005528" "S000004200" "S000003105" "S000000221" "S000005993" So the ID No. 5 is now No. 2. It would be convenient if the sequences retrieved would be in the order specified by "id". Not that it's a big problem but just a thought ... or maybe I missed something? All the best, Emmanuel
Yeast biomaRt Yeast biomaRt • 2.0k views
ADD COMMENT
0
Entering edit mode
@steffen-durinck-4465
Last seen 10.2 years ago
Hi Emmanuel, biomaRt returns you the results as they get passed back from the BioMart servers and does no reordering. If you want this changed, this could be a suggestion for the BioMart mailing list users@biomart.org. If the order of BioMart server results would be ordered according to the query input then that would be reflected in the biomaRt results. However this would complicate queries for example if you have multiple filters then one would have to start indicating according to which filter results should be ordered. For now I would reorder the output in R if that is what you need. Cheers, Steffen On Mon, Jan 7, 2013 at 10:40 AM, Emmanuel Levy <emmanuel.levy@gmail.com>wrote: > Hello, > > I started using biomaRt and find it really convenient. One thing I > noticed is that the function getSequence reorders the sequences when > multiple ids are given as input. > > I'm not sure if this is normal or if I missed an option? > > Here is what I do: > > > ensembl.yeast = useMart(biomart="ensembl", dataset = > "scerevisiae_gene_ensembl") > > ids = c("S000005528","S000000221" ,"S000005993", "S000003105", > "S000004200") > > yeast.gen = getSequence( id=ids, mart=ensembl.yeast, seqType=c("cdna"), > type="sgd_transcript" ) > > yeast.gen[[2]] > [1] "S000005528" "S000004200" "S000003105" "S000000221" "S000005993" > > So the ID No. 5 is now No. 2. It would be convenient if the sequences > retrieved would be in the order specified by "id". Not that it's a big > problem but just a thought ... or maybe I missed something? > > All the best, > > Emmanuel > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
Dear Steffen, Thank you for your answer, I'll send a suggestion to users at biomart then. In the meantime it's really not a problem indeed, the function "match" enables one to reorder things easily. All the best, Emmanuel On 7 January 2013 21:12, Steffen Durinck <durinck.steffen at="" gene.com=""> wrote: > Hi Emmanuel, > > biomaRt returns you the results as they get passed back from the BioMart > servers and does no reordering. > If you want this changed, this could be a suggestion for the BioMart mailing > list users at biomart.org. > If the order of BioMart server results would be ordered according to the > query input then that would be reflected in the biomaRt results. However > this would complicate queries for example if you have multiple filters then > one would have to start indicating according to which filter results should > be ordered. > > For now I would reorder the output in R if that is what you need. > > Cheers, > Steffen > > On Mon, Jan 7, 2013 at 10:40 AM, Emmanuel Levy <emmanuel.levy at="" gmail.com=""> > wrote: >> >> Hello, >> >> I started using biomaRt and find it really convenient. One thing I >> noticed is that the function getSequence reorders the sequences when >> multiple ids are given as input. >> >> I'm not sure if this is normal or if I missed an option? >> >> Here is what I do: >> >> > ensembl.yeast = useMart(biomart="ensembl", dataset = >> > "scerevisiae_gene_ensembl") >> > ids = c("S000005528","S000000221" ,"S000005993", "S000003105", >> > "S000004200") >> > yeast.gen = getSequence( id=ids, mart=ensembl.yeast, seqType=c("cdna"), >> > type="sgd_transcript" ) >> > yeast.gen[[2]] >> [1] "S000005528" "S000004200" "S000003105" "S000000221" "S000005993" >> >> So the ID No. 5 is now No. 2. It would be convenient if the sequences >> retrieved would be in the order specified by "id". Not that it's a big >> problem but just a thought ... or maybe I missed something? >> >> All the best, >> >> Emmanuel >> >> _______________________________________________ >> Bioconductor mailing list >> Bioconductor at r-project.org >> 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: 560 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