Skip to content

Commit

Permalink
fix: Report 1-based position in vcf-report log messages (#231)
Browse files Browse the repository at this point in the history
  • Loading branch information
fxwiegand committed Jan 6, 2022
1 parent 2737b1e commit bcf6260
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/bcf/report/table_report/create_report_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -256,20 +256,22 @@ pub(crate) fn make_table_report(
{
hgvsg.0.to_owned()
} else {
warn!("Found variant {} at position {}:{} without HGVSg field for every given allele.", &id, &chrom, &pos);
warn!("Found variant {} at position {}:{} without HGVSg field for every given allele.", &id, &chrom, &pos + 1);
continue;
}
} else {
let mut unique_hgsvgs = hgvsgs.iter().map(|(_, b)| b).unique().collect_vec();
if unique_hgsvgs.len() > 1 {
warn!("Found variant {} at position {}:{} with multiple HGVSg values and only one alternative allele.", &id, &chrom, &pos);
warn!("Found variant {} at position {}:{} with multiple HGVSg values and only one alternative allele.", &id, &chrom, &pos + 1);
}
if let Some(hgvsg) = unique_hgsvgs.pop() {
hgvsg.to_owned()
} else {
warn!(
"Found variant {} at position {}:{} with no HGVSg value.",
&id, &chrom, &pos
&id,
&chrom,
&pos + 1
);
continue;
}
Expand Down

0 comments on commit bcf6260

Please sign in to comment.