Skip to content

Commit

Permalink
make gap more costly than mutations in the aligner
Browse files Browse the repository at this point in the history
  • Loading branch information
Donaim committed Jun 23, 2023
1 parent c0c41b5 commit 3cf1ee5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
4 changes: 4 additions & 0 deletions intact/intact.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,10 @@ def small_frames(

aligner = Align.PairwiseAligner()
aligner.mode = 'global'
aligner.match_score = 2
aligner.mismatch_score = -1
aligner.open_gap_score = -1.5
aligner.extend_gap_score = -0.2

def translate(seq, frame = 0, to_stop = False):
for_translation = seq[frame:]
Expand Down
9 changes: 2 additions & 7 deletions tests/expected-results-large/errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
{
"sequence_name": "KX505501.1",
"error": "FrameshiftInOrf",
"message": "Smaller ORF tat_exon2 at 8375-8468 contains out of frame indels that impact 80 positions."
"message": "Smaller ORF tat_exon2 at 8375-8468 contains out of frame indels that impact 51 positions."
},
{
"sequence_name": "KX505501.1",
Expand Down Expand Up @@ -94,11 +94,6 @@
"error": "InternalStopInOrf",
"message": "Smaller ORF tat_exon1 at 5829-6044 contains an internal stop codon"
},
{
"sequence_name": "MN692074",
"error": "FrameshiftInOrf",
"message": "Smaller ORF rev_exon1 at 5968-6044 contains out of frame indels that impact 51 positions."
},
{
"sequence_name": "MN692074",
"error": "InsertionInOrf",
Expand All @@ -107,7 +102,7 @@
{
"sequence_name": "MN692074",
"error": "FrameshiftInOrf",
"message": "Smaller ORF tat_exon2 at 8375-8468 contains out of frame indels that impact 81 positions."
"message": "Smaller ORF tat_exon2 at 8375-8468 contains out of frame indels that impact 85 positions."
},
{
"sequence_name": "MN692074",
Expand Down
9 changes: 2 additions & 7 deletions tests/expected-results-small/errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
{
"sequence_name": "KX505501.1",
"error": "FrameshiftInOrf",
"message": "Smaller ORF tat_exon2 at 8375-8468 contains out of frame indels that impact 80 positions."
"message": "Smaller ORF tat_exon2 at 8375-8468 contains out of frame indels that impact 51 positions."
},
{
"sequence_name": "KX505501.1",
Expand Down Expand Up @@ -94,11 +94,6 @@
"error": "InternalStopInOrf",
"message": "Smaller ORF tat_exon1 at 5829-6044 contains an internal stop codon"
},
{
"sequence_name": "MN692074",
"error": "FrameshiftInOrf",
"message": "Smaller ORF rev_exon1 at 5968-6044 contains out of frame indels that impact 51 positions."
},
{
"sequence_name": "MN692074",
"error": "InsertionInOrf",
Expand All @@ -107,7 +102,7 @@
{
"sequence_name": "MN692074",
"error": "FrameshiftInOrf",
"message": "Smaller ORF tat_exon2 at 8375-8468 contains out of frame indels that impact 81 positions."
"message": "Smaller ORF tat_exon2 at 8375-8468 contains out of frame indels that impact 85 positions."
},
{
"sequence_name": "MN692074",
Expand Down

0 comments on commit 3cf1ee5

Please sign in to comment.