Closed sjspielman closed 2 months ago
In general, we probably want to avoid importing too much if we don't need to
Seurat is out (as is scpcaTools), but I kept SingleCellExperiment as an import since I figured it's relative more lightweight; let me know if you prefer more ::
there
Checks passing (locally), and no code styling needed from accepted suggestions which all made sense to me!
PR 1/2 for #754
This PR adds a function and associated tests to extract a PC matrix from a given SCE or Seurat object, allowing for a custom PC name while trying to set reasonable defaults for either object type. Currently I don't export this function, but that decision was kind of arbitrary. I also removed the previous README so that
roxygen
could write to it, and I then cleaned up some imports. (I also learned thatstopifnot()
does not likepaste
orglue::glue
in the error message, which I think I had previously known but forgot.)I expect to write a second PR to close out #754 that updates the
calculate_clusters()
function to, as discussed, also be able to take a single cell object and call this function to extract the matrix before clustering when needed.