diff --git a/bamnostic/bam.py b/bamnostic/bam.py index 81df215..f1e6538 100644 --- a/bamnostic/bam.py +++ b/bamnostic/bam.py @@ -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 @@ -607,7 +607,7 @@ 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: @@ -615,7 +615,7 @@ def fetch(self, contig=None, start=None, stop=None, region=None, # Empty read else: - return None + return # Read until the end of file else: diff --git a/codemeta.json b/codemeta.json index d05d7ac..e6ab699 100644 --- a/codemeta.json +++ b/codemeta.json @@ -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", diff --git a/docs/paper/codemeta.json b/docs/paper/codemeta.json index d3a481a..1af1bb2 100644 --- a/docs/paper/codemeta.json +++ b/docs/paper/codemeta.json @@ -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", diff --git a/docs/source/conf.py b/docs/source/conf.py index 3e570b9..2bac4a4 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -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 --------------------------------------------------- diff --git a/setup.py b/setup.py index c7fa3ac..e4d7936 100644 --- a/setup.py +++ b/setup.py @@ -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/',