Skip to content

Commit

Permalink
BAM clean: bai indices for extra contig removal
Browse files Browse the repository at this point in the history
Ensures input BAMs have bai indices using a local symlink to avoid
potential permission errors in the initial directory.
  • Loading branch information
chapmanb committed Feb 6, 2018
1 parent 29d2b35 commit cdd4bb1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 1.0.9 (in progress)

## 1.0.8 (5 February 2018)

- GATK4 is the new default GATK release used in bcbio when running HaplotypeCaller or
Expand Down
5 changes: 4 additions & 1 deletion bcbio/pipeline/cleanbam.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ def remove_extracontigs(in_bam, data):
rg_info = novoalign.get_rg_info(data["rgnames"])
bcbio_py = sys.executable
ref_file = dd.get_ref_file(data)
cmd = ("samtools view -h {in_bam} {str_chroms} | "
local_bam = os.path.join(os.path.dirname(tx_out_file), os.path.basename(in_bam))
utils.symlink_plus(in_bam, local_bam)
bam.index(local_bam, data["config"])
cmd = ("samtools view -h {local_bam} {str_chroms} | "
"""{bcbio_py} -c 'from bcbio.pipeline import cleanbam; """
"""cleanbam.fix_header("{ref_file}")' | """
"samtools view -u - | "
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os
from setuptools import setup, find_packages

version = "1.0.8"
version = "1.0.9a0"

def write_version_py():
version_py = os.path.join(os.path.dirname(__file__), 'bcbio', 'pipeline',
Expand Down

0 comments on commit cdd4bb1

Please sign in to comment.