Handle instance where BAMDataProvider iterator is None; this can occur when trying to fetch additional data.

This commit is contained in:
Jeremy Goecks
2012-02-05 12:53:23 -05:00
parent bb0e8afcf6
commit 90c62d93ed
@@ -646,6 +646,10 @@ class BamDataProvider( TracksDataProvider ):
max_high - highest coordinate for the returned reads
message - error/informative message
"""
# No iterator indicates no reads.
if iterator is None:
return { 'data': [], 'message': None }
# Decode strand from read flag.
def decode_strand( read_flag, mask ):
strand_flag = ( read_flag & mask == 0 )