Skip to content

Single Cell RNA Pipeline Documentation

chenv3 edited this page Nov 9, 2018 · 1 revision

Running the pipeline

Steps to configure and run the pipeline

  1. Alter the snakefile to point to the actual package and reference genome installation locations. (All paths that contain installed_tools.)

  2. Make an analysis folder and copy the shell script to the analysis folder to run the shell script locally. e.g.,

   mkdir analysis
   cd analysis
   cp run_snakemake_single_cell.sh .
  1. In the analysis folder, run the shell script, e.g.,
   ./run_snakemake_single_cell.sh demultiplexing_path_to_fastq genome_reference
   or add -h to view the help, e.g.,
   ./run_snakemake_single_cell.sh -h
  1. Edit config.py and add the estimated number of cells for each sample, e.g.,
   numcells="3000,3000"
  1. Rerun the shell script using,
   ./run_snakemake_single_cell.sh --rerun

Example

run_snakemake.sh path-to-cellranger-mkfastq-dir/outs/fastq_path/HVTKLBGX2 mm10

Using these required options will produce config.py. You will then be prompted to fill in the number of cells estimated per sample in a comma separated format in order of the samples (e.g., numcells=3000,5000)

Exiting now. Fill in numcells in the config file, the config file should look like this:
unaligned=path-to-flowcell_demultipelx_dir/outs/fastq_path/HVTKLBGX2"
analysis=path-to_analysis_dir
ref="mm10"
numcells="3000,5000"

When the estimated cell numbers are filled in to your config.py, you can rerun your snakemake with

run_snakemake.sh --rerun

Which will look like this:

localrule all:
    input: run_CS023203_Rod_0810_Ctrl1_SCAF329_10x_cellranger_count.err, run_CS023203_Rod_0810_TB1_SCAF328_10x_cellranger_count.err, run_CS023203_Rod_0813_Ctrl2_SCAF331_10x_cellranger_count.err, run_CS023203_Rod_0813_TB2_SCAF330_10x_cellranger_count.err, CS023203_Rod_0810_Ctrl1_SCAF329/seurat/seur_10x_cluster_object.rds, CS023203_Rod_0810_TB1_SCAF328/seurat/seur_10x_cluster_object.rds, CS023203_Rod_0813_Ctrl2_SCAF331/seurat/seur_10x_cluster_object.rds, CS023203_Rod_0813_TB2_SCAF330/seurat/seur_10x_cluster_object.rds, CS023203_Rod_0810_Ctrl1_SCAF329/clusterpro/groupGO_0.8.pdf, CS023203_Rod_0810_TB1_SCAF328/clusterpro/groupGO_0.8.pdf, CS023203_Rod_0813_Ctrl2_SCAF331/clusterpro/groupGO_0.8.pdf, CS023203_Rod_0813_TB2_SCAF330/clusterpro/groupGO_0.8.pdf, CS023203_Rod_0810_Ctrl1_SCAF329/velocyto/CS023203_Rod_0810_Ctrl1_SCAF329.loom, CS023203_Rod_0810_TB1_SCAF328/velocyto/CS023203_Rod_0810_TB1_SCAF328.loom, CS023203_Rod_0813_Ctrl2_SCAF331/velocyto/CS023203_Rod_0813_Ctrl2_SCAF331.loom, CS023203_Rod_0813_TB2_SCAF330/velocyto/CS023203_Rod_0813_TB2_SCAF330.loom, CS023203_Rod_0810_Ctrl1_SCAF329/velocyto/velocyto.pdf, CS023203_Rod_0810_TB1_SCAF328/velocyto/velocyto.pdf, CS023203_Rod_0813_Ctrl2_SCAF331/velocyto/velocyto.pdf, CS023203_Rod_0813_TB2_SCAF330/velocyto/velocyto.pdf, CS023203_Rod_0810_Ctrl1_SCAF329/scran/CellCycle.pdf, CS023203_Rod_0810_TB1_SCAF328/scran/CellCycle.pdf, CS023203_Rod_0813_Ctrl2_SCAF331/scran/CellCycle.pdf, CS023203_Rod_0813_TB2_SCAF330/scran/CellCycle.pdf
    jobid: 0

Job counts:
	count	jobs
	1	all
	4	clusterpro
	4	count
	4	pvelocyto
	4	scran
	4	seurat
	4	svelocyto
	25
CONFIG FILE:
unaligned="path-to-flowcell_demultiplex_dir/outs/fastq_path/HVTKLBGX2"
analysis="path-to-analysis_dir/"
ref="mm10"
numcells="3000,3000,3000,3000"


Submit now? (y/n)

Simply respond yes to run the pipeline if everything above is correct, or no if there is an issue.

Clone this wiki locally