Skip to content

Commit 280a95d

Browse files
committed
added support for alignment file indices in the {filename}.bai style preferred by picard
1 parent 650736b commit 280a95d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

samplot/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env python
2-
__version__ = "1.0.17"
2+
__version__ = "1.0.18"

samplot/samplot.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2106,7 +2106,9 @@ def bam_file(bam):
21062106
parser.error("alignment file {} is not in SAM/BAM/CRAM format".format(bam))
21072107
idx_type = idx_options[options.index(ext)]
21082108
#try the type-specific index name
2109-
if not os.path.isfile(bam + "." + idx_type):
2109+
picard_bam = os.path.splitext(bam)[0]
2110+
if (not os.path.isfile(bam + "." + idx_type) and
2111+
not os.path.isfile(picard_bam + "." + idx_type)):
21102112
idx_type = idx_options[3]
21112113
#try the csi index name
21122114
if not os.path.isfile(bam + "." + idx_type):

0 commit comments

Comments
 (0)