Open LTLA opened 6 years ago
You did miss it:
mcols(grl, level="within")
I guess the real issue is that it's so hard to find...
Thanks Mike, mcols(grl, level="within")[,"score"]
gets me what I want.
That was... very well hidden, ?GRangesList
doesn't give any hint about it.
Is this actually documented somewhere? Can't find it (except by looking at the code in R/GRangesList-class.R
. I think this has been around for at least 8 years or more. BTW the names chosen to refer to the outer and inner mcols ("between"
and "within"
, respectively) are not intuitive. Also there is no reason why only GRangesList and GAlignmentsList objects would support this. So I'm going to revisit this a little bit.
@hpages OK, I thought it was your thing. I guess it was Patrick's. I found it by accident a couple years ago.
@lawremi Since we got your attention here, can you please take a look at https://github.com/Bioconductor/S4Vectors/issues/10 ? Thanks!
Is this issue ready to be closed?
Not sure why this was closed.
I was playing around with the
grl
GRangesList object fromexample(GRangesList)
, and it wasn't clear to me how to access the inner metadata. The best I could find was:... which does what I want (extracting the metadata while it is still grouped by the
grl
) but was not particularly obvious to me. I'm surprised that there is noinner.mcols
function, or aninner=TRUE
argument tomcols
, or something more convenient, given that accessing inner metadata seems like a fairly common operation. Of course, it's entirely possible that I've just missed it.