#![allow(
clippy::too_many_arguments,
clippy::type_complexity,
clippy::needless_range_loop,
clippy::large_enum_variant
)]
mod broad_rt;
pub mod calibrate;
pub mod cell_evidence;
pub mod database;
pub mod decoy;
pub mod digest;
pub mod group;
pub mod im;
mod im_cache;
pub mod input;
pub mod joint;
pub mod long_input;
pub mod mass;
pub mod matching;
pub mod protein;
pub mod quant;
pub mod rt;
pub mod rt_cache;
pub mod rt_cnn;
pub mod rt_mlp;
pub mod score;
pub use calibrate::Calibration;
pub use database::{DigestConfig, PeptideDb, TheoPeptide};
pub use im::{im_features, ImModel, IM_N_FEATURES};
pub use input::{Feature, FeatureMatrix};
pub use matching::{match_features, match_features_topk, MatchConfig, Pfm};
pub use protein::{ProteinConfig, ProteinId};
pub use rt::{rt_features, RtModel, RT_N_FEATURES};
pub use rt_cnn::RtCnn;
pub use rt_mlp::RtMlp;
pub use score::{score, ScoreConfig, ScoreResult};
pub fn seed_mix(seed: u64) -> u64 {
if seed == 0 {
return 0;
}
let mut z = seed.wrapping_add(0x9e37_79b9_7f4a_7c15);
z = (z ^ (z >> 30)).wrapping_mul(0xbf58_476d_1ce4_e5b9);
z = (z ^ (z >> 27)).wrapping_mul(0x94d0_49bb_1331_11eb);
z ^ (z >> 31)
}
#[cfg(test)]
pub(crate) fn test_input(rel: &str) -> Option<std::path::PathBuf> {
let root = std::path::Path::new(env!("CARGO_MANIFEST_DIR"))
.parent()
.and_then(|p| p.parent())
.expect("crates/uno-core -> repo root");
let p = root.join(rel);
if p.exists() {
return Some(p);
}
if std::env::var("UNO_REQUIRE_TEST_DATA").as_deref() == Ok("1") {
panic!(
"UNO_REQUIRE_TEST_DATA=1 but test input is missing: {}",
p.display()
);
}
eprintln!(
"SKIP: test input not present: {} (set UNO_REQUIRE_TEST_DATA=1 to make this a failure)",
p.display()
);
None
}