Last updated: 2021-06-02

Checks: 6 1

Knit directory: KEJP_2020_splatPop/

This reproducible R Markdown analysis was created with workflowr (version 1.6.2). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.

The R Markdown file has unstaged changes. To know which version of the R Markdown file created these results, you’ll want to first commit it to the Git repo. If you’re still working on the analysis, you can ignore this warning. When you’re finished, you can run wflow_publish to commit the R Markdown file and build the HTML.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20210215) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version bd0c8b0. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:

Ignored files:
    Ignored:    .Rhistory
    Ignored:    .Rproj.user/
    Ignored:    data/.DS_Store
    Ignored:    data/10x_lung/
    Ignored:    data/ALL.chr2.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.EURO.0.99.MAF05.filtered.vcf
    Ignored:    data/D30.h5
    Ignored:    data/Diabetes/
    Ignored:    data/IBD/
    Ignored:    data/agg_10X-fibroblasts-control.rds
    Ignored:    data/agg_IBD-ss2.rds
    Ignored:    data/agg_Neuro-10x_DA.rds
    Ignored:    data/agg_NeuroSeq-10x_D11-pool6-filt.rds
    Ignored:    data/agg_NeuroSeq-10x_D11-pool6.rds
    Ignored:    data/agg_diabetes-ss2.rds
    Ignored:    data/agg_iPSC-ss2_D0.rds
    Ignored:    data/covid/
    Ignored:    data/cuomo_NeuroSeq_10x_all_sce.rds
    Ignored:    data/lung_fibrosis/
    Ignored:    data/pseudoB_IBD-ss2.rds
    Ignored:    data/pseudoB_Neuro-10x_DA.rds
    Ignored:    data/pseudoB_NeuroSeq-10x_D11-pool6-filt.rds
    Ignored:    data/pseudoB_NeuroSeq-10x_D11-pool6.rds
    Ignored:    data/pseudoB_diabetes-ss2.rds
    Ignored:    data/pseudoB_iPSC-ss2_D0.rds
    Ignored:    data/sce_10X-fibroblasts-947170.rds
    Ignored:    data/sce_10X-fibroblasts-allGenes.rds
    Ignored:    data/sce_10X-fibroblasts.rds
    Ignored:    data/sce_IBD-ss2.rds
    Ignored:    data/sce_IBD-ss2_HC2.rds
    Ignored:    data/sce_Neuro-10x.rds
    Ignored:    data/sce_Neuro-10x_2CT.rds
    Ignored:    data/sce_Neuro-10x_DA-wihj4.rds
    Ignored:    data/sce_NeuroSeq-10x_D11-pool6-filt-mita1FPP.rds
    Ignored:    data/sce_NeuroSeq-10x_D11-pool6-filt.rds
    Ignored:    data/sce_NeuroSeq-10x_D11-pool6-mita1FPP.rds
    Ignored:    data/sce_NeuroSeq-10x_D11-pool6.rds
    Ignored:    data/sce_diabetes-ss2.rds
    Ignored:    data/sce_diabetes-ss2_T2D-5.rds
    Ignored:    data/sce_iPSC-ss2_D0-joxm39.rds
    Ignored:    data/sce_iPSC-ss2_D0.rds
    Ignored:    output/00_Figures/
    Ignored:    output/01_sims/
    Ignored:    output/demo_eQTL/
    Ignored:    references/1000GP_Phase3_sample_info.txt
    Ignored:    references/Homo_sapiens.GRCh38.99.chromosome.22.gff3
    Ignored:    references/chr2.filt.2-temporary.bed
    Ignored:    references/chr2.filt.2-temporary.bim
    Ignored:    references/chr2.filt.2-temporary.fam
    Ignored:    references/chr2.filt.2.log
    Ignored:    references/chr2.filt.log
    Ignored:    references/
    Ignored:    references/chr2.filt.nosex
    Ignored:    references/chr2.filt.ped
    Ignored:    references/
    Ignored:    references/chr2.filt.prune.out
    Ignored:    references/chr2.filtered.log
    Ignored:    references/chr2.filtered.nosex
    Ignored:    references/chr2.filtered.vcf
    Ignored:    references/chr2.filtered2.log
    Ignored:    references/chr2.filtered2.nosex
    Ignored:    references/chr2.filtered2.vcf
    Ignored:    references/chr2.filtered3.log
    Ignored:    references/chr2.filtered3.nosex
    Ignored:    references/chr2.filtered3.vcf
    Ignored:    references/chr2.genes.gff3
    Ignored:    references/chr2.vcf.gz
    Ignored:    references/chr22.filt.log
    Ignored:    references/
    Ignored:    references/chr22.filt.nosex
    Ignored:    references/chr22.filt.ped
    Ignored:    references/
    Ignored:    references/chr22.filt.prune.out
    Ignored:    references/chr22.filtered.log
    Ignored:    references/chr22.filtered.nosex
    Ignored:    references/chr22.filtered.vcf
    Ignored:    references/chr22.filtered.vcf.bed
    Ignored:    references/chr22.filtered.vcf.bim
    Ignored:    references/chr22.filtered.vcf.fam
    Ignored:    references/chr22.filtered.vcf.log
    Ignored:    references/chr22.filtered.vcf.nosex
    Ignored:    references/chr22.filtered.vcf.rel
    Ignored:    references/
    Ignored:    references/chr22.filtered.vcf.rel_mod
    Ignored:    references/chr22.genes.gff3
    Ignored:    references/chr22.genes.gff3_annotation
    Ignored:    references/chr22.genes.gff3_chunks
    Ignored:    references/chr22.vcf.gz
    Ignored:    references/keep_samples.txt
    Ignored:    references/remove_snps.txt
    Ignored:    references/test.log
    Ignored:    references/test.nosex

