GRangesList mcols names
1
0
Entering edit mode
@leonard-goldstein-5925
Last seen 9.4 years ago
United States
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]]
• 3.9k views
ADD COMMENT
0
Entering edit mode
@valerie-obenchain-4275
Last seen 2.9 years ago
United States
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 > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD COMMENT
0
Entering edit mode
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@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@r-project.org >> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: stat.e="" thz.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@r-project.org > https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: stat.et="" hz.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=""> > [[alternative HTML version deleted]]
ADD REPLY
0
Entering edit mode
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=""> > >
ADD REPLY
0
Entering edit mode
The restriction has been removed in 1.13.53. Val On 10/09/2013 08:30 AM, Valerie Obenchain wrote: > 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=""> >> >> > > _______________________________________________ > Bioconductor mailing list > Bioconductor at r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD REPLY
0
Entering edit mode
Hi Val, That's great, thanks for the quick reply and for removing the restriction. Best, Leonard On Wed, Oct 9, 2013 at 11:35 AM, Valerie Obenchain <vobencha@fhcrc.org>wrote: > The restriction has been removed in 1.13.53. > > Val > > > On 10/09/2013 08:30 AM, Valerie Obenchain wrote: > >> 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@fhcrc.org>>> <mailto:vobencha@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@r-project.org <mailto:bioconductor@r-**project.org<bioconductor@r-project.org> >>> > >>> https://stat.ethz.ch/mailman/_**_listinfo/bioconductor<htt ps:="" stat.ethz.ch="" mailman="" __listinfo="" bioconductor=""> >>> <https: stat.ethz.ch="" mailman="" **listinfo="" bioconductor<http="" s:="" 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.informatic="" s.__conductor=""> >>> >>> <http: news.gmane.org="" gmane.**science.biology.informatics.**condu="" ctor<http:="" news.gmane.org="" gmane.science.biology.informatics.conductor=""> >>> > >>> >>> >>> ______________________________**___________________ >>> Bioconductor mailing list >>> Bioconductor@r-project.org <mailto:bioconductor@r-**project.org<bioconductor@r-project.org> >>> > >>> https://stat.ethz.ch/mailman/_**_listinfo/bioconductor<https: stat.ethz.ch="" mailman="" __listinfo="" bioconductor=""> >>> <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.informatic="" s.__conductor=""> >>> <http: news.gmane.org="" gmane.**science.biology.informatics.**condu="" ctor<http:="" news.gmane.org="" gmane.science.biology.informatics.conductor=""> >>> > >>> >>> >>> >> ______________________________**_________________ >> Bioconductor mailing list >> Bioconductor@r-project.org >> https://stat.ethz.ch/mailman/**listinfo/bioconductor<https: stat.e="" thz.ch="" mailman="" listinfo="" bioconductor=""> >> Search the archives: >> http://news.gmane.org/gmane.**science.biology.informatics.**conduct or<http: news.gmane.org="" gmane.science.biology.informatics.conductor=""> >> > > [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

Traffic: 624 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6