Skip to content
Snippets Groups Projects
Commit 5532fa6d authored by Venkat Malladi's avatar Venkat Malladi
Browse files

Add in argument for trim_parameters.

parent b583f9b0
Branches
Tags
No related merge requests found
......@@ -34,6 +34,11 @@ def get_args():
nargs='+',
required=True)
parser.add_argument('-p', '--paired',
help="True/False if paired-end or single end.",
default=False,
action='store_true')
args = parser.parse_args()
return args
......@@ -58,10 +63,15 @@ def check_tools():
raise Exception('Missing cutadapt')
def trim_reads(fastq):
def trim_reads(fastq, paired):
'''Run trim_galore on 1 or 2 files.'''
qc_command = "trim_galore --paired -q 25 --illumina --gzip --length 35 " \
+ " ".join(fastq)
if paired: # paired-end data
qc_command = "trim_galore --paired -q 25 --illumina --gzip --length 35 " \
+ " ".join(fastq)
else:
qc_command = "trim_galore -q 25 --illumina --gzip --length 35 " \
+ " ".join(fastq)
logger.info("Running trim_galore with %s", qc_command)
......@@ -80,7 +90,7 @@ def main():
check_tools()
# Run trim_reads
trim_reads(args.fastq)
trim_reads(args.fastq, args.paired)
if __name__ == '__main__':
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment