This repo contains the figures and tables included in the ScPCA manuscript.
Table of Contents
Below is a summary of all figures and tables in the paper.
Figure 1
Figure 2
Figure 3
Figure 4
SingleR
and CellAssign
.Supplemental Figure 1
Supplemental Figure 2
Supplemental Figure 3
Supplemental Figure 4
Comparison of delta median statistic obtained from running SingleR
with different celldex
references.
Supplemental Figure 5
CellAssign
for an example ScPCA library.CellAssign
annotations for an example ScPCA library.Supplemental Figure 6
SingleR
.CellAssign
.Supplemental Figure 7
Comparison between submitter provided annotations and automated annotations from SingleR
and CellAssign
.
Table S1
Summary of libraries and types of libraries found on the Portal.
Table S2
List of references used for each project on the Portal with CellAssign
, including the list of organs used to create the reference.
⚠️ This section currently requires internal Data Lab access to data
The figures
and tables
folders contain the most up-to-date version of each of the figures and tables, respectively.
The scripts
directory contains all scripts used to create the figures and tables.
See the README
for the scripts
directory for more information on figure and table scripts.
To generate all figures and tables, run the script generate-figures-tables.sh
as:
bash generate-figures-tables.sh
Note that this script assumes that the s3_files
directory has been populated with relevant data files.
These files can be obtained by first running the figure setup scripts, which currently require S3 bucket access as a Data Lab member.
Setup scripts can be run as:
Rscript scripts/figure_setup/sync-metadata.R
Rscript scripts/figure_setup/sync-data-files.R
Rscript scripts/figure_setup/sync-reference-files.R
If you have setup 1Password
to handle your AWS credentials, you will need to prefix those lines with op run --
:
op run -- Rscript scripts/figure_setup/sync-metadata.R
op run -- Rscript scripts/figure_setup/sync-data-files.R
op run -- Rscript scripts/figure_setup/sync-reference-files.R
The sample-info
folder contains metadata files used to create figures and tables.
diagnosis-groupings.tsv
: This tsv file contains one row per submitted_diagnosis
associated with samples on the ScPCA Portal.
For each submitted_diagnosis
, a diagnosis_group
is assigned.
disease-timing.tsv
: This tsv file contains one row per submitted_disease_timing
associated with samples on the ScPCA Portal.
For each submitted_disease_timing
, a standardized_disease_timing
is assigned.
project-whiteliest.txt
: This file contains a list of all projects that are currently active on the ScPCA Portal.
The palettes
folder contains any palettes used in generating the figures.
diagnosis-group-palette.tsv
: This is the palette used to color the diagnosis_group
for each sample.suspension-palette.tsv
: This is the palette used to color libraries by Single-cell
or Single-nuclei
.method-palette.tsv
: This is the palette used to color by quantification method used, either Alevin-fry
or Cell Ranger
.The manuscript-numbers
folder contains tables with total sample counts referenced when writing the manuscript.
These tables are not included in the final manuscript and were created using scripts/Fig1A_sample-disease-barchart.R
.
Package dependencies for scripts used in this repo are managed using renv
.
For renv
to work as intended, you'll need to work within the scpca-paper-figures.Rproj
project in RStudio.
You may need to run renv::restore()
upon opening the project to ensure the renv.lock
file is synced with the project library.
When developing new scripts, you may need to install or use new R packages.
Each time you install or use new packages, you will want to run renv::snapshot()
to update the renv.lock
file with any added package and dependencies necessary to run the analyses and scripts in this repo.
In addition, this repository uses the parsable-r
pre-commit hook to ensure R scripts are parsable.
To use this hook, first ensure that that the pre-commit
package is installed on your system; you can install it with your favorite method (pip install pre-commit
or conda install pre-commit
).
Then, run pre-commit install
in the scpca-paper-figures
directory to enable pre-commit hooks in this repository.
This will install the hooks in the .git/hooks
directory, and they will be run automatically when you commit changes.
If the hook fails, the commit will be aborted, and you will need to fix the errors and re-commit.