diff --git a/workflow/scripts/trim_reads.py b/workflow/scripts/trim_reads.py index 4ab3ffe0b35d499e99827b20892332cc987655d1..4a2d728d0b4004ec1e586035f529fb849d0518a0 100644 --- a/workflow/scripts/trim_reads.py +++ b/workflow/scripts/trim_reads.py @@ -8,7 +8,6 @@ import argparse import shutil import logging import sys -import json EPILOG = ''' For more details: @@ -67,11 +66,13 @@ def trim_reads(fastq, paired): '''Run trim_galore on 1 or 2 files.''' if paired: # paired-end data - trim_command = "trim_galore --paired -q 25 --illumina --gzip --length 35 " \ - + " ".join(fastq) + trim_params = '--paired -q 25 --illumina --gzip --length 35' + trim_command = "trim_galore %s %s %s " \ + % (trim_params, fastq[0], fastq[1]) else: - trim_command = "trim_galore -q 25 --illumina --gzip --length 35 " \ - + " ".join(fastq) + trim_params = '-q 25 --illumina --gzip --length 35' + trim_command = "trim_galore %s %s " \ + % (trim_params, fastq[0]) logger.info("Running trim_galore with %s", trim_command)