Skip to content

Commit

Permalink
add anydna_size
Browse files Browse the repository at this point in the history
  • Loading branch information
bluegenes committed Dec 17, 2024
1 parent d2eb732 commit f96e651
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/utils/buildutils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,13 @@ impl BuildCollection {
Ok(mf.records.len())
}

pub fn anydna_size(&self) -> Result<usize, SourmashError> {
let multiselection = MultiSelection::from_moltypes(vec!["DNA", "skipm1n3", "skipm2n3"])?;
let mut mf = self.manifest.clone();
mf.select(&multiselection)?;
Ok(mf.records.len())
}

pub fn protein_size(&self) -> Result<usize, SourmashError> {
let multiselection = MultiSelection::from_moltypes(vec!["protein"])?;
let mut mf = self.manifest.clone();
Expand Down

0 comments on commit f96e651

Please sign in to comment.