-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
clusteringSpatial clusteringSpatial clustering
Description
This is something we left pending from February 2024. Here are more detailed steps Nick. Sign up for a DSgs with me if you have any questions.
- Add the preliminary PRECAST clustering results for k = 2 to 28 to the SPE object used for the
spatialLIBDapp. This involves updating https://github.com/LieberInstitute/spatial_NAc/blob/main/code/06_deploy_app/prep_spe.R with code you have at https://github.com/LieberInstitute/spatial_NAc/blob/main/code/10_precast/02-explore_results.R. - Choose a preliminary PRECAST cluster k in coordination with others (likely Svitlana). I recommend a small value of
k(under 10); see last bullet point. We know that ultimately these results will be replaced by others computed by Prashanthi et al. Aka, the scripts you write for resolving this issue will be further adapted by Prashanthi et al. - Using code similar to https://github.com/LieberInstitute/spatial_NAc/blob/main/code/06_deploy_app/prep_spe.R (but with the actual
counts), create a pseudobulked object usingspatialLIBD::registration_pseudobulk()(also save it under the06_deploy_appdir since we'll use it forspatialLIBD). As noted on Slack at https://jhu-genomics.slack.com/archives/C02LG5XSANT/p1707847605977579, you'll want to adapt code from https://github.com/LieberInstitute/Visium_SPG_AD/blob/master/code/11_grey_matter_only/01_create_pseudobulk_data.R (like computing PCs, editing therowData(sce_pseudo)$gene_searchand other things there. - Using the pseudobulked object, adapt https://github.com/LieberInstitute/Visium_SPG_AD/blob/master/code/11_grey_matter_only/03_model_pathology.R.
- Adapt https://github.com/LieberInstitute/spatial_NAc/blob/main/code/06_deploy_app/app.R with code from https://github.com/LieberInstitute/Visium_SPG_AD/blob/e13e1a3604aa2dc43d76fa6923541ef403b0b13d/code/05_deploy_app_wholegenome/app.R#L35-L81. If you chose a large
k, then you'll need to adapt code from https://github.com/LieberInstitute/spatialDLPFC/blob/main/code/deploy_app_k16/subset.R instead. - Check https://github.com/LieberInstitute/spatial_NAc/blob/main/code/06_deploy_app/app.R locally (note that the working directory has to be set to the location of
app.Rto simulate the behavior from shinyapps.io; aka, do not usehere::here()on that script!).
Once you are done, let me know and we can update the app by running https://github.com/LieberInstitute/spatial_NAc/blob/main/code/06_deploy_app/deploy.R
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
clusteringSpatial clusteringSpatial clustering