Skip to content

Commit

Permalink
small bugfix in _covers_index
Browse files Browse the repository at this point in the history
  • Loading branch information
jeicher committed Mar 9, 2017
1 parent f7ec3ce commit a2925fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions seq2simulate/diversity.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ def _simulate_inversions(sequences, freq=0.3, max_length=200, min_length=15):
ins_start = random.randrange(0, len(seq)-min_length)
ins_length = random.randint(min_length, min(max_length, len(seq)-ins_start))
inverted_sequence = seq[ins_start:ins_start + ins_length][::-1]
uninverted_seq = seq[ins_start:ins_start + ins_length]
new_sequence = seq[0:ins_start] + inverted_sequence + seq[ins_start + ins_length:]
if _get_n_stop_codons(new_sequence) <= _get_n_stop_codons(seq):
new_stops_introduced = False
Expand Down
2 changes: 1 addition & 1 deletion seq2simulate/run_make_proviral_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def _is_inversion(sam_line, seq_diffs):
return False

def _covers_index(read_start, read_end, index):
return True if read_start <= index <= read_end else False
return True if read_start <= index < read_end else False

def sample_fastq(n_reads, fastq1=None, fastq2=None):

Expand Down

0 comments on commit a2925fb

Please sign in to comment.