Skip to content

Commit

Permalink
added testcases for BRCA2 ZAR1L annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
tedil committed Mar 26, 2024
1 parent 6f36066 commit 2b9b0ae
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
39 changes: 39 additions & 0 deletions src/annotate/seqvars/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1865,4 +1865,43 @@ mod test {

Ok(())
}

/// Test corresponding to https://github.com/varfish-org/mehari/issues/409
///
/// Note that we currently re-use the GRCh37 databases in
/// `tests/data/annotate/db/grch37` for GRCh38 via symlink. As the below
/// only is a smoke test, this is sufficient. However, for other tests,
/// this will pose a problem.
#[test]
fn test_brca2_zar1l_affected() -> 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,
report_all_transcripts: true,
transcript_source: TranscriptSource::Both,
transcript_picking: false,
path_db: String::from("tests/data/annotate/db"),
path_input_vcf: String::from("tests/data/annotate/seqvars/brca2_zar1l/brca2_zar1l.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: String::from("tests/data/annotate/seqvars/brca2_zar1l/brca2_zar1l.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/annotate/seqvars/brca2_zar1l/brca2_zar1l.tsv")?;
assert_eq!(&expected, &actual);

Ok(())
}
}
3 changes: 3 additions & 0 deletions tests/data/annotate/seqvars/brca2_zar1l/brca2_zar1l.ped
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/data/annotate/seqvars/brca2_zar1l/brca2_zar1l.tsv
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/data/annotate/seqvars/brca2_zar1l/brca2_zar1l.vcf
Git LFS file not shown

0 comments on commit 2b9b0ae

Please sign in to comment.