You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be desirable for GRangesFactor to consistently transmit the information in the mcols of its levels when providing GRanges-like semantics. In particular:
example(GRangesFactor)
levels(grf1)$whee<-1:6# It would be nice to see 'whee' mentioned somewhere.
show(grf1)
# Needs ignore.mcols=TRUE to get 'whee', but then it loses 'ID'.
unfactor(grf1)
# Doesn't know any better, so just returns NULL.grf1$whee
One of the appeals of using a GRangesFactor in the first place is so that we can stuff loads of content into the mcols of the levels without inflating the overall object. While setting is easy with mcols(levels(x))<-, we should consider ways of making it easy to do get back the "expanded" level metadata without needing the wordy levels(x)$whee[as.integer(x)]. For example:
show could just list the metadata fields in the levels, even if it doesn't show them.
unfactor's default could try to include both level and element-wise metadata (i.e., mcols(x)), throwing a warning if the latter overrides the former by name.
$ could try to get the expanded level metadata if name does not exist in the element-wise metadata.
This whole situation is similar to the inner/outer mcols retrieval issue for GRLs. It would probably be desirable to be consistent across these two classes - though arguably, GRLs are not a great example because the inner mcols are shown but so hard to get (what a tease!).
The text was updated successfully, but these errors were encountered:
It would be desirable for
GRangesFactor
to consistently transmit the information in themcols
of its levels when providingGRanges
-like semantics. In particular:One of the appeals of using a
GRangesFactor
in the first place is so that we can stuff loads of content into themcols
of thelevels
without inflating the overall object. While setting is easy withmcols(levels(x))<-
, we should consider ways of making it easy to do get back the "expanded" level metadata without needing the wordylevels(x)$whee[as.integer(x)]
. For example:show
could just list the metadata fields in the levels, even if it doesn't show them.unfactor
's default could try to include both level and element-wise metadata (i.e.,mcols(x)
), throwing a warning if the latter overrides the former by name.$
could try to get the expanded level metadata ifname
does not exist in the element-wise metadata.This whole situation is similar to the inner/outer
mcols
retrieval issue for GRLs. It would probably be desirable to be consistent across these two classes - though arguably, GRLs are not a great example because the inner mcols are shown but so hard to get (what a tease!).The text was updated successfully, but these errors were encountered: