|
|
@@ -177,7 +177,7 @@ mod tests {
|
|
|
|
|
|
use self::{collection::pod5::{FlowCellCase, Pod5Collection}, commands::dorado, config::Config};
|
|
|
use super::*;
|
|
|
- use crate::{annotation::Annotation, callers::{clairs::ClairS, deep_variant::DeepVariant, nanomonsv::{NanomonSV, NanomonSVSolo}, savana::SavanaCN}, collection::{bam, pod5::{scan_archive, FlowCells}, run_tasks, vcf::VcfCollection, Collections, CollectionsConfig, ShouldRun}, commands::dorado::Dorado, helpers::find_files, io::gff::features_ranges, pipes::somatic::const_stats, positions::{merge_overlapping_genome_ranges, range_intersection_par, sort_ranges}, scan::scan::somatic_scan, variant::{variant::AlterationCategory, variants_stats::{self, VariantsStats}}};
|
|
|
+ use crate::{annotation::Annotation, callers::{clairs::ClairS, deep_variant::DeepVariant, nanomonsv::{NanomonSV, NanomonSVSolo}, savana::SavanaCN}, collection::{bam, pod5::{scan_archive, FlowCells}, run_tasks, vcf::VcfCollection, Collections, CollectionsConfig, ShouldRun}, commands::dorado::Dorado, helpers::find_files, io::{dict::read_dict, gff::features_ranges}, pipes::somatic::const_stats, positions::{merge_overlapping_genome_ranges, range_intersection_par, sort_ranges}, scan::scan::somatic_scan, variant::{variant::AlterationCategory, variants_stats::{self, VariantsStats}}};
|
|
|
|
|
|
// export RUST_LOG="debug"
|
|
|
fn init() {
|
|
|
@@ -665,24 +665,24 @@ mod tests {
|
|
|
#[test]
|
|
|
fn pipe_somatic() -> anyhow::Result<()> {
|
|
|
init();
|
|
|
- let collections = Collections::new(
|
|
|
- CollectionsConfig::default()
|
|
|
- )?;
|
|
|
- for (a, _) in collections.bam_pairs().iter() {
|
|
|
- if a.id.as_str() != "PASSARD" {
|
|
|
- continue;
|
|
|
- }
|
|
|
- if let Err(e) = SomaticPipe::initialize(&a.id, Config::default()).map(|mut p| if p.should_run() {
|
|
|
- if let Err(e) = p.run() {
|
|
|
- error!("{e}");
|
|
|
- }
|
|
|
- }) {
|
|
|
- error!("{e}");
|
|
|
- }
|
|
|
- }
|
|
|
- Ok(())
|
|
|
- // let id = "ACHITE";
|
|
|
- // SomaticPipe::initialize(id, Config::default())?.run()
|
|
|
+ // let collections = Collections::new(
|
|
|
+ // CollectionsConfig::default()
|
|
|
+ // )?;
|
|
|
+ // for (a, _) in collections.bam_pairs().iter() {
|
|
|
+ // if a.id.as_str() != "CHAMPION" {
|
|
|
+ // continue;
|
|
|
+ // }
|
|
|
+ // if let Err(e) = SomaticPipe::initialize(&a.id, Config::default()).map(|mut p| if p.should_run() {
|
|
|
+ // if let Err(e) = p.run() {
|
|
|
+ // error!("{e}");
|
|
|
+ // }
|
|
|
+ // }) {
|
|
|
+ // error!("{e}");
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // Ok(())
|
|
|
+ let id = "ACHITE";
|
|
|
+ SomaticPipe::initialize(id, Config::default())?.run()
|
|
|
}
|
|
|
|
|
|
#[test]
|
|
|
@@ -713,6 +713,15 @@ mod tests {
|
|
|
Ok(())
|
|
|
}
|
|
|
|
|
|
+ #[test]
|
|
|
+ fn test_read_dict() -> anyhow::Result<()> {
|
|
|
+ init();
|
|
|
+ let genome = read_dict(&Config::default().dict_file)?;
|
|
|
+ let genome_length: usize = genome.into_iter().map(|(_, len)| len as usize).sum();
|
|
|
+ println!("{genome_length}");
|
|
|
+ Ok(())
|
|
|
+ }
|
|
|
+
|
|
|
#[test]
|
|
|
fn bases_at() -> anyhow::Result<()> {
|
|
|
init();
|