Howto Pass List in useDataset of biomaRt
1
0
Entering edit mode
@gundala-viswanath-2872
Last seen 9.7 years ago
Dear all, I want to pass several datasets for useDataset function. However I tried this with failure: > mart<-useDataset(c("scerevisiae_gene_ensembl","gaculeatus_gene_ensem bl"),mart) XML declaration allowed only at the start of the document Extra content at the end of the document Error: 1: XML declaration allowed only at the start of the document 2: Extra content at the end of the document In addition: Warning message: In if is.na(match(dataset, validDatasets$dataset))) stop(paste("The given dataset: ", : the condition has length > 1 and only the first element will be used Is there a way to do it correctly? In the end I am trying to extract position of various chromosomes from different species using getBM function. - Gundala Viswanath Jakarta - Indonesia
• 930 views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 19 hours ago
United States
Hi Gundala, I don't think you can use multiple datasets at one time. Probably your best bet is to use one dataset to get the required chromosomal positions, then switch datasets and re-run the queries. Best, Jim Gundala Viswanath wrote: > Dear all, > > I want to pass several datasets for useDataset function. > However I tried this with failure: > >> mart<-useDataset(c("scerevisiae_gene_ensembl","gaculeatus_gene_ense mbl"),mart) > > XML declaration allowed only at the start of the document > Extra content at the end of the document > Error: 1: XML declaration allowed only at the start of the document > 2: Extra content at the end of the document > In addition: Warning message: > In if is.na(match(dataset, validDatasets$dataset))) stop(paste("The > given dataset: ", : > the condition has length > 1 and only the first element will be used > > > Is there a way to do it correctly? > > In the end I am trying to extract position of various chromosomes from different > species using getBM function. > > - Gundala Viswanath > Jakarta - Indonesia > > _______________________________________________ > 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 -- James W. MacDonald, M.S. Biostatistician Hildebrandt Lab 8220D MSRB III 1150 W. Medical Center Drive Ann Arbor MI 48109-5646 734-936-8662
ADD COMMENT
0
Entering edit mode
Hi Gundala. If you want to query over two datasets (= linking these two datasets) then you have to used the getLDS function. Check out ?getLDS and example(getLDS) for more info and an example. I've paste the example code below to give you an idea what it does: human = useMart("ensembl", dataset = "hsapiens_gene_ensembl") mouse = useMart("ensembl", dataset = "mmusculus_gene_ensembl") getLDS(attributes = c("hgnc_symbol","chromosome_name", "start_position"), filters = "hgnc_symbol", values = "TP53", mart = human, attributesL = c("chromosome_name","start_position"), martL = mouse) What we do in this query is retrieving the chromosome and start positions of TP53 in both human and mouse. Cheers, Steffen > Hi Gundala, > > I don't think you can use multiple datasets at one time. Probably your > best bet is to use one dataset to get the required chromosomal > positions, then switch datasets and re-run the queries. > > Best, > > Jim > > > > Gundala Viswanath wrote: >> Dear all, >> >> I want to pass several datasets for useDataset function. >> However I tried this with failure: >> >>> mart<-useDataset(c("scerevisiae_gene_ensembl","gaculeatus_gene_ens embl"),mart) >> >> XML declaration allowed only at the start of the document >> Extra content at the end of the document >> Error: 1: XML declaration allowed only at the start of the document >> 2: Extra content at the end of the document >> In addition: Warning message: >> In if is.na(match(dataset, validDatasets$dataset))) stop(paste("The >> given dataset: ", : >> the condition has length > 1 and only the first element will be used >> >> >> Is there a way to do it correctly? >> >> In the end I am trying to extract position of various chromosomes from >> different >> species using getBM function. >> >> - Gundala Viswanath >> Jakarta - Indonesia >> >> _______________________________________________ >> 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 > > -- > James W. MacDonald, M.S. > Biostatistician > Hildebrandt Lab > 8220D MSRB III > 1150 W. Medical Center Drive > Ann Arbor MI 48109-5646 > 734-936-8662 >
ADD REPLY

Login before adding your answer.

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