Skip to content

Commit 5f328ea

Browse files
authored
Merge pull request #112 from jbelyeu/master
allow alignment file indices with name pattern {filename}.{bai/crai}
2 parents b602acc + 0b2e59b commit 5f328ea

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ conda install -c bioconda samplot
117117
## Examples:
118118

119119
Samplot requires either BAM files or CRAM files as primary input. If you use
120-
CRAM, you'll also need a reference genome like one used the the [1000 Genomes
121-
Project](ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/technical/reference/human_g1k_v37.fasta.gz).
120+
CRAM, you'll also need a reference genome. You can easily acquire a reference genome file with [GGD](https://github.com/gogetdata/ggd-cli), which is also available from conda.
122121

123122
### Basic use case
124123
Using data from NA12878, NA12889, and NA12890 in the

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)