generated from snakemake-workflows/snakemake-workflow-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
32a2895
commit 89ac587
Showing
12 changed files
with
236 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
"files" : "synapse" | ||
"transcriptome" : "/data/repository/misc/cellranger_references/cellranger/refdata-gex-GRCh38-2020-A" | ||
"local_files_dir" : "/data/manke/processing/momin/virome-scan/sc-virome-scan/data_pos_control/SRR13114612" | ||
"kraken_db": "/data/manke/processing/momin/virome-scan/sc-virome-scan/db/t2tDB/t2tDB/" | ||
"samplesheet" : | ||
"mode" : "synapse" | ||
"local_files_dir" : | ||
"kraken_db": | ||
"cellranger": | ||
"transcriptome" : | ||
"scripts_dir": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,5 +10,6 @@ dependencies: | |
- parallel-fastq-dump | ||
- pandas | ||
- snakemake | ||
- seaborn | ||
- pip: | ||
- synapseclient |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
rule cellranger: | ||
input: | ||
i1 = expand("data/{sample}_test.txt", sample=samples) | ||
i1 = "results/kraken2/{sample}.report.txt" | ||
output: | ||
o1 = "results/cellranger/{sample}/{sample}_finished.txt" | ||
priority: 90 | ||
o1 = temp(directory("results/cellranger/{sample}/{sample}/")), | ||
o2 = "results/cellranger/{sample}/possorted_genome_bam.bam" | ||
priority: 80 | ||
resources: | ||
mem_mb = 26000 | ||
threads: 30 | ||
log: | ||
"results/cellranger/{sample}/{sample}.cellranger.log" | ||
params: | ||
p3 = "/data/manke/processing/momin/virome-scan/sc-virome-scan/data/{sample}/" | ||
p1 = "../../../data/{sample}/" | ||
shell: | ||
""" | ||
module load cellranger | ||
touch {output.o1} | ||
cd results/cellranger/{wildcards.sample}/ | ||
cellranger count --id {wildcards.sample} --fastqs {params.p3} --transcriptome {config[transcriptome]} --localcores {threads} | ||
""" | ||
{config[cellranger]} count --id {wildcards.sample} --fastqs {params.p1} --transcriptome {config[transcriptome]} --localcores {threads} | ||
mv {wildcards.sample}/outs/filtered_feature_bc_matrix/ . | ||
mv {wildcards.sample}/outs/raw_feature_bc_matrix/ . | ||
mv {wildcards.sample}/outs/*.h5 . | ||
mv {wildcards.sample}/outs/possorted_genome_bam* . | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
rule extract_bam: | ||
input: | ||
i1 = "results/cellranger/{sample}/{sample}_finished.txt" | ||
i1 = "results/cellranger/{sample}/possorted_genome_bam.bam" | ||
output: | ||
temp("results/cellranger/{sample}/unmapped_reads.sam") | ||
log: | ||
"results/samtools/{sample}.log" | ||
params: | ||
"results/cellranger/{sample}/{sample}/outs/possorted_genome_bam.bam" | ||
shell: | ||
"samtools view -@ 16 -f 4 {params} > {output}" | ||
"samtools view -@ 16 -f 4 {input.i1} > {output}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
rule extract_tags: | ||
input: | ||
i1 = "results/cellranger/{sample}/unmapped_reads.sam", | ||
i2 = "results/kraken2/{sample}/{sample}.kraken" | ||
"results/cellranger/{sample}/unmapped_reads.sam" | ||
output: | ||
"results/count_matrix/{sample}/count_matrix.tsv" | ||
threads: 16 | ||
resources: | ||
mem_mb = 40000 | ||
params: | ||
p1 = "results/count_matrix/{sample}/", | ||
p2 = "results/cellranger/{sample}/{sample}/outs/filtered_feature_bc_matrix/barcodes.tsv.gz" | ||
p2 = "results/cellranger/{sample}/filtered_feature_bc_matrix/barcodes.tsv.gz", | ||
p3 = "results/kraken2/{sample}.kraken" | ||
log: | ||
"results/logs/count_matrix/{sample}_bam_extract.log" | ||
shell: | ||
"python3 scripts/bam_extract.py -i {input.i1} -k {input.i2} -b {params.p2} -o {params.p1}" | ||
"python3 {config[scripts_dir]}/bam_extract.py -i {input} -k {params.p3} -b {params.p2} -o {params.p1}" |
Oops, something went wrong.