use lazy_static::lazy_static;
use std::fmt;
pub mod count;
pub mod lookup;
pub mod progress;
pub mod report;
pub mod search;
pub mod utils;
const GOAT_URL_BASE: &str = "https://goat.genomehubs.org/api/";
const GOAT_API_VERSION: &str = "v2/";
lazy_static! {
pub static ref GOAT_URL: String = format!("{}{}", GOAT_URL_BASE, GOAT_API_VERSION);
pub static ref TAXONOMY: String = "ncbi".into();
}
lazy_static! {
pub static ref UPPER_CLI_SIZE_LIMIT: usize = 50000;
pub static ref UPPER_CLI_FILE_LIMIT: usize = 500;
}
#[derive(Clone, Copy, Debug)]
pub enum IndexType {
Taxon,
Assembly,
}
impl fmt::Display for IndexType {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
IndexType::Taxon => write!(f, "taxon"),
IndexType::Assembly => write!(f, "assembly"),
}
}
}
#[derive(Default, Clone, Copy)]
pub enum TaxType {
#[default]
Tree,
Name,
Lineage,
}
impl fmt::Display for TaxType {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
TaxType::Tree => write!(f, "tax_tree"),
TaxType::Name => write!(f, "tax_name"),
TaxType::Lineage => write!(f, "tax_lineage"),
}
}
}