Skip to content

Commit

Permalink
Fixes #25: corrected regression error caused by recent bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
betteridiot committed Nov 5, 2018
1 parent 930f972 commit 843687b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions bamnostic/bam.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,14 +591,14 @@ def fetch(self, contig=None, start=None, stop=None, region=None,
# check to see if the read is out of bounds of the region
# On the wrong contig -> not the right place
if next_read.reference_name != query.contig:
return None
return

# Read is too far left -> keep going
elif (next_read.pos + len(next_read.seq)) < query.start:
continue

# Originates outside, but overlaps
elif next_read.pos < query.start <= (next_read.pos + len(next_read)):
elif next_read.pos < query.start <= (next_read.pos + len(next_read.seq)):
yield next_read

# Read wholly inside region
Expand All @@ -607,15 +607,15 @@ def fetch(self, contig=None, start=None, stop=None, region=None,

# Read too far right -> gotta stop
elif query.stop <= next_read.pos:
return None
return

# check for stop iteration
elif next_read:
yield next_read

# Empty read
else:
return None
return

# Read until the end of file
else:
Expand Down
4 changes: 2 additions & 2 deletions codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"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": "v1.0.2,
"version": "v1.0.2",
"softwareVersion": "v1.0.3,
"version": "v1.0.3",
"readme": "https://github.com/betteridiot/bamnostic/blob/master/README.md",
"buildInstructions": "https://github.com/betteridiot/bamnostic/blob/master/README.md",
"issueTracker": "https://github.com/betteridiot/bamnostic/issues",
Expand Down
4 changes: 2 additions & 2 deletions docs/paper/codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"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": "v1.0.2",
"version": "v1.0.2",
"softwareVersion": "v1.0.3",
"version": "v1.0.3",
"readme": "https://github.com/betteridiot/bamnostic/blob/master/README.md",
"buildInstructions": "https://github.com/betteridiot/bamnostic/blob/master/README.md",
"issueTracker": "https://github.com/betteridiot/bamnostic/issues",
Expand Down
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@
author = 'Marcus D. Sherman'

# The short X.Y version
version = '1.0.2'
version = '1.0.3'
# The full version, including alpha/beta/rc tags
release = '1.0.2'
release = '1.0.3'


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def readme():

setup(
name='bamnostic',
version='1.0.2',
version='1.0.3',
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 843687b

Please sign in to comment.