Mercurial > repos > jjohnson > translate_bed_sequences
changeset 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 | 639ee511d552 |
children | 3b526a780849 |
files | translate_bed_sequences.py translate_bed_sequences.xml |
diffstat | 2 files changed, 3 insertions(+), 4 deletions(-) [+] |
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]
--- a/translate_bed_sequences.xml Thu Jan 09 09:47:50 2014 -0600 +++ b/translate_bed_sequences.xml Thu Jan 09 14:24:41 2014 -0600 @@ -29,7 +29,7 @@ #end if #if $trim.trimseqs == 'no': --untrimmed - #if $trim.max_stop_codons != None: + #if $trim.max_stop_codons.__str__ != '': --max_stop_codons $trim.max_stop_codons #end if #end if