LieberInstitute / spatialDLPFC

spatialDLPFC project involving Visium (n = 30), Visium SPG (n = 4) and snRNA-seq (n = 19) samples
http://research.libd.org/spatialDLPFC/
17 stars 3 forks source link

Add graph-based clustering discrete variables #12

Closed lcolladotor closed 3 years ago

lcolladotor commented 3 years ago

After #10, we can run some graph-based clustering algorithms as in https://github.com/LieberInstitute/HumanPilot/blob/master/Analysis/sce_scran.R#L452-L468 + https://github.com/LieberInstitute/HumanPilot/blob/master/Analysis/sce_scran.R#L1185-L1191 and add them to the sce_discrete_vars in #8 as in https://github.com/LieberInstitute/spatialLIBD/blob/master/R/run_app.R#L63.

lcolladotor commented 3 years ago

Note that one of the steps takes nearly a day to run as in https://github.com/LieberInstitute/HumanPilot/blob/master/Analysis/sce_scran.R#L460-L466. So you might want to use a screen here first (see https://linuxize.com/post/how-to-use-linux-screen/).

lcolladotor commented 3 years ago

Still needs to be done by adding more code at https://github.com/LieberInstitute/spatialDLPFC/blob/main/analysis/01_build_SPE.R prior to saving spe.Rdata.

lcolladotor commented 3 years ago

Use load(here::here("rdata", "spe", "spe.Rdata"), verbose = TRUE) to re-load the current data before adding the code related to clustering.

abspangler13 commented 3 years ago

We don't know where to save the clusters to. Do we just create a list of characters called sce_discrete_vars? What kind of list should it be?

lcolladotor commented 3 years ago

For plotting the clusters, you might want to try something like https://github.com/LieberInstitute/spatialDLPFC/blob/main/analysis/02_marker_genes.R#L43-L51 where we create a directory and store 1 PDF per grid plot (so it's not a HUUUUGE single PDF).

abspangler13 commented 3 years ago
Screen Shot 2021-09-09 at 2 32 28 PM
abspangler13 commented 3 years ago

Failed after almost 6 days.

Screen Shot 2021-09-20 at 9 36 14 AM