From 280a95d6da424ed9f1aac00256b3836561b7ec78 Mon Sep 17 00:00:00 2001 From: jbelyeu Date: Fri, 4 Sep 2020 15:56:27 -0600 Subject: [PATCH 1/2] added support for alignment file indices in the {filename}.bai style preferred by picard --- samplot/__init__.py | 2 +- samplot/samplot.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/samplot/__init__.py b/samplot/__init__.py index 6c6e66c..e1e07c5 100644 --- a/samplot/__init__.py +++ b/samplot/__init__.py @@ -1,2 +1,2 @@ #!/usr/bin/env python -__version__ = "1.0.17" +__version__ = "1.0.18" diff --git a/samplot/samplot.py b/samplot/samplot.py index 55a2c98..ffbd408 100755 --- a/samplot/samplot.py +++ b/samplot/samplot.py @@ -2106,7 +2106,9 @@ def bam_file(bam): parser.error("alignment file {} is not in SAM/BAM/CRAM format".format(bam)) idx_type = idx_options[options.index(ext)] #try the type-specific index name - if not os.path.isfile(bam + "." + idx_type): + picard_bam = os.path.splitext(bam)[0] + if (not os.path.isfile(bam + "." + idx_type) and + not os.path.isfile(picard_bam + "." + idx_type)): idx_type = idx_options[3] #try the csi index name if not os.path.isfile(bam + "." + idx_type): From 0b2e59b7539edb6345eb759e14bfd15a4f63f092 Mon Sep 17 00:00:00 2001 From: Jon Belyeu Date: Fri, 4 Sep 2020 16:02:23 -0600 Subject: [PATCH 2/2] Update README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index cf3a0e8..6f68638 100644 --- a/README.md +++ b/README.md @@ -117,8 +117,7 @@ conda install -c bioconda samplot ## Examples: Samplot requires either BAM files or CRAM files as primary input. If you use -CRAM, you'll also need a reference genome like one used the the [1000 Genomes -Project](ftp://ftp-trace.ncbi.nih.gov/1000genomes/ftp/technical/reference/human_g1k_v37.fasta.gz). +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. ### Basic use case Using data from NA12878, NA12889, and NA12890 in the