Completed translation mechanism

This commit is contained in:
Harrison Deng 2023-03-28 15:56:50 -05:00
parent 03d87a670f
commit 0c5f188b80
2 changed files with 34641 additions and 4 deletions

View File

@ -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)
)

File diff suppressed because it is too large Load Diff