Mercurial > repos > jjohnson > translate_bed_sequences
diff translate_bed_sequences.py @ 2:359addb9b9d4
Do not include the stop codon when filtering
author | Jim Johnson <jj@umn.edu> |
---|---|
date | Thu, 09 Jan 2014 14:24:41 -0600 |
parents | 57e586ee821e |
children | 3b526a780849 |
line wrap: on
line diff
--- a/translate_bed_sequences.py Thu Jan 09 09:47:50 2014 -0600 +++ b/translate_bed_sequences.py Thu Jan 09 14:24:41 2014 -0600 @@ -100,9 +100,8 @@ tstop = len(translation) if not untrimmed: tstart = translation.rfind('*',0,junc) + 1 - tstop = translation.find('*',junc) + 1 - rtrim = tstop if tstop == 0 else len(translation) - tstop - tstop = tstop if tstop else len(translation) + stop = translation.find('*',junc) + tstop = stop if stop >= 0 else len(translation) if filtering and tstart > ignore: continue trimmed = translation[tstart:tstop]