Skip to content

Commit

Permalink
fixed kraken2 input files
Browse files Browse the repository at this point in the history
  • Loading branch information
erinyoung committed Mar 20, 2024
1 parent c394ada commit e233ee5
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions modules/kraken2.nf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ process kraken2 {
shell:
def args = task.ext.args ?: "${params.kraken2_options}"
def prefix = task.ext.prefix ?: "${sample}"
def reads = clean.join(" ")
if ( clean =~ "cln" ) {
"""
mkdir -p kraken2 logs/${task.process}
Expand All @@ -35,11 +36,11 @@ process kraken2 {
kraken2 --version >> \$log
kraken2 ${args} \
--classified-out kraken2/${prefix}.cseqs#.fastq \
--unclassified-out kraken2/${prefix}.useqs#.fastq \
--classified-out kraken2/${prefix}.cseqs#.fastq.gz \
--unclassified-out kraken2/${prefix}.useqs#.fastq.gz \
--threads ${task.cpus} \
--db ${kraken2_db} \
${clean} \
${reads} \
--report kraken2/${prefix}_kraken2_report.txt \
| tee -a \$log
Expand All @@ -58,11 +59,11 @@ process kraken2 {
kraken2 ${args} \
--paired \
--classified-out kraken2/${prefix}.cseqs#.fastq \
--unclassified-out kraken2/${prefix}.useqs#.fastq \
--classified-out kraken2/${prefix}.cseqs#.fastq.gz \
--unclassified-out kraken2/${prefix}.useqs#.fastq.gz \
--threads ${task.cpus} \
--db ${kraken2_db} \
${clean} \
${reads} \
--report kraken2/${prefix}_kraken2_report.txt \
| tee -a \$log
Expand Down

0 comments on commit e233ee5

Please sign in to comment.