Skip to content

racng/single-cell-cellphonedb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snakemake workflow: single-cell-cellphonedb

Snakemake

Snakemake workflow for running cellphonedb on a combined annotated dataset (AnnData object) saved as h5ad file. Workflow structure is modelled after cookiecutter snakemake template.

Authors

  • Rachel Ng (@racng)

Usage

If you use this workflow in a paper, don't forget to give credits to the authors by citing the URL of this (original) repository.

Step 1: Obtain a copy of this workflow

  1. Create a new github repository using this workflow as a template.
  2. Clone the newly created repository to your local system, into the place where you want to perform the data analysis.

Step 2: Configure workflow

Configure the workflow according to your needs via editing config.yaml.

  • outdir: Output directory (default: output)
  • adata: Path to h5ad file
  • gene: Key in adata.var that contains gene ids. Put index if using adata.var_names
  • celltype:key: Key in adata.obs that contains cell type labels
  • celltype:groups: Cell types to use (Put [] if using all)
  • sample:key: Key in adata.obs that contains sample labels
  • sample:groups: Samples to analyze (Put [] if using all)
  • cellphonedb:args:: Additional arguments for the cellphonedb cli (counts-data, iterations, threshold, threads)

Step 3: Install Snakemake

Install Snakemake using conda and mamba:

conda install -c conda-forge mamba
mamba create -c conda-forge -c bioconda -n snakemake snakemake

For installation details, see the instructions in the Snakemake documentation.

Step 4: Execute workflow

Activate the conda environment:

conda activate snakemake

Test your configuration by performing a dry-run via

snakemake --use-conda -n

Execute the workflow locally using $N cores (or 'all' cores)

snakemake --use-conda --cores $N

Use alternate config files using the --configfile option.

See the Snakemake documentation for further details.

Step 5: Investigate results

Cellphonedb outputs are organized by sample subfolders under the specified outdir.

About

Snakemake workflow for running cellphonedb.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages