[BioC] Howto Pass List in useDataset of biomaRt

steffen at stat.Berkeley.EDU steffen at stat.Berkeley.EDU
Mon Nov 17 19:21:34 CET 2008


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_ensembl"),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
>



More information about the Bioconductor mailing list