Commit 2b87102f authored by Maxime Manno's avatar Maxime Manno 🍜
Browse files

Update Samtools version :

Change samtools sort option
adding of -o, and removing of the renaming of the output
parent 876cd89b
......@@ -92,14 +92,14 @@ class BWA (Analysis):
if self.read2:
self.add_shell_execution(self.get_exec_path("bwa") + " " + self.algorithm + " " + self.reference_genome +
" $1 $2 2>> $4 | " + self.get_exec_path("samtools") + " view -bS - | " +
self.get_exec_path("samtools") + " sort - $3 2>> $4; mv $3.bam $3;",
self.get_exec_path("samtools") + " sort - -o $3 2>> $4;",
cmd_format='{EXE} {IN} {OUT}' , map=True,
inputs=[self.read1, self.read2], outputs=[unmerged_bam, self.stderrs], includes=self.reference_genome)
# Single-end
else:
self.add_shell_execution(self.get_exec_path("bwa") + " " + self.algorithm + " " + self.reference_genome +
" $1 2>> $3 | " + self.get_exec_path("samtools") + " view -bS - | " +
self.get_exec_path("samtools") + " sort - $2 2>> $3 ; mv $2.bam $2;",
self.get_exec_path("samtools") + " sort - -o $2 2>> $3 ;",
cmd_format='{EXE} {IN} {OUT}' , map=True,
inputs=[self.read1], outputs=[unmerged_bam, self.stderrs], includes=self.reference_genome)
......@@ -118,7 +118,7 @@ class BWA (Analysis):
inputs=[reads], outputs=[sais, self.stderrs_aln], includes=self.reference_genome)
self.add_shell_execution(self.get_exec_path("bwa") + " sampe " + self.reference_genome +
" $1 $2 $3 $4 2>> $6 | " + self.get_exec_path("samtools") + " view -bS - | " +
self.get_exec_path("samtools") + " sort - $5 2>> $6; mv $5.bam $5;",
self.get_exec_path("samtools") + " sort - -o $5 2>> $6;",
cmd_format='{EXE} {IN} {OUT}', map=True,
inputs=[self.sai1, self.sai2, self.read1, self.read2], outputs=[unmerged_bam, self.stderrs], includes=self.reference_genome)
# Single-end
......@@ -128,7 +128,7 @@ class BWA (Analysis):
inputs=[reads], outputs=[sais, self.stderrs_aln], includes=self.reference_genome)
self.add_shell_execution(self.get_exec_path("bwa") + " samse " + self.reference_genome +
" $1 $2 2>> $4 | " + self.get_exec_path("samtools") + " view -bS - | " +
self.get_exec_path("samtools") + " sort - $3 2>> $4; mv $3.bam $3;",
self.get_exec_path("samtools") + " sort - -o $3 2>> $4;",
cmd_format='{EXE} {IN} {OUT}', map=True,
inputs=[self.sai1, self.read1], outputs=[unmerged_bam, self.stderrs], includes=self.reference_genome)
......
......@@ -76,7 +76,7 @@ class STAR (Analysis):
# sort
self.add_shell_execution( self.get_exec_path("samtools") + ' view -Sb $1 | ' + self.get_exec_path("samtools") +
' sort -@ ' + str(self.n_threads) + ' -f - $2 ' , cmd_format='{EXE} {IN} {OUT}', map=True,
' sort -@ ' + str(self.n_threads) + ' -f - -o $2 ' , cmd_format='{EXE} {IN} {OUT}', map=True,
inputs = [self.output_sams_no_md], outputs = [self.output_sorted_bams])
#calmd and convert to bam
......
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