[Bioc-devel] [question about class extension]
There aren't strict standards imposed on many of the packages in
Bioconductor introducing classes, but many other packages extend and impose
standards and constraints for given areas/fields/subjects.
If you are considering this route, something like the following could work
to determine if introducing metadata features and restrictions is the route
to take:
libraryVector <-
c("MultiAssayExperiment", "SummarizedExperiment",
"SingleCellExperiment", "SpatialExperiment")
# Try something like this to test your candidate data classes:
testClass <- function(libraryName, functionString){
# libraryName : valid class library
eval(parse(text = paste0(functionString,"(",libraryName,")")))
}
for(libraryName in libraryVector){
testClass(libraryName, "library")
testClass(libraryName, "new <- ")
metadata(new) #
testClass("new", "rm")
testClass(libraryName, "detach")
}
There may be better ways to harmonize and share the data with collaborators
as a flat table.
MAE has extensive documentation and there is also a cheatsheet provided to
help out with tasking.
See also: DOI: 10.18129/B9.bioc.MultiAssayExperiment
Sean
On Tue, Jan 23, 2024 at 5:45?AM Delphine Charif <delphine.charif at inrae.fr>
wrote:
Dear Bioc developer, We are developing a package and have used the MultiAssayExperiment class to manage our data. We need to impose a particular structure on the slot metadata of the MAE object (list => named list) because we havec defined methods that depend on this named list. Is it good practice to extend the MAE class for the specificity of our metadata structure or is it better to define new methods applying to a MAE object (and check the metadata structure )? Thanks in advance, -------------------------------------- Delphine CHARIF +33 (0)1 30 83 35 24 IJPB<https://ijpb.versailles.inrae.fr/> - <https://www.inrae.fr/> INRAE< https://www.inrae.fr/> RD10 - Route de Saint-Cyr 78026 Versailles --------------------------------------- En temps partiel le mercredi [[alternative HTML version deleted]]
_______________________________________________ Bioc-devel at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel