Mercurial > repos > jjohnson > snpeff_cds_report
changeset 7:fbb6510186df default tip
when codon has ambiguous nucleotide translate to X
author | Jim Johnson <jj@umn.edu> |
---|---|
date | Mon, 15 Sep 2014 06:13:47 -0500 |
parents | a64ef0611117 |
children | |
files | snpEff_cds_report.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/snpEff_cds_report.py Thu Jun 13 11:37:34 2013 -0500 +++ b/snpEff_cds_report.py Mon Sep 15 06:13:47 2014 -0500 @@ -37,7 +37,8 @@ rna = seq.upper().replace('T','U') aa = [] for i in range(0,len(rna) - 2, 3): - aa.append(codon_map[rna[i:i+3]]) + codon = rna[i:i+3] + aa.append(codon_map[codon] if codon in codon_map else 'X') return ''.join(aa) """