forked from ccrobertson/snakemake-multiome-preprocessing
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSnakefile
More file actions
65 lines (60 loc) · 2.02 KB
/
Snakefile
File metadata and controls
65 lines (60 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import os
ROOT = os.getcwd()
rule all:
input:
"work/multiome-rna/library-config.json",
"work/multiome-atac/library-config.json",
"work/multiome-rna/nextflow.submitted",
"work/multiome-atac/nextflow.submitted",
rule setup_rna:
input:
output:
"work/multiome-rna/library-config.json"
params:
root=ROOT
shell:
"""
ROOT={params.root}
WORK={params.root}/work/multiome-rna
PIPELINE={params.root}/pipelines/snRNAseq-NextFlow
mkdir -p ${{WORK}}
python scripts/make_config_rna.py ${{ROOT}}/data/fastq-rna/*.fastq.gz > ${{WORK}}/library-config.json
cat scripts/launch.slurm > ${{WORK}}/launch.slurm
echo "exec nextflow run -resume --chemistry multiome --barcode-whitelist ${{PIPELINE}}/737K-arc-v1.txt -params-file ${{WORK}}/library-config.json --results ${{WORK}}/results ${{PIPELINE}}/main.nf" >> ${{WORK}}/launch.slurm
"""
rule setup_atac:
input:
output:
"work/multiome-atac/library-config.json"
params:
root=ROOT
shell:
"""
ROOT={params.root}
WORK={params.root}/work/multiome-atac
PIPELINE={params.root}/pipelines/snATACseq-NextFlow
mkdir -p ${{WORK}}
python scripts/make_config_atac.py ${{ROOT}}/data/fastq-atac/*.fastq.gz > ${{WORK}}/library-config.json
cat scripts/launch.slurm > ${{WORK}}/launch.slurm
echo "exec nextflow run -resume --chemistry multiome --barcode-whitelist ${{PIPELINE}}/737K-arc-v1.txt -params-file ${{WORK}}/library-config.json --results ${{WORK}}/results ${{PIPELINE}}/main.nf" >> ${{WORK}}/launch.slurm
"""
rule run_rna:
input:
"work/multiome-rna/library-config.json"
output:
"work/multiome-rna/nextflow.submitted"
shell:
"""
cd work/multiome-rna
sbatch launch.slurm > nextflow.submitted
"""
rule run_atac:
input:
"work/multiome-atac/library-config.json"
output:
"work/multiome-atac/nextflow.submitted"
shell:
"""
cd work/multiome-atac
sbatch launch.slurm > nextflow.submitted
"""