Function intspan::term_to_tax_id
source · [−]Expand description
Convert terms to Taxonomy IDs Accepted forms: ID; “scientific name”; scientific_name
let path = std::path::PathBuf::from("tests/nwr/");
let conn = intspan::connect_txdb(&path).unwrap();
let id = intspan::term_to_tax_id(&conn, "10239".to_string()).unwrap();
assert_eq!(id, 10239);
let id = intspan::term_to_tax_id(&conn, "Viruses".to_string()).unwrap();
assert_eq!(id, 10239);
let id = intspan::term_to_tax_id(&conn, "Lactobacillus phage mv4".to_string()).unwrap();
assert_eq!(id, 12392);
let id = intspan::term_to_tax_id(&conn, "Lactobacillus_phage_mv4".to_string()).unwrap();
assert_eq!(id, 12392);