[Bioc-sig-seq] Coercion of GenomeData to RangedData

Dario Strbenac D.Strbenac at garvan.org.au
Tue Oct 19 05:00:13 CEST 2010


Hello,

The workaround still causes me problems :

> gd = rs
> as(as(as(gd, "RangesList"), "GRanges"), "RangedData")
Error in FUN(X[[1L]], ...) : 
  no method or default for coercing "list" to "Ranges"
> traceback()
13: stop(gettextf("no method or default for coercing \"%s\" to \"%s\"", 
        thisClass, Class), domain = NA)
12: FUN(X[[1L]], ...)
11: lapply(as.list(X), FUN = FUN, ...)
10: lapply(as.list(X), FUN = FUN, ...)
9: lapply(from, as, "Ranges")
8: lapply(from, as, "Ranges")
7: do.call("RangesList", lapply(from, as, "Ranges"))
6: asMethod(object)
5: as(gd, "RangesList")
4: .class1(object)
3: as(as(gd, "RangesList"), "GRanges")
2: .class1(object)
1: as(as(as(gd, "RangesList"), "GRanges"), "RangedData")

I'm not sure why it would be treating the "GenomeData" object as a "list".

- Dario.

---- Original message ----
>Date: Mon, 18 Oct 2010 22:38:46 -0400
>From: Vincent Carey <stvjc at channing.harvard.edu>  
>Subject: Re: [Bioc-sig-seq] Coercion of GenomeData to RangedData  
>To: D.Strbenac at garvan.org.au
>Cc: bioc-sig-sequencing at r-project.org
>
>My reading of the doc suggests it should work.  Perhaps this is a
>workaround: after example("GenomeData-class"),
>
>> as(as(as(gd, "RangesList"), "GRanges"), "RangedData")
>
>
>On Mon, Oct 18, 2010 at 10:00 PM, Dario Strbenac
><D.Strbenac at garvan.org.au> wrote:
>> Hello,
>>
>> This conversion used to work before but it seems like it doesn't any longer.
>>
>>> summary(rs)
>>    Length      Class       Mode
>>        25 GenomeData         S4
>>> as(rs, "RangedData")
>> Error in FUN(X[[1L]], ...) :
>>  no method or default for coercing "list" to "RangedData"
>>> sessionInfo()
>> R version 2.12.0 (2010-10-15)
>> Platform: x86_64-pc-mingw32/x64 (64-bit)
>>
>> locale:
>> [1] LC_COLLATE=English_Australia.1252  LC_CTYPE=English_Australia.1252    LC_MONETARY=English_Australia.1252 LC_NUMERIC=C
>> [5] LC_TIME=English_Australia.1252
>>
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>
>> other attached packages:
>> [1] BSgenome_1.18.0     Biostrings_2.18.0   GenomicRanges_1.2.0 IRanges_1.8.0
>>
>> loaded via a namespace (and not attached):
>> [1] Biobase_2.8.0
>>
>> _______________________________________________
>> Bioc-sig-sequencing mailing list
>> Bioc-sig-sequencing at r-project.org
>> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
>>



More information about the Bioc-sig-sequencing mailing list