Skip to content

Commit

Permalink
Fixed bug in NGSTK bam_conversions
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Dietz committed Aug 30, 2016
1 parent caad85e commit a26a02c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pypiper/ngstk.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ def bam_conversions(self, bam, depth=True):
:param depth: also calculate coverage over each position
"""
cmd = self.tools.samtools + " view -h " + bam + " > " + bam.replace(".bam", ".sam") + "\n"
cmd += self.tools.samtools + " sort " + bam + " " + bam.replace(".bam", "_sorted") + "\n"
cmd += self.tools.samtools + " sort " + bam + " " + bam.replace(".bam", "_sorted.bam") + "\n"
cmd += self.tools.samtools + " index " + bam.replace(".bam", "_sorted.bam") + "\n"
if depth:
cmd += self.tools.samtools + " depth " + bam.replace(".bam", "_sorted.bam") + " > " + bam.replace(".bam", "_sorted.depth") + "\n"
Expand Down

2 comments on commit a26a02c

@nsheff
Copy link
Member

@nsheff nsheff commented on a26a02c Nov 3, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes.

@nsheff
Copy link
Member

@nsheff nsheff commented on a26a02c Dec 14, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

charles, these replace functions are also bad because they would change "cancer.sample.1" to "cancer.bample.1", since they don't require the .bam to be trailing.

Please sign in to comment.