Mercurial > repos > jjohnson > snpeff_cds_report
diff snpEff_cds_report.py @ 1:29b286896c50
Change the default number of Amino Acids to display after a missense to 10.
author | Jim Johnson <jj@umn.edu> |
---|---|
date | Fri, 19 Apr 2013 10:49:05 -0500 |
parents | cdbdac66d6b5 |
children | 15a54fa11ad7 |
line wrap: on
line diff
--- a/snpEff_cds_report.py Tue Mar 12 13:59:14 2013 -0400 +++ b/snpEff_cds_report.py Fri Apr 19 10:49:05 2013 -0500 @@ -374,13 +374,14 @@ return novel_peptide return None # [preAA,varAA,postAA, varPeptide, varOffset, subAA] - def getNonSynonymousPeptide(self,start_offset,end_offset,toStopCodon=True): + def getNonSynonymousPeptide(self,start_count,end_count,toStopCodon=True): (coding_seq, alt_seq, pos, coding_aa, var_aa, var_aa_pos, var_aa_end) = self.getSequences() if var_aa: - start_pos = max(var_aa_pos - start_offset,0) if start_offset and int(start_offset) >= 0 else 0 + start_pos = max(var_aa_pos - start_count,0) if start_count and int(start_count) >= 0 else 0 if toStopCodon: end_pos = var_aa_end else: + end_offset = end_count + 1 end_pos = min(var_aa_pos+end_offset,len(var_aa)) if end_offset and int(end_offset) >= 0 else var_aa_end try: varAA = var_aa[var_aa_pos] if var_aa_pos < len(var_aa) else '_'