Commit cec3f14c authored by Penom Nom's avatar Penom Nom
Browse files

Add cigarlineGraph stderr log.

parent b8a18706
......@@ -21,11 +21,11 @@ from subprocess import Popen, PIPE
from jflow.component import Component
from jflow.iotypes import OutputFileList, InputFileList, OutputFile, Formats
from jflow.abstraction import MultiMap
from ng6.analysis import Analysis
from weaver.function import ShellFunction
from weaver.abstraction import Map
from ng6.analysis import Analysis
class AlignmentStats (Analysis):
......@@ -34,6 +34,7 @@ class AlignmentStats (Analysis):
self.bam_files = InputFileList(bam_files, Formats.BAM)
self.archive_name = archive_name
self.split_reads = split_reads
self.stderrs = self.get_outputs('{basename_woext}.stderrs', self.bam_files)
self.stat_files = OutputFileList(self.get_outputs('{basename_woext}.stat', self.bam_files))
self.csv_files_r1 = OutputFileList(self.get_outputs('{basename_woext}.csv', self.bam_files))
self.csv_files_r2 = None
......@@ -106,9 +107,9 @@ class AlignmentStats (Analysis):
def process(self):
alignmentstats = ShellFunction(self.get_exec_path("samtools") + " view $1 | " \
+ self.get_exec_path("cigarline_by_pos.py") + " -i - -o $2 $3 " + self.options, cmd_format='{EXE} {IN} {OUT}')
+ self.get_exec_path("cigarline_by_pos.py") + " -i - -o $2 $3 " + self.options + " 2> $4", cmd_format='{EXE} {IN} {OUT}')
if self.csv_files_r2:
alignmentstats = MultiMap(alignmentstats, inputs=self.bam_files, outputs=[self.csv_files_r1, self.csv_files_r2])
alignmentstats = MultiMap(alignmentstats, inputs=self.bam_files, outputs=[self.csv_files_r1, self.csv_files_r2, self.stderrs])
else:
alignmentstats = Map(alignmentstats, inputs=self.bam_files, outputs=self.csv_files_r1)
flagstats = ShellFunction(self.get_exec_path("samtools") + " flagstat $1 > $2", cmd_format='{EXE} {IN} {OUT}')
......
Supports Markdown
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