Closed lwaldron closed 5 years ago
Hi Levi, @lwaldron
This is just due to the bracket subset method for signature = c("List", "list")
.
By convention, when subsetting by an empty vector, all of the rows or columns are
removed. This is the effect that List[list]
is going for.
I can change it to only subset experiments when the subset vector is not empty and the row names are not null.
-MR
As I understand it, a single list input for row subsetting would only subset the particular named assay to satisfy:
identical(mae[rn[-1], , ], mae)
@lwaldron Should this behavior be expected for columns as well?
Yes. Specifically:
mae[, List(assay2=1:3), ]
would select the first three columns of assay2, just like:
mae[List(assay2=1:3), ,]
would select the first three rows of assay2.
RaggedExperiment
objects fromcuratedTCGAData
have no rownames, causing all row subsetting operations to error. I think a better behavior would be to ignore such assays when row subsetting.Example:
Perhaps the above really should error, but I expected this to simply maintain the RaggedExperiment untouched:
I think the following should also ignore the Mutation assay: