Completed translation mechanism
This commit is contained in:
parent
03d87a670f
commit
0c5f188b80
@ -196,14 +196,17 @@ def trim(
|
||||
)
|
||||
|
||||
if perform_translation:
|
||||
aa_sequence = Seq(nt_sequence.replace("-", "n")).translate()
|
||||
aa_sequence = (
|
||||
s_record.seq[tru_start + start_shift - 1 : end + end_shift]
|
||||
.replace("-", "n")
|
||||
.translate()
|
||||
)
|
||||
|
||||
aa_sequence_records.append(
|
||||
SeqRecord.SeqRecord(aa_sequence, *record_metadata)
|
||||
)
|
||||
if gen_cut_stop_codon:
|
||||
aa_no_stop_sequence = Seq(
|
||||
nt_no_stop_sequence.replace("-", "n")
|
||||
).translate()
|
||||
aa_no_stop_sequence = aa_sequence[:-1]
|
||||
aa_no_stop_sequence_records.append(
|
||||
SeqRecord.SeqRecord(aa_no_stop_sequence, *record_metadata)
|
||||
)
|
||||
|
34634
tests/resources/test_msa_transl.aln
Normal file
34634
tests/resources/test_msa_transl.aln
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user