Skip to content

Commit

Permalink
Adding failing test case
Browse files Browse the repository at this point in the history
  • Loading branch information
xiamaz committed Oct 5, 2023
1 parent 7e94b86 commit 406c707
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/annotate/seqvars/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1699,4 +1699,39 @@ mod test {

Ok(())
}

/// Mitochondnrial variants called by the DRAGEN v310 germline caller have special format
/// considerations.
///
/// See: https://support-docs.illumina.com/SW/DRAGEN_v310/Content/SW/DRAGEN/MitochondrialCalling.htm
#[test]
fn test_dragen_mitochondrial_variant() -> Result<(), anyhow::Error> {
let temp = TempDir::default();
let path_out = temp.join("output.tsv");

let args_common = crate::common::Args {
verbose: Verbosity::new(0, 1),
};
let args = Args {
genome_release: None,
path_db: String::from("tests/data/annotate/db"),
path_input_vcf: String::from("tests/data/db/create/mitochondrial_variants.vcf"),
output: PathOutput {
path_output_vcf: None,
path_output_tsv: Some(path_out.into_os_string().into_string().unwrap()),
},
max_var_count: None,
path_input_ped: Some(String::from(
"tests/data/db/create/mitochondrial_variants.ped",
)),
};

run(&args_common, &args)?;

let actual = std::fs::read_to_string(args.output.path_output_tsv.unwrap())?;
let expected = std::fs::read_to_string("tests/data/db/create/badly_formed_vcf_entry.tsv")?;
assert_eq!(&expected, &actual);

Ok(())
}
}
3 changes: 3 additions & 0 deletions tests/data/db/create/mitochondrial_variants.ped
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/data/db/create/mitochondrial_variants.vcf
Git LFS file not shown

0 comments on commit 406c707

Please sign in to comment.