Skip to content

Commit

Permalink
add new nodes with names from tsv files
Browse files Browse the repository at this point in the history
  • Loading branch information
rjchallis committed Dec 18, 2024
1 parent 346b111 commit 1199be2
Show file tree
Hide file tree
Showing 3 changed files with 369 additions and 129 deletions.
8 changes: 7 additions & 1 deletion rust/src/taxonomy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
//! `blobtk taxonomy <args>`
use anyhow;
use svg::node;

// use std::time::{Duration, Instant};

Expand Down Expand Up @@ -163,10 +164,15 @@ pub fn taxonomy(options: &cli::TaxonomyOptions) -> Result<(), anyhow::Error> {

if let Some(genomehubs_files) = options.genomehubs_files.clone() {
let id_map = build_fast_lookup(&nodes, &options.name_classes);
dbg!(nodes.nodes.len());
for genomehubs_file in genomehubs_files {
// match taxa to nodes
let names = parse_file(genomehubs_file, &id_map)?;
let new_nodes = parse_file(genomehubs_file, &id_map)?;
// add new nodes to existing nodes
dbg!(new_nodes.nodes.len());
nodes.merge(&new_nodes)?;
}
dbg!(nodes.nodes.len());
}

if let Some(taxdump_out) = options.out.clone() {
Expand Down
Loading

0 comments on commit 1199be2

Please sign in to comment.