Commit 98355c63 authored by Gerald Salin's avatar Gerald Salin
Browse files

slight modifications in output files, due to new versions of software

parent 2c2b49eb
......@@ -16,6 +16,7 @@
#
import os
import logging
from subprocess import Popen, PIPE
......@@ -58,12 +59,12 @@ class Bismark (Analysis):
if input_files_R2 :
self.is_paired = True
self.add_input_file_list( "input_files_R2", "input files read2", default=input_files_R2, file_format='fastq')
self.add_output_file_list( "output_files", "output alignment file", pattern='{basename}_bismark'+extention_bowtie+'_pe.bam', items=self.input_files_R1, file_format='bam')
self.add_output_file_list( "output_report", "output report file", pattern='{basename}_bismark'+extention_bowtie+'_PE_report.txt', items=self.input_files_R1)
self.add_output_file_list( "output_files", "output alignment file", pattern='{basename_woext}_bismark'+extention_bowtie+'_pe.bam', items=self.input_files_R1, file_format='bam')
self.add_output_file_list( "output_report", "output report file", pattern='{basename_woext}_bismark'+extention_bowtie+'_PE_report.txt', items=self.input_files_R1)
else :
self.is_paired = False
self.add_output_file_list( "output_files", "output alignment file", pattern='{basename}_bismark'+extention_bowtie+'.bam', items=self.input_files_R1, file_format='bam')
self.add_output_file_list( "output_report", "output report file", pattern='{basename}_bismark'+extention_bowtie+'_SE_report.txt', items=self.input_files_R1)
self.add_output_file_list( "output_files", "output alignment file", pattern='{basename_woext}_bismark'+extention_bowtie+'.bam', items=self.input_files_R1, file_format='bam')
self.add_output_file_list( "output_report", "output report file", pattern='{basename_woext}_bismark'+extention_bowtie+'_SE_report.txt', items=self.input_files_R1)
base_output_names=[]
if self.samples_names == None or len(self.samples_names) == 0:
......@@ -114,7 +115,12 @@ class Bismark (Analysis):
def process(self):
#to do merge bam per samples!
if self.is_paired:
if self.is_paired:
logging.getLogger("ng6").debug("bismark.process ")
logging.getLogger("ng6").debug("bismark.process self.output_files = " + ",".join(self.output_files))
logging.getLogger("ng6").debug("bismark.process self.stderrs = " + ",".join(self.stderrs))
logging.getLogger("ng6").debug("bismark.process self.output_report = " + ",".join(self.output_report))
logging.getLogger("ng6").debug("bismark.process self.output_bam = " + ",".join(self.output_bam))
self.add_shell_execution( self.get_exec_path("bismark") + " " + self.args + " -o " + self.output_directory + " --temp_dir " + self.output_directory + \
" " + self.reference_directory + " -1 $1 -2 $2 2> $4 ; ln -s $3 $6 2>> $4;" ,
cmd_format='{EXE} {IN} {OUT}', map=True,
......
......@@ -71,7 +71,7 @@ class RemoveDuplicate (Analysis):
self.add_shell_execution(self.get_exec_path("samtools") + " flagstat $1 > $2", cmd_format='{EXE} {IN} {OUT}',
inputs=[self.bam], outputs=[self.flagstat_init], map=True)
self.add_shell_execution(self.get_exec_path("samtools") + " sort -m "+self.mem+" -@"+str(self.cpu)+" $1 -o $2; mv $2.bam $2",
self.add_shell_execution(self.get_exec_path("samtools") + " sort -m "+self.mem+" -@"+str(self.cpu)+" $1 -o $2",
cmd_format='{EXE} {IN} {OUT}', inputs=[self.bam], outputs=[self.temp_sorted1], map=True)
if self.is_paired :
#samtools rmdup
......
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