Untracked files:
    Untracked:  .DS_Store
    Untracked:  .cache/
    Untracked:  .config/
    Untracked:  .snakemake/
    Untracked:  KEJP_2020_splatPop.Rproj
    Untracked:  Rplots.pdf
    Untracked:  analysis/10x-Fibrob_estimate-params.Rmd
    Untracked:  analysis/10x-Fibrob_simulations.Rmd
    Untracked:  analysis/10x-LungCarcinoma_estimate-params.Rmd
    Untracked:  analysis/Applications_DEG-analysis.Rmd
    Untracked:  analysis/splatPop_side-experiments.Rmd
    Untracked:  analysis/tmp_estimate-params.Rmd
    Untracked:  docs/
    Untracked:  mod
    Untracked:  raw_data.csv
    Untracked:  scRecover+scImpute.csv
    Untracked:  tempFile/
    Untracked:  test_data.rds
    Untracked:  test_unimputed.csv
    Untracked:  test_unimputed.rds

Unstaged changes:
    Modified:   .gitignore
    Modified:   .gitlab-ci.yml
    Modified:   CITATION
    Modified:   Dockerfile
    Modified:   LICENSE
    Modified:   _workflowr.yml
    Modified:   analysis/10x-Neuro_estimate-params.Rmd
    Modified:   analysis/KEJP_iPSC-ss2.Rmd
    Modified:   analysis/_site.yml
    Modified:   analysis/about.Rmd
    Modified:   analysis/index.Rmd
    Modified:   analysis/license.Rmd
    Modified:   analysis/ss2-iPSC_estimate-params.Rmd
    Modified:   analysis/ss2-iPSC_simulations.Rmd
    Modified:   cluster.json
    Modified:   code/1_process-empirical-data.R
    Modified:   code/2_estimate-splatPopParams.R
    Modified:   code/4_simulate_DEG.R
    Modified:   code/
    Modified:   code/misc_functions.R
    Modified:   code/plot_functions.R
    Modified:   code/plot_functions2.R
    Modified:   data/
    Modified:   environment.yml
    Modified:   envs/limix_env.yaml
    Modified:   envs/myenv.yaml
    Modified:   org/
    Modified:   org/
    Modified:   output/
    Modified:   references/
    Modified:   resources/
    Modified:   resources/keep_samples.txt
    Modified:   workflow/config_bp_ss2.yaml
    Modified:   workflow/sims_limix_v1.15.1.smk

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.

These are the previous versions of the repository in which changes were made to the R Markdown (analysis/index.Rmd) and HTML (public/index.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd bd0c8b0 cazodi 2021-05-17 updates to 10x neuroseq and ss2 ipsc examples
html bd0c8b0 cazodi 2021-05-17 updates to 10x neuroseq and ss2 ipsc examples
html 0286c19 cazodi 2021-02-17 re-knit after gitlab ci
Rmd d24c101 cazodi 2021-02-17 ipsc ss2 preprocessing
html d24c101 cazodi 2021-02-17 ipsc ss2 preprocessing
Rmd b200a1f cazodi 2020-03-18 removing accidental commits by christina…
Rmd 9057b09 cazodi 2020-03-18 Revert “initial repo change”
Rmd 0c6d3c6 cazodi 2020-03-18 initial repo change
Rmd c57ac08 Christina Azodi 2019-11-26 First init
Rmd b1f309c Davis McCarthy 2019-02-06 Updating template with improvements.
Rmd d73fd37 Davis McCarthy 2019-01-10 Initial commit


This project demonstrates use cases for splatPop, an extension of the splat model implemented in Splatter, that allows for the simulation of population-scale single-cell RNA-sequencing data.

The splatPop functions are available in the splatter package (v1.14.1+), available in Bioconductor.

Key features:

Data pre-processing

The empirical data used as reference data in this study were downloaded already processed by the original authors.


The results presented in the paper were produced with the following reproducible analyses. They were generated by rendering the R Markdown documents into web pages available at the links below. Analyses are organized by the empirical dataset was used for reference. Details about where to download the empirical data are in the preprocessing page for each dataset.

  1. 10x Differentiating iPSCs (floor plate progenitors and dopaminergic neurons)
  2. SmartSeq2 iPSCs from HipSci (multiple batches)
  3. 10x Fibroblasts (with and without bleomycin to induce fibrosis)
  4. Example use cases

eQTL mapping was done using the best practices as described in Cuomo, Alveri, Azodi, et. al. Snakemake was used to automate that workflow.

Reference Data

Reference VCF and GFF files for chromosome 22 were downloaded and processed as follows.

Reference VCF

# Download

mv ALL.chr22.phase3_shapeit2_mvncall_integrated_v5a.20130502.genotypes.vcf.gz chr22.vcf.gz

# Filter
conda activate plink
plink --vcf chr22.vcf.gz --biallelic-only --snps-only --geno 0 --maf 0.05 --hwe 0.00001 --indep-pairwise 1600 5 0.75 --keep keep_samples.txt --out chr22.filt --recode

plink --vcf chr22.vcf.gz --extract --keep keep_samples.txt --recode vcf --out chr22.filtered

# Output: chr22.filtered.vcf**

Reference GFF

## Download

## Filter
gunzip Homo_sapiens.GRCh38.99.chromosome.22.gff3.gz
awk '$3 == "gene"' Homo_sapiens.GRCh38.99.chromosome.22.gff3 > Homo_sapiens.GRCh38.99.chromosome.22.genes.gff3
mv Homo_sapiens.GRCh38.99.chromosome.22.genes.gff3 chr22.genes.gff3

# Output: chr22.genes.gff3

With the data downloaded and organised as above, you will be able to reproduce the analyses presented in the RMarkdown files linked to above and, if desired, even run the whole analysis pipeline from raw reads to results following these instructions.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

─ Session info ───────────────────────────────────────────────────────────────
 setting  value                       
 version  R version 4.0.4 (2021-02-15)
 os       Red Hat Enterprise Linux    
 system   x86_64, linux-gnu           
 ui       X11                         
 language (EN)                        
 collate  en_US.UTF-8                 
 ctype    en_US.UTF-8                 
 tz       Australia/Melbourne         
 date     2021-06-02                  

─ Packages ───────────────────────────────────────────────────────────────────
 package     * version date       lib source        
 bslib         0.2.4   2021-01-25 [1] CRAN (R 4.0.3)
 cachem        1.0.4   2021-02-13 [1] CRAN (R 4.0.3)
 callr         3.7.0   2021-04-20 [1] CRAN (R 4.0.4)
 cli           2.5.0   2021-04-26 [1] CRAN (R 4.0.4)
 crayon        1.4.1   2021-02-08 [1] CRAN (R 4.0.4)
 desc          1.3.0   2021-03-05 [1] CRAN (R 4.0.4)
 devtools      2.3.2   2020-09-18 [1] CRAN (R 4.0.2)
 digest        0.6.27  2020-10-24 [1] CRAN (R 4.0.2)
 ellipsis      0.3.1   2020-05-15 [1] CRAN (R 4.0.2)
 evaluate      0.14    2019-05-28 [1] CRAN (R 4.0.2)
 fansi         0.4.2   2021-01-15 [1] CRAN (R 4.0.4)
 fastmap       1.1.0   2021-01-25 [1] CRAN (R 4.0.3)
 fs            1.5.0   2020-07-31 [1] CRAN (R 4.0.2)
 git2r         0.28.0  2021-01-10 [1] CRAN (R 4.0.4)
 glue          1.4.2   2020-08-27 [1] CRAN (R 4.0.2)
 htmltools 2021-01-22 [1] CRAN (R 4.0.3)
 httpuv        1.5.5   2021-01-13 [1] CRAN (R 4.0.4)
 jquerylib     0.1.4   2021-04-26 [1] CRAN (R 4.0.4)
 jsonlite      1.7.2   2020-12-09 [1] CRAN (R 4.0.4)
 knitr         1.32    2021-04-14 [1] CRAN (R 4.0.4)
 later 2020-06-05 [1] CRAN (R 4.0.2)
 lifecycle     1.0.0   2021-02-15 [1] CRAN (R 4.0.4)
 magrittr      2.0.1   2020-11-17 [1] CRAN (R 4.0.3)
 memoise       2.0.0   2021-01-26 [1] CRAN (R 4.0.4)
 pillar        1.6.0   2021-04-13 [1] CRAN (R 4.0.4)
 pkgbuild      1.2.0   2020-12-15 [1] CRAN (R 4.0.4)
 pkgconfig     2.0.3   2019-09-22 [1] CRAN (R 4.0.2)
 pkgload       1.2.1   2021-04-06 [1] CRAN (R 4.0.4)
 prettyunits   1.1.1   2020-01-24 [1] CRAN (R 4.0.2)
 processx      3.5.2   2021-04-30 [1] CRAN (R 4.0.4)
 promises 2021-02-11 [1] CRAN (R 4.0.4)
 ps            1.6.0   2021-02-28 [1] CRAN (R 4.0.4)
 R6            2.5.0   2020-10-28 [1] CRAN (R 4.0.2)
 Rcpp          1.0.6   2021-01-15 [1] CRAN (R 4.0.4)
 remotes       2.3.0   2021-04-01 [1] CRAN (R 4.0.4)
 rlang         0.4.10  2020-12-30 [1] CRAN (R 4.0.4)
 rmarkdown     2.7     2021-02-19 [1] CRAN (R 4.0.4)
 rprojroot     2.0.2   2020-11-15 [1] CRAN (R 4.0.3)
 sass          0.3.1   2021-01-24 [1] CRAN (R 4.0.3)
 sessioninfo   1.1.1   2018-11-05 [1] CRAN (R 4.0.2)
 stringi       1.5.3   2020-09-09 [1] CRAN (R 4.0.2)
 stringr       1.4.0   2019-02-10 [1] CRAN (R 4.0.2)
 testthat      3.0.0   2020-10-31 [1] CRAN (R 4.0.2)
 tibble        3.1.1   2021-04-18 [1] CRAN (R 4.0.4)
 usethis       1.6.3   2020-09-17 [1] CRAN (R 4.0.2)
 utf8          1.2.1   2021-03-12 [1] CRAN (R 4.0.4)
 vctrs         0.3.7   2021-03-29 [1] CRAN (R 4.0.4)
 whisker       0.4     2019-08-28 [1] CRAN (R 4.0.2)
 withr         2.4.2   2021-04-18 [1] CRAN (R 4.0.4)
 workflowr     1.6.2   2020-04-30 [1] CRAN (R 4.0.2)
 xfun          0.22    2021-03-11 [1] CRAN (R 4.0.4)
 yaml          2.2.1   2020-02-01 [1] CRAN (R 4.0.2)

[1] /mnt/mcfiles/cazodi/R/x86_64-pc-linux-gnu-library/4.0
[2] /opt/R/4.0.4/lib/R/library