AlexsLemonade / scpca-paper-figures

Figures for https://github.com/AlexsLemonade/ScPCA-manuscript/
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

scpca-paper-figures

This repo contains the figures and tables included in the ScPCA manuscript.

Table of Contents

Summary of figures and tables

Below is a summary of all figures and tables in the paper.

Figure 1

Figure 2

Figure 3

Figure 4

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

Supplemental Figure 6

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.

Generating figures and tables

⚠️ 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

Sample info

The sample-info folder contains metadata files used to create figures and tables.

  1. 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.

  2. 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.

  3. project-whiteliest.txt: This file contains a list of all projects that are currently active on the ScPCA Portal.

Color palettes

The palettes folder contains any palettes used in generating the figures.

  1. diagnosis-group-palette.tsv: This is the palette used to color the diagnosis_group for each sample.
  2. suspension-palette.tsv: This is the palette used to color libraries by Single-cell or Single-nuclei.
  3. method-palette.tsv: This is the palette used to color by quantification method used, either Alevin-fry or Cell Ranger.

Manuscript numbers

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.

Renv

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.

Contributing

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.