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

Add stderr.

parent 7ef93628
......@@ -34,7 +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.stderrs = self.get_outputs('{basename_woext}.stderr', 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,12 +106,12 @@ class AlignmentStats (Analysis):
return stderr.split()[0]
def process(self):
alignmentstats = ShellFunction(self.get_exec_path("samtools") + " view $1 | python " \
+ 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 = ShellFunction(self.get_exec_path("samtools") + " view $1 | python " + self.get_exec_path("cigarline_by_pos.py") + " -i - -o $2 $3 " + self.options + " 2> $4", cmd_format='{EXE} {IN} {OUT}')
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)
alignmentstats = ShellFunction(self.get_exec_path("samtools") + " view $1 | python " + self.get_exec_path("cigarline_by_pos.py") + " -i - -o $2 " + self.options + " 2> $3", cmd_format='{EXE} {IN} {OUT}')
alignmentstats = MultiMap(alignmentstats, inputs=self.bam_files, outputs=[self.csv_files_r1, self.stderrs])
flagstats = ShellFunction(self.get_exec_path("samtools") + " flagstat $1 > $2", cmd_format='{EXE} {IN} {OUT}')
flagstats = Map(flagstats,self.bam_files, self.stat_files)
......
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