[BioC] problems when trying to use biomaRt

Martin Morgan mtmorgan at fhcrc.org
Wed Mar 17 15:29:38 CET 2010


On 03/17/2010 06:54 AM, Juan Pablo Fededa wrote:
> Thanks Martin,
> 
> I get the next answer performing debug on useMart:
> 
> 
>> library("biomaRt")
>> debug(useMart)
>> ensembl = useMart("ensembl", dataset = "hsapiens_gene_ensembl")
> debugging in: useMart("ensembl", dataset = "hsapiens_gene_ensembl")
> debug: {
>     if (local || mysql || !missing(user) || !missing(password)) {
>         .Defunct(msg = "mysql access to Ensembl is no longer available
> through this package the web service mode supports all queries.  If mysql is
> needed a separate package will become available with limited mysql query
> support.")
>     }
>     if (missing(biomart))
>         stop("No biomart databases specified. Specify a biomart database to
> use using the biomart argument")
>     if (!(is.character(biomart)))
>         stop("biomart argument is no string.  The biomart argument should be
> a single character string")
>     marts = NULL
>     marts = listMarts(host = host, path = path, port = port,
>         includeHosts = TRUE, archive = archive)
>     mindex = match(biomart, marts$biomart)
>     if (is.na(mindex) || archive) {
>         mindex = match(biomart, marts$database)
>     }
>     if (is.na(mindex))
>         stop("Incorrect BioMart name, use the listMarts function to see
> which BioMart databases are available")
>     if (is.na(marts$path[mindex]) || is.na(marts$vschema[mindex]) ||
>         is.na(marts$host[mindex]) || is.na(marts$port[mindex]) ||
>         is.na(marts$path[mindex]))
>         stop("The selected biomart databases is not available due to error
> in the BioMart central registry, please report so the BioMart registry file
> can be fixed.")
>     if (marts$path[mindex] == "")
>         marts$path[mindex] = "/biomart/martservice"
>     if (archive)
>         biomart = marts$biomart[mindex]
>     biomart = sub(" ", "%20", biomart)
>     mart <- new("Mart", biomart = biomart, vschema = marts$vschema[mindex],
>         host = paste("http://", marts$host[mindex], ":", marts$port[mindex],
> 
>             marts$path[mindex], sep = ""), archive = archive)
>     if (!missing(dataset)) {
>         mart = useDataset(mart = mart, dataset = dataset)
>     }
>     return(mart)
> }
> Browse[2]>
> 
> 
> In the step-by-step execution of the above function, R GUI starts not
> responding after:
> 
> mart = useDataset(mart = mart, dataset = dataset)
> 
> Any clue about what is going on?

now try debug(useDataset), and so on. Some functions might not be
exported from biomaRt's name space, and then you will need to
debug(biomaRt:::bmAttrFilter), for instance. When you do get to the
'bottom' of the problem, it would be good to know what the variable
values are, e.g., some biomaRt functions seem to compose a variable
named 'request' that contains the string to be sent to biomaRt.

>From Jenny's post, I'm not sure how successful this will be in the long
run, but it would be helpful to have a precise location of the problem.

Martin

> Thanks again,
> 
> 
> Juan
> 
> 
> 
> 
> 
> On Wed, Mar 17, 2010 at 2:39 PM, Martin Morgan <mtmorgan at fhcrc.org> wrote:
> 
>> On 03/17/2010 04:00 AM, Juan Pablo Fededa wrote:
>>> Dear bioconductor-help contributors,
>>>
>>>
>>> I'm trying to use biomaRt package in R, and when I run the next line, the
>> R
>>> GUI crashes:
>>>
>>> ensembl = useMart("ensembl", dataset = "hsapiens_gene_ensembl")
>>>
>>> Theres is no error message at all, simply R is not responding anymore.
>>> when loading library(biomaRt) the prompt sign appears again, and you can
>>> already run basic things like:
>>> listMarts()
>>
>> This is unusual, because the only part of useMart that might end up with
>> real trouble is a call to listMarts() ! Start R with the --vanilla
>> argument, e.g., from the DOS shell
>>
>>  Rgui --vanilla
>>
>> try to place a debugger on useMart, and step through until R stops
>> responding. Restart R, get to a similar place, and look at the arguments
>> to the function that causes problems. Any hints?
>>
>>  > debug(useMart)
>>   > ensembl = useMart("ensembl", dataset = "hsapiens_gene_ensembl")
>>   Browser[2]> n
>>
>> ('n' is for 'next', see ?browser)
>>
>> Martin
>>
>>>
>>> When I run sessionInfo() I get this:
>>>
>>> R version 2.10.1 (2009-12-14)
>>> i386-pc-mingw32
>>>
>>> locale:
>>> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
>>> States.1252
>>> [3] LC_MONETARY=English_United States.1252
>>> LC_NUMERIC=C
>>> [5] LC_TIME=English_United States.1252
>>>
>>> attached base packages:
>>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>>
>>> other attached packages:
>>> [1] biomaRt_2.2.0
>>>
>>> loaded via a namespace (and not attached):
>>> [1] RCurl_1.3-1 XML_2.6-0
>>>
>>> Do you have any idea of what can I change to make it work?
>>> Thanks in advance,
>>>
>>>       [[alternative HTML version deleted]]
>>>
>>> _______________________________________________
>>> 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
>>
>>
>> --
>> Martin Morgan
>> Computational Biology / Fred Hutchinson Cancer Research Center
>> 1100 Fairview Ave. N.
>> PO Box 19024 Seattle, WA 98109
>>
>> Location: Arnold Building M1 B861
>> Phone: (206) 667-2793
>>
> 


-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793



More information about the Bioconductor mailing list