Skip to content

Commit

Permalink
Merge pull request #12 from betteridiot/joss-paper
Browse files Browse the repository at this point in the history
JoSS review fixes
  • Loading branch information
betteridiot authored Aug 8, 2018
2 parents a4043c5 + dde1507 commit fbd5e89
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ Bamnostic is meant to be a reduced drop-in replacement for [pysam](https://githu
Bamnostic comes with an example BAM (and respective BAI) file just to play around with the output. Note, however, that the example BAM file does not contain many reference contigs. Therefore, random access is limited. This example file is made availble through `bamnostic.example_bam`, which is a just a string path to the BAM file within the package.

```python
>>> bam = bs.AlignmentFile(bs.example_path, 'rb')
>>> bam = bs.AlignmentFile(bs.example_bam, 'rb')
```

### Get the header
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ within the package.

.. code:: python
>>> bam = bs.AlignmentFile(bs.example_path, 'rb')
>>> bam = bs.AlignmentFile(bs.example_bam, 'rb')
Get the header
~~~~~~~~~~~~~~
Expand Down
5 changes: 4 additions & 1 deletion bamnostic/bgzf.py
Original file line number Diff line number Diff line change
Expand Up @@ -945,7 +945,10 @@ def fetch(self, contig=None, start=None, stop=None, region=None,
if self.ref2tid[query.contig] != tid:
raise ValueError('tid and contig name do not match')
elif query.contig is not None and query.tid is None:
query.tid = self.ref2tid[query.contig]
try:
query.tid = self.ref2tid[query.contig]
except KeyError:
raise KeyError('{} was not found in the file header'.format(query.contig))

try:
if query.start > self._header.refs[query.tid][1]:
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"description": "BAMnostic is a Pure Python OS, version, and runtime agnostic BAM file parser",
"keywords": "BAM, pysam, genomics, genetics, htslib, samtools",
"license": "https://github.com/betteridiot/bamnostic/blob/master/LICENSE",
"softwareVersion": "v0.8.9",
"softwareVersion": "v0.8.10",
"version": "v0.8.2",
"readme": "https://github.com/betteridiot/bamnostic/blob/master/README.md",
"buildInstructions": "https://github.com/betteridiot/bamnostic/blob/master/README.md",
Expand Down
2 changes: 1 addition & 1 deletion docs/paper/codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"description": "BAMnostic: an OS-agnostic toolkit for genomic sequence analysis",
"keywords": "BAM, pysam, genomics, genetics, htslib, samtools",
"license": "https://github.com/betteridiot/bamnostic/blob/master/LICENSE",
"softwareVersion": "v0.8.9",
"softwareVersion": "v0.8.10",
"version": "v0.8.2",
"readme": "https://github.com/betteridiot/bamnostic/blob/master/README.md",
"buildInstructions": "https://github.com/betteridiot/bamnostic/blob/master/README.md",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def readme():

setup(
name='bamnostic',
version='0.8.9',
version='0.8.10',
description='Pure Python, OS-agnostic Binary Alignment Map (BAM) random access and parsing tool',
long_description=readme(),
url='https://github.com/betteridiot/bamnostic/',
Expand Down

0 comments on commit fbd5e89

Please sign in to comment.