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.
Added additional Count-matrix reporting based on Kraken-classified reads
- Loading branch information
1 parent
51a5b28
commit 37d30d9
Showing
7 changed files
with
43 additions
and
12 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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
rule kraken2_processing: | ||
input: | ||
i1 = "results/cellranger/{sample}/possorted_genome_bam.bam", | ||
i2 = "results/kraken2/{sample}.kraken" | ||
output: | ||
o1 = "results/kraken_reads/{sample}_kraken_reads.sam", | ||
priority: 90 | ||
resources: | ||
mem_mb = 20000 | ||
threads: 16 | ||
params: | ||
p1 = "results/kraken_reads/{sample}_ReadIds.txt", | ||
p2 = "results/kraken_reads/{sample}_krakenReads.bam" | ||
log: | ||
"results/logs/kraken2/{sample}.kraken.log" | ||
shell: | ||
""" | ||
mkdir -p results/kraken_reads | ||
awk -F'\t' '$3 != "unclassified (taxid 0)" && $3 != "Homo sapiens (taxid 9606)" {{print $2}}' {input.i2} > {params.p1} | ||
samtools view -N {params.p1} -o {params.p2} {input.i1} | ||
samtools index {params.p2} | ||
samtools view -h {params.p2} > {output.o1} | ||
""" |
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