Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris7 committed Nov 4, 2024
1 parent 51f4aca commit af06c64
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/updates/vcf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ pub fn update_with_vcf<'a>(
let mut ref_start = (record.variant_start().unwrap().unwrap().get() - 1) as i64;
if gt.allele != 0 {
let mut alt_seq = alt_alleles[chromosome_index - 1];
// If the alt sequence is a deletion, we want to remove the base in common in the VCF spec.
// So if VCF says ATC -> A, we don't want to include the `A` in the alt_seq.
if alt_seq != "*" && alt_seq.len() < ref_seq.len() {
ref_start += 1;
alt_seq = &alt_seq[1..];
Expand Down

0 comments on commit af06c64

Please sign in to comment.