Skip to content

Commit

Permalink
fix: off-by-one positions on clinvar-minimal import (#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
holtgrewe committed Sep 6, 2024
1 parent 57f4ff7 commit 5c05c2f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/clinvar_minimal/cli/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ fn jsonl_import(
let sequence_location = sequence_location.expect("sequence_location is required");
let crate::pbs::clinvar_data::clinvar_public::location::SequenceLocation {
chr,
start,
position_vcf,
reference_allele_vcf,
alternate_allele_vcf,
..
Expand All @@ -84,12 +84,12 @@ fn jsonl_import(
crate::pbs::clinvar_data::clinvar_public::Chromosome::try_from(chr).map_err(|e| {
anyhow::anyhow!("problem converting chromosome {} to Chromosome: {}", chr, e)
})?;
if let (Some(start), Some(reference_allele_vcf), Some(alternate_allele_vcf)) =
(start, reference_allele_vcf, alternate_allele_vcf)
if let (Some(position_vcf), Some(reference_allele_vcf), Some(alternate_allele_vcf)) =
(position_vcf, reference_allele_vcf, alternate_allele_vcf)
{
let var = keys::Var::from(
&chr_pb.as_chr_name(),
start as i32,
position_vcf as i32,
&reference_allele_vcf,
&alternate_allele_vcf,
);
Expand Down
2 changes: 1 addition & 1 deletion src/clinvar_minimal/cli/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ pub fn query_for_accession(

/// Implementation of `tsv query` sub command.
pub fn run(common: &common::cli::Args, args: &Args) -> Result<(), anyhow::Error> {
tracing::info!("Starting 'gnomad-mtdna query' command");
tracing::info!("Starting 'clinvar-minimal query' command");
tracing::info!("common = {:#?}", &common);
tracing::info!("args = {:#?}", &args);

Expand Down

0 comments on commit 5c05c2f

Please sign in to comment.