diff --git a/README.md b/README.md index 4112eca..6104c83 100644 --- a/README.md +++ b/README.md @@ -212,9 +212,15 @@ Here are links to the documentation on how to use a module in another Snakemake # Recipes > _"Civilization advances by extending the number of important operations which we can perform without thinking of them."_ - Alfred North Whitehead, author of _Principia Mathematica_ -Recipes are templates for standard analyses and consist of default combinations of modules (e.g., bulk RNA-seq DEA or scCRISPR-seq analysis). +**Recipes** are combinations of existing [Modules](#modules) into best practice analyses. They can be used as templates for standard analyses by leveraging existing modules, thereby enabling fast iterations and progression to the unknown. Every recipe is described using a wiki page and presented using a public data set. ---- COMING SOON --- +| Recipe | Description | # Modules | Results | +| :---: | :---: | :---: | :---: | +| [ATAC-seq Analysis](../../wiki/ATAC‐seq-Analysis-Recipe) | From rAw BAMs to DEA enrichemntZ | 6(-7) | ... | +| [RNA-seq Analysis](../../wiki/RNA‐seq-Analysis-Recipe) | From rAw BAMs to DEA enrichemntZ | 6(-7) | ... | +| [Integrative RNA-seq & ATAC-seq Analysis](../../wiki/Integrative-Analysis-Recipe) | From count mAtrices to epigenetic potentialZ | 5 | ... | +| [scRNA-seq Analysis](../../wiki/scRNA‐seq-Analysis-Recipe) | From count mAtrix to DEA enrichemntZ | 5(-6) | ... | +| [scCRISPR-seq Analysis](../../wiki/scCRISPR‐seq-Analysis-Recipe) | From count mAtrix to KO phenotype enrichemntZ | 6(-7) | ... | # Tips Here are some tips for better understanding and troubleshooting that I found useful. diff --git a/config/config.yaml b/config/config.yaml new file mode 100644 index 0000000..ad0eb54 --- /dev/null +++ b/config/config.yaml @@ -0,0 +1,33 @@ + +# cluster parameters +partition: 'shortq' +mem: '32G' +threads: 2 + + + +##### GENERAL ##### +project_name: "MR.PARETO" + +#### Workflows and datasets to include ### +workflows: + MyProject: + unsupervised_analysis: "config/MyProject/MyProject_unsupervised_analysis_config.yaml" + RNAseq: +# ngs_fetch: "config/RNAseq/RNAseq_ngs_fetch_config.yaml" + rnaseq_pipeline: "config/RNAseq/RNAseq_rnaseq_pipeline_config.yaml" + genome_tracks: "config/RNAseq/RNAseq_genome_tracks_config.yaml" + spilterlize_integrate: "config/RNAseq/RNAseq_spilterlize_integrate_config.yaml" + unsupervised_analysis: "config/RNAseq/RNAseq_unsupervised_analysis_config.yaml" + dea_limma: "config/RNAseq/RNAseq_dea_limma_config.yaml" + enrichment_analysis: "config/RNAseq/RNAseq_enrichment_analysis_config.yaml" + ATACseq: +# ngs_fetch: "config/ATACseq/ATACseq_ngs_fetch_config.yaml" + atacseq_pipeline: "config/ATACseq/ATACseq_atacseq_pipeline_config.yaml" + genome_tracks: "config/ATACseq/ATACseq_genome_tracks_config.yaml" + spilterlize_integrate: "config/ATACseq/ATACseq_spilterlize_integrate_config.yaml" + unsupervised_analysis: "config/ATACseq/ATACseq_unsupervised_analysis_config.yaml" + dea_limma: "config/ATACseq/ATACseq_dea_limma_config.yaml" + enrichment_analysis: "config/ATACseq/ATACseq_enrichment_analysis_config.yaml" + + diff --git a/workflow/Snakefile b/workflow/Snakefile new file mode 100644 index 0000000..5cd7def --- /dev/null +++ b/workflow/Snakefile @@ -0,0 +1,54 @@ +##### libraries ##### +import os +import sys +import pandas as pd +import yaml +from snakemake.utils import min_version + +##### setup report ##### +report: os.path.join("report", "workflow.rst") + +##### utility functions ##### + +##### set minimum snakemake version ##### +min_version("7.15.2") + +##### set & load config and sample annotation sheets ##### +configfile: os.path.join("config","config.yaml") + +# load configs for all workflows and datasets +config_wf = dict() + +for ds in config["workflows"]: + for wf in config["workflows"][ds]: + with open(config["workflows"][ds][wf], 'r') as stream: + try: + config_wf[ds+'_'+wf]=yaml.safe_load(stream) + except yaml.YAMLError as exc: + print(exc) + + +##### load rules (one per dataset) ##### +include: os.path.join("rules", "ATACseq.smk") + +#### Target Rule #### + +rule all: + input: + #### ATACseq Analysis Recipe +# rules.ATACseq_ngs_fetch_all.input, + rules.ATACseq_atacseq_pipeline_all.input, + rules.ATACseq_genome_tracks_all.input, + rules.ATACseq_spilterlize_integrate_all.input, + rules.ATACseq_unsupervised_analysis_all.input, + rules.ATACseq_dea_limma_all.input, + rules.ATACseq_enrichment_analysis_all.input, + default_target: True + params: + # cluster parameters + partition=config.get("partition"), + threads: config.get("threads", 1) + resources: + mem_mb=1000, + log: + os.path.join("logs","rules","all.log") diff --git a/workflow/rules/ATACseq.smk b/workflow/rules/ATACseq.smk new file mode 100644 index 0000000..3624e29 --- /dev/null +++ b/workflow/rules/ATACseq.smk @@ -0,0 +1,62 @@ +# ATACseq Analysis Recipe + +# ### ATACseq - NGS Fetch (optional) #### +# module ATACseq_ngs_fetch: +# snakefile: +# github("epigen/ngs_fetch", path="workflow/Snakefile", tag="v1.0.0") +# config: +# config_wf["ATACseq_ngs_fetch"] + +### ATACseq - ATAC-seq processing #### +module ATACseq_atacseq_pipeline: + snakefile: + github("epigen/atacseq_pipeline", path="workflow/Snakefile", tag="v1.1.0") + config: + config_wf["ATACseq_atacseq_pipeline"] + +use rule * from ATACseq_atacseq_pipeline as ATACseq_atacseq_pipeline_* + +#### ATACseq - Genome Tracks #### +module ATACseq_genome_tracks: + snakefile: + github("epigen/genome_tracks", path="workflow/Snakefile", tag="v1.0.1") + config: + config_wf["ATACseq_genome_tracks"] + +use rule * from ATACseq_genome_tracks as ATACseq_genome_tracks_* + +#### ATACseq - Spilterlize & Integrate #### +module ATACseq_spilterlize_integrate: + snakefile: + github("epigen/spilterlize_integrate", path="workflow/Snakefile", tag="v1.2.0") + config: + config_wf["ATACseq_spilterlize_integrate"] + +use rule * from ATACseq_spilterlize_integrate as ATACseq_spilterlize_integrate_* + +### ATACseq - Unsupervised Analysis #### +module ATACseq_unsupervised_analysis: + snakefile: + github("epigen/unsupervised_analysis", path="workflow/Snakefile", tag="v2.0.0") + config: + config_wf["ATACseq_unsupervised_analysis"] + +use rule * from ATACseq_unsupervised_analysis as ATACseq_unsupervised_analysis_* + +#### ATACseq - Differential Accessibility Analysis #### +module ATACseq_dea_limma: + snakefile: + github("epigen/dea_limma", path="workflow/Snakefile", tag="v1.0.3") + config: + config_wf["ATACseq_dea_limma"] + +use rule * from ATACseq_dea_limma as ATACseq_dea_limma_* + +#### ATACseq - Enrichment Analysis #### +module ATACseq_enrichment_analysis: + snakefile: + github("epigen/enrichment_analysis", path="workflow/Snakefile", tag="v1.0.1") + config: + config_wf["ATACseq_enrichment_analysis"] + +use rule * from ATACseq_enrichment_analysis as ATACseq_enrichment_analysis_*