On Fri, Apr 23, 2010 at 2:04 PM, Ivan Gregoretti <ivangreg@gmail.com> wrote:

> Hi all,
>
> Is it possible to coerce a GRanges to RangedData?
>
> Apparently, it is not:
>
> > class(P)
> [1] "GRanges"
> attr(,"package")
> [1] "GenomicRanges"
> > as(P,'RangedData')
> Error in as(P, "RangedData") :
>  no method or default for coercing "GRanges" to "RangedData"
>
> Am I missing a library?
>
>
I just checked one into svn. It behaves mostly as expected. The seqlengths
go into the elementMetadata(ranges(rd)).

Thank you
>
> Ivan
>
>
> sessionInfo()
> R version 2.12.0 Under development (unstable) (2010-03-25 r51410)
> x86_64-unknown-linux-gnu
>
> locale:
>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
>  [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8
>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
>  [1] BSgenome.Mmusculus.UCSC.mm9_1.3.16 chipseq_0.3.5
>  [3] ShortRead_1.5.21                   lattice_0.18-3
>  [5] BSgenome_1.15.19                   Biostrings_2.15.25
>  [7] GenomicRanges_0.0.9                IRanges_1.5.70
>  [9] rtracklayer_1.7.11                 RCurl_1.3-1
> [11] bitops_1.0-4.1
>
> loaded via a namespace (and not attached):
> [1] Biobase_2.6.1 grid_2.12.0   hwriter_1.1   tools_2.12.0  XML_2.6-0
>
> _______________________________________________
> Bioc-sig-sequencing mailing list
> Bioc-sig-sequencing@r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioc-sig-sequencing
>

	[[alternative HTML version deleted]]

