Function intspan::get_lineage
source · [−]Expand description
All Nodes to the root (with ID 1)
let path = std::path::PathBuf::from("tests/nwr/");
let conn = intspan::connect_txdb(&path).unwrap();
let lineage = intspan::get_lineage(&conn, 12340).unwrap();
assert_eq!(lineage.get(0).unwrap().tax_id, 1);
assert_eq!(lineage.last().unwrap().tax_id, 12340);
assert_eq!(lineage.len(), 4);