Question: class "AsIs" is not valid for @'dataset' in an object of class "Mart"; is(value, "character")
0
gravatar for Philip Lijnzaad
2.9 years ago by
European Union
Philip Lijnzaad160 wrote:

Given the following:

library(biomaRt)
mart <- useMart("ensembl")
list <- listDatasets(m)
dataset.name <- list[ grep("sapiens",list$dataset, ignore.case=TRUE), 'dataset' ]

list clearly shows a data.frame containing character strings, is.character( dataset.name) is TRUE, dataset.name == "hsapiens_gene_ensembl" is also TRUE, yet the following call:

set <- useDataset(dataset.name, mart=mart)

gives

Error in (function (cl, name, valueClass)  :
  assignment of an object of class "AsIs" is not valid for @'dataset' in an object of class "Mart"; is(value, "character") is not TRUE

but

set <- useDataset("hsapiens_gene_ensembl", mart=mart)

works fine. I consider this a bug, and (to the more casual end user), a very intractible one. If data.set is, for all intents and purposes, a character string, then useDataset really should (try to) coerce this argument to a chr before crashing. Or should I report this elsewehere? Cheers,

Philip

Oh and the details:

> sessionInfo()
R version 3.3.0 (2016-05-03)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

locale:
[1] C

attached base packages:
[1] stats     datasets  graphics  grDevices utils     methods   base     

other attached packages:
[1] biomaRt_2.30.0

loaded via a namespace (and not attached):
 [1] IRanges_2.6.1        parallel_3.3.0       DBI_0.5-1           
 [4] RCurl_1.95-4.8       memoise_1.0.0        Rcpp_0.12.8         
 [7] Biobase_2.34.0       AnnotationDbi_1.36.0 RSQLite_1.1         
[10] S4Vectors_0.10.3     BiocGenerics_0.20.0  digest_0.6.10       
[13] stats4_3.3.0         bitops_1.0-6         XML_3.98-1.5        
>

 

 

biomart bug • 537 views
ADD COMMENTlink modified 2.9 years ago • written 2.9 years ago by Philip Lijnzaad160
Answer: class "AsIs" is not valid for @'dataset' in an object of class "Mart"; is(value
0
gravatar for Mike Smith
2.9 years ago by
Mike Smith4.0k
EMBL Heidelberg / de.NBI
Mike Smith4.0k wrote:

Thanks for reporting this.  I've patched it in the developmental version of the package.  At the same time I've also prevented multiple datasets being set in a particular mart object, which could cause problems when the user starts creating queries.  These changes should be available in biomaRt version 2.31.2

ADD COMMENTlink modified 2.9 years ago • written 2.9 years ago by Mike Smith4.0k

brilliant, thanks!
 

ADD REPLYlink written 2.9 years ago by Philip Lijnzaad160
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: 215 users visited in the last hour