[BioC] GRangesList mcols names

Valerie Obenchain vobencha at fhcrc.org
Wed Oct 9 17:30:30 CEST 2013


I'm ok with that.

Val

On 10/08/2013 06:16 PM, Michael Lawrence wrote:
> I would say we should remove the restriction. It violates the
> expectations of the user. One set of columns describes the individual
> ranges, the other the GRanges as a whole.
>
>
> On Tue, Oct 8, 2013 at 5:03 PM, Valerie Obenchain <vobencha at fhcrc.org
> <mailto:vobencha at fhcrc.org>> wrote:
>
>     Hi Leonard,
>
>     This check was most likely put in place to avoid a name clash if the
>     GRangesList was flattened and the mcols() on the GRangesList were
>     rep'd out. I can't think of a function that currently does this but
>     I might be overlooking something. At any rate, in v 1.13.52 I've
>     moved the error up to the time of construction.
>
>      > mcols(grl)$x <- 1
>     Error in .local(x, ..., value = value) :
>
>        'mcols(x)' cannot have columns named as metadata  columns of
>     unlisted GRanges
>
>     Valerie
>
>
>
>     On 10/05/2013 10:14 PM, Leonard Goldstein wrote:
>
>         Dear list,
>
>         I noticed that GRangesList objects are not allowed to have outer
>         elementMetadata columns with names identical to names of inner
>         elementMetadata columns (see below)
>
>         Is this restriction necessary? And if yes, should identical
>         names raise an
>         exception at the time of construction rather than further down
>         the line?
>
>         Best wishes,
>
>         Leonard
>
>
>             gr <- GRanges("1", IRanges(1, 100), "x" = 1)
>             grl <- split(gr, 1)
>             mcols(grl)$x <- 1
>             grl[1, ]
>
>         Error in validObject(.Object) :
>             invalid class “GRangesList” object: 'mcols(x)' cannot have
>         columns named
>         as metadata  columns of unlisted GRanges
>
>
>             sessionInfo()
>
>         R version 3.0.0 (2013-04-03)
>         Platform: x86_64-unknown-linux-gnu (64-bit)
>
>         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=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8
>            [7] LC_PAPER=C                 LC_NAME=C
>            [9] LC_ADDRESS=C               LC_TELEPHONE=C
>         [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>
>         attached base packages:
>         [1] parallel  stats     graphics  grDevices utils     datasets
>           methods
>         [8] base
>
>         other attached packages:
>         [1] GenomicRanges_1.13.50 XVector_0.1.4         IRanges_1.19.38
>         [4] BiocGenerics_0.7.5
>
>         loaded via a namespace (and not attached):
>         [1] stats4_3.0.0
>
>
>
>                  [[alternative HTML version deleted]]
>
>
>
>         _________________________________________________
>         Bioconductor mailing list
>         Bioconductor at r-project.org <mailto:Bioconductor at r-project.org>
>         https://stat.ethz.ch/mailman/__listinfo/bioconductor
>         <https://stat.ethz.ch/mailman/listinfo/bioconductor>
>         Search the archives:
>         http://news.gmane.org/gmane.__science.biology.informatics.__conductor
>         <http://news.gmane.org/gmane.science.biology.informatics.conductor>
>
>
>     _________________________________________________
>     Bioconductor mailing list
>     Bioconductor at r-project.org <mailto:Bioconductor at r-project.org>
>     https://stat.ethz.ch/mailman/__listinfo/bioconductor
>     <https://stat.ethz.ch/mailman/listinfo/bioconductor>
>     Search the archives:
>     http://news.gmane.org/gmane.__science.biology.informatics.__conductor <http://news.gmane.org/gmane.science.biology.informatics.conductor>
>
>



More information about the Bioconductor mailing list