-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Easy way of adding empty entries to a List #53
Comments
Hi Aaron, This is more like a subsetting operation that allows extracting non-existing list elements as "empty" elements. Note that this is something that ordinary lists in R support:
Except that with our List derivatives empty list elements cannot necessarily be represented with 2 more things: there are no reasons to (1) limit the subscript to a character vector and (2) not support duplicated subscripts:
So if we were to add something like this to S4Vectors, my proposal would be to go for something along the lines of:
Then:
Maybe H. |
Makes sense.
I don't mind, but I don't like the look of those empty names in the
That probably warrants a bigger discussion about handling of missing values in |
I purposely left the question of names propagation aside for my first shot at
Anyway, what do you have in mind? Did you just want to discuss alternate implementations for your H. |
I was thinking that something like this could be added to S4Vectors; I have already encountered a need for it in two different contexts (one for GRLs, another time for DataFrameLists). |
I could give this a shot. What does @lawremi think about integrating this to |
The use case is as follows:
SummarizedExperiment
containing data for the full set of samples.List
containing data for a subset of those samples.List
in thecolData
of the SE.To do so, I would like to generate empty values for samples that aren't in the
List
, so that my expandedList
can nicely fit into my SE object. The same scenario applies forGRangesList
objects that I might want to store asrowRanges
but don't have entries for all rows of the SE (e.g., because I have some transgenes or spike-ins that don't have genomic coordinates).My solution is this:
Example:
The text was updated successfully, but these errors were encountered: