Question: getSequence from biomaRt changes the order of sequences given as input - is it normal?
0
gravatar for Emmanuel Levy
6.7 years ago by
Emmanuel Levy270
Emmanuel Levy270 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
yeast biomart • 1.1k views
ADD COMMENTlink modified 6.7 years ago by Steffen Durinck540 • written 6.7 years ago by Emmanuel Levy270
Answer: getSequence from biomaRt changes the order of sequences given as input - is it n
0
gravatar for Steffen Durinck
6.7 years ago by
Steffen Durinck540 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@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 COMMENTlink written 6.7 years ago by Steffen Durinck540
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 REPLYlink written 6.7 years ago by Emmanuel Levy270
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 149 users visited in the last hour