Closed jason-weirather closed 7 years ago
Hi Jason, @jason-weirather
I was reorganizing the datasets a bit and I moved ccleMAEO.rds
to https://s3.amazonaws.com/multiassayexperiments/example/ccleMAEO.rds
I will look into your issue shortly.
Regards, Marcel
Hi Jason, @jason-weirather
This is the intended behavior of RaggedExperiment
and there is nothing wrong with the infrastructure the data is in.
RaggedExperiment
works with row and column indices to create a matrix-like representation of ragged ranges.
The @assays
internal representation is not intended for end-users. This will show you all the ranges that were available in the RaggedExperiment
before subsetting.
The issue lies with the data in that there are no metadata columns present in the data.
After further inspection, the original RangedRaggedAssay
object did not contain any data elements to begin with.
## Note. class marked for deprecation
$Mutations
RangedRaggedAssay with 61534 disjoint ranges, 451 samples, and 0 data elements
Therefore, you can't represent any of the data in assay
form and the error, Error in .assay_i(x, i) : 'length(assays(x))' is 0
, is appropriate.
I will be working on rebuilding this MultiAssayExperiment
object with newer data from the CCLE portal.
You can find the code at: https://github.com/waldronlab/MultiAssayExperiment-CCLE
Best regards, Marcel
Thanks for looking into this Marcel @LiNk-NY. I look forward to seeing your examples of how to use metadata. It seems the underlying issue of extraneous data being carried along after slicing remains, and I may suggest that prefixing private variables/slots with something like '.' may make those stand out better as intended internal use only. A similar practice is done in python and it seems like its made use of in the R community too.
https://stackoverflow.com/questions/10755509/public-and-private-slots-in-r
Thank you!
Jason
I'm not sure where to cite this, but in Bioconductor data classes - at least core classes, @
slots are never intended for direct access by users. The APIs are designed around methods that access slots in the intended ways. There are a few examples of Bioc data structures that use .
-prefixed slot names, but not many. In that terminology, I would say Bioconductor slots are always "private". "Public" slots would be indicated by an accessor function of the same name that return the contents of that slot.
(And I agree that more examples of how to use the RaggedExperiment assay metadata will be helpful.)
I've run into some trouble working with a RaggedExperiment I created. I am seeing extra columns in data after it is sliced, and accessing the data only returns the unexpected columns. I have replicated the problem in one of the Waldron datasets http://s3.amazonaws.com/multiassayexperiments/ccleMAEO.rds
The dimensions and names from this view are what we expect.
However if we access the names of the assays in the RaggedExperiment, we have do not see what we expect after our earlier slicing, and we have a list of a different length than the previous
dimnames()
access. Notice there is now PROSTATE and LUNG despite having been sliced earlier on BREAST and the previous command only accessing BREAST.Furthermore the
unlist()
function executed on the assays only returns the unexpected result, and not all the expected assays. We expect only BREAST and should see more entries. Instead we see PROSTATE and LUNG.Additionally the sparseAssay function described in the documentation did not seem to work on the RaggedExperiment.
For more information about the session and versions: