Question: biomaRt returning multiple columns out of order
0
gravatar for Richard Hayes
8.2 years ago by
Richard Hayes20 wrote:
Hi, Our group maintains the biomart instance at the Phytozome plant genomics portal. We've had some users report problems with the result sets from the biomaRt interface. It is unclear if this is a biomaRt problem or a problem in our mart configuration. At the moment, we are still running biomart version 0.6, but are hoping to upgrade in the very near future to 0.7. I had been testing with R 2.12.2 and biomaRt 2.6.0, but then upgraded to R 2.13.1 and biomaRt 2.8.1. The problems persist with these latest software releases. I can successfully connect to our mart and the main genome transcript dataset as follows, successfully retrieving a single column of transcript names for Arabidopsis thaliana using our internal "orgid" filter for organism ID 167: > library('biomaRt') > phyto=useMart('phytozome_mart', dataset='phytozome') > transcripts = getBM(attributes = c("transcript_name"), filters= "orgid", values="167", mart=phyto) > transcripts[1:5,] [1] "AT2G38230.1" "AT2G39920.2" "AT2G26530.1" "AT2G28630.1" "AT2G19280.1" However, when I construct a multicolumn query, the columns are not returned in the expected order: > multiTest = getBM(attributes= c("organism_name", "transcript_name", "exon_chrom_start", "exon_chrom_end"), filters="orgid", values="167", mart=phyto) > multiTest[1:5,] organism_name transcript_name exon_chrom_start exon_chrom_end 1 AT5G47220.1 19171862 19172823 Athaliana 2 AT1G71920.3 27067059 27067098 Athaliana 3 AT1G71920.3 27067189 27067401 Athaliana 4 AT1G71920.3 27067506 27067589 Athaliana 5 AT1G71920.3 27067706 27067860 Athaliana Any help diagnosing the source of this problem is much appreciated. Best regards, -- Richard D. Hayes, Ph.D. Joint Genome Institute / Lawrence Berkeley National Lab http://www.phytozome.net [[alternative HTML version deleted]]
ADD COMMENTlink modified 8.2 years ago by Arek Kasprzyk10 • written 8.2 years ago by Richard Hayes20
Answer: biomaRt returning multiple columns out of order
0
gravatar for Arek Kasprzyk
8.2 years ago by
Arek Kasprzyk10 wrote:
Hi Richard, the best person to help you is Steffen Durinck, the original biomaRt coder (cc'ed on this email) a On Wed, Sep 28, 2011 at 3:52 PM, Richard Hayes <rdhayes@lbl.gov> wrote: > Hi, > > Our group maintains the biomart instance at the Phytozome plant genomics > portal. We've had some users report problems with the result sets from the > biomaRt interface. It is unclear if this is a biomaRt problem or a problem > in our mart configuration. At the moment, we are still running biomart > version 0.6, but are hoping to upgrade in the very near future to 0.7. > > I had been testing with R 2.12.2 and biomaRt 2.6.0, but then upgraded to R > 2.13.1 and biomaRt 2.8.1. The problems persist with these latest software > releases. > > I can successfully connect to our mart and the main genome transcript > dataset as follows, successfully retrieving a single column of transcript > names for Arabidopsis thaliana using our internal "orgid" filter for > organism ID 167: > > > library('biomaRt') > > phyto=useMart('phytozome_mart', dataset='phytozome') > > transcripts = getBM(attributes = c("transcript_name"), filters= "orgid", > values="167", mart=phyto) > > transcripts[1:5,] > [1] "AT2G38230.1" "AT2G39920.2" "AT2G26530.1" "AT2G28630.1" "AT2G19280.1" > > However, when I construct a multicolumn query, the columns are not returned > in the expected order: > > > multiTest = getBM(attributes= c("organism_name", "transcript_name", > "exon_chrom_start", "exon_chrom_end"), filters="orgid", values="167", > mart=phyto) > > multiTest[1:5,] > organism_name transcript_name exon_chrom_start exon_chrom_end > 1 AT5G47220.1 19171862 19172823 Athaliana > 2 AT1G71920.3 27067059 27067098 Athaliana > 3 AT1G71920.3 27067189 27067401 Athaliana > 4 AT1G71920.3 27067506 27067589 Athaliana > 5 AT1G71920.3 27067706 27067860 Athaliana > > Any help diagnosing the source of this problem is much appreciated. > > Best regards, > > -- > Richard D. Hayes, Ph.D. > Joint Genome Institute / Lawrence Berkeley National Lab > http://www.phytozome.net > > _______________________________________________ > Users mailing list > Users@biomart.org > https://lists.biomart.org/mailman/listinfo/users > > [[alternative HTML version deleted]]
ADD COMMENTlink written 8.2 years ago by Arek Kasprzyk10
Hi RIchard, Arek, If you set verbose=TRUE in your getBM query you'll see the XML query that is send to the BioMart server (see below for your example). The order of the attributes in the XML query is usually the same order we get the results back from the BioMart server. However for your example this is not the case and there is no way for biomaRt to know this (Arek correct me if this is not the case), so when we add column names to the returned matrix they will be wrong when the query order is not preserved in the returned result. > multiTest = getBM(attributes= c("organism_name", "transcript_name", "exon_chrom_start", "exon_chrom_end"), filters="orgid", values="167", mart=phyto,verbose=TRUE) <query virtualschemaname="default" uniquerows="1" count="0" datasetconfigversion="0.6" requestid="biomaRt"> <dataset name="phytozome"><attribute name="organism_name"/><attribute name="transcript_name"/><attribute name="exon_chrom_start"/><attribute name="exon_chrom_end"/><filter name="orgid" value="167"/></dataset></query> Cheers, Steffen On Thu, Sep 29, 2011 at 9:08 AM, Arek Kasprzyk <arek.kasprzyk@gmail.com>wrote: > Hi Richard, > the best person to help you is Steffen Durinck, the original biomaRt coder > (cc'ed on this email) > > a > > On Wed, Sep 28, 2011 at 3:52 PM, Richard Hayes <rdhayes@lbl.gov> wrote: > >> Hi, >> >> Our group maintains the biomart instance at the Phytozome plant genomics >> portal. We've had some users report problems with the result sets from the >> biomaRt interface. It is unclear if this is a biomaRt problem or a problem >> in our mart configuration. At the moment, we are still running biomart >> version 0.6, but are hoping to upgrade in the very near future to 0.7. >> >> I had been testing with R 2.12.2 and biomaRt 2.6.0, but then upgraded to R >> 2.13.1 and biomaRt 2.8.1. The problems persist with these latest software >> releases. >> >> I can successfully connect to our mart and the main genome transcript >> dataset as follows, successfully retrieving a single column of transcript >> names for Arabidopsis thaliana using our internal "orgid" filter for >> organism ID 167: >> >> > library('biomaRt') >> > phyto=useMart('phytozome_mart', dataset='phytozome') >> > transcripts = getBM(attributes = c("transcript_name"), filters= "orgid", >> values="167", mart=phyto) >> > transcripts[1:5,] >> [1] "AT2G38230.1" "AT2G39920.2" "AT2G26530.1" "AT2G28630.1" "AT2G19280.1" >> >> However, when I construct a multicolumn query, the columns are not >> returned in the expected order: >> >> > multiTest = getBM(attributes= c("organism_name", "transcript_name", >> "exon_chrom_start", "exon_chrom_end"), filters="orgid", values="167", >> mart=phyto) >> > multiTest[1:5,] >> organism_name transcript_name exon_chrom_start exon_chrom_end >> 1 AT5G47220.1 19171862 19172823 Athaliana >> 2 AT1G71920.3 27067059 27067098 Athaliana >> 3 AT1G71920.3 27067189 27067401 Athaliana >> 4 AT1G71920.3 27067506 27067589 Athaliana >> 5 AT1G71920.3 27067706 27067860 Athaliana >> >> Any help diagnosing the source of this problem is much appreciated. >> >> Best regards, >> >> -- >> Richard D. Hayes, Ph.D. >> Joint Genome Institute / Lawrence Berkeley National Lab >> http://www.phytozome.net >> >> _______________________________________________ >> Users mailing list >> Users@biomart.org >> https://lists.biomart.org/mailman/listinfo/users >> >> > [[alternative HTML version deleted]]
ADD REPLYlink written 8.2 years ago by Steffen Durinck90
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: 127 users visited in the last hour