Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Fix underflow in fr3 computation #251

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion vdj_ann/src/vdj_features.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,8 @@ pub fn fr3_start(aa: &[u8], chain_type: &str, verbose: bool) -> Option<usize> {

// Score positions.

if cdr3_start < 35 {
if cdr3_start < 38 {
// Avoid underflow due to the subtraction towards the end of this function
return None;
}
let mut score_pos = Vec::<(usize, usize)>::with_capacity(35 - 28 + 1);
Expand Down