Skip to content

Commit

Permalink
Add report_file from bioluigi 0.0.8 to cutadapt tasks (fix #47)
Browse files Browse the repository at this point in the history
  • Loading branch information
arteymix committed Feb 8, 2022
1 parent d4771d5 commit fafd38e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rnaseq_pipeline/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ def run(self):
r1.path,
join(destdir, os.path.basename(r1.path)),
minimum_length=self.minimum_length,
report_file=join(destdir, os.path.basename(r1.path) + '.cutadapt.json'),
cpus=4)
elif len(self.input()) == 2:
r1, r2 = self.input()
Expand All @@ -113,20 +114,23 @@ def run(self):
r2.path,
join(destdir, os.path.basename(r2.path)),
minimum_length=self.minimum_length,
report_file=join(destdir, os.path.basename(r2.path) + '.cutadapt.json'),
cpus=4)
elif self.ignore_mate == 'reverse':
logger.info('Reverse mate is ignored for %s.', repr(self))
yield platform.get_trim_single_end_reads_task(
r1.path,
join(destdir, os.path.basename(r1.path)),
minimum_length=self.minimum_length,
report_file=join(destdir, os.path.basename(r1.path) + '.cutadapt.json'),
cpus=4)
else:
yield platform.get_trim_paired_reads_task(
r1.path, r2.path,
join(destdir, os.path.basename(r1.path)),
join(destdir, os.path.basename(r2.path)),
minimum_length=self.minimum_length,
report_file=join(destdir, os.path.basename(r1.path) + '_' + os.path.basename(r2.path) + '.cutadapt.json'),
cpus=4)
else:
raise NotImplementedError('Trimming more than two mates is not supported.')
Expand Down

0 comments on commit fafd38e

Please sign in to comment.