pub mod common;
use crate::common::compute_no_truncate;
use ggca::{adjustment::AdjustmentMethod, correlation::CorrelationMethod};
const DF1_PATH: &str = "tests/small_files/mRNA_with_NaNs.csv"; const DF2_PATH: &str = "tests/small_files/miRNA_with_NaNs.csv";
const TOTAL_COMBINATIONS_EVALUATED: usize = 90;
#[test]
fn nans_not_panic() {
let is_all_vs_all = true;
let collect_gem_dataset = Some(true);
let (result, number_of_elements_evaluated) = compute_no_truncate(
DF1_PATH.to_string(),
DF2_PATH.to_string(),
CorrelationMethod::Pearson,
0.0, 2_000_000,
AdjustmentMethod::BenjaminiHochberg,
is_all_vs_all,
collect_gem_dataset,
);
assert_eq!(number_of_elements_evaluated, TOTAL_COMBINATIONS_EVALUATED);
assert!(result
.iter()
.find(|elem| elem.gem == "hsa-miR-21*")
.is_none())
}