Skip to content

Commit

Permalink
rename cdi -> cdr3
Browse files Browse the repository at this point in the history
  • Loading branch information
10xerik committed Mar 14, 2024
1 parent d1252d0 commit 814f05b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions vdj_ann/src/annotate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2700,15 +2700,15 @@ pub fn get_cdr3(contig: &DnaStringSlice) -> Vec<CDR3Annotation> {
// Only return cdr3s having the maximum score.
let max_score = found_cdr3s
.iter()
.map(|cdi| cdi.left_flank_score + cdi.right_flank_score)
.map(|cdr3| cdr3.left_flank_score + cdr3.right_flank_score)
.max()
.unwrap_or(0);
let to_delete = found_cdr3s
.iter()
.map(|cdi| cdi.left_flank_score + cdi.right_flank_score < max_score)
.map(|cdr3| cdr3.left_flank_score + cdr3.right_flank_score < max_score)
.collect::<Vec<_>>();
erase_if(&mut found_cdr3s, &to_delete);
found_cdr3s.sort_by_key(|cdi| cdi.start_position_on_contig);
found_cdr3s.sort_by_key(|cdr3| cdr3.start_position_on_contig);

// Prefer later start and prefer longer CDR3.
if found_cdr3s.len() > 1 {
Expand Down

0 comments on commit 814f05b

Please sign in to comment.