Class TaxNodeSelection

java.lang.Object
org.metagene.genestrip.tax.TaxNodeSelection

public class TaxNodeSelection extends Object
What a taxids.txt amounts to: the tax ids a database is to hold, and the ones it was told to leave out.

The two travel together because they are read together and mean nothing apart. The selected set is what almost everything wants -- it is the database's content, the excluded ones having been subtracted from it already. The excluded set matters to one reader only, the least common ancestor update under GSConfigKey.UpdateScope.ALL_BUT_EXCLUDED, which skips the release's contigs of exactly these taxa. Leaving a branch out of a database and leaving it out of the reckoning are two different things, and this pair is what lets a goal say both at once instead of offering the second through a side door.

Both sets are completed down the tree, but not alike: the selected ones stop at the configured rank, the excluded ones do not, since leaving a branch out has to mean the whole branch.

  • Constructor Details

    • TaxNodeSelection

      public TaxNodeSelection(Set<TaxTree.TaxIdNode> selected, Set<TaxTree.TaxIdNode> excluded)
      Creates the pair.
      Parameters:
      selected - the tax ids the database is to hold, with the excluded ones already subtracted
      excluded - the tax ids taxids.txt struck out, with everything below them
  • Method Details

    • getSelected

      public Set<TaxTree.TaxIdNode> getSelected()
      Returns the tax ids the database is to hold.
      Returns:
      the selected tax ids, with their descendants and without the excluded ones
    • getExcluded

      public Set<TaxTree.TaxIdNode> getExcluded()
      Returns the tax ids that were struck out.
      Returns:
      the excluded tax ids, with everything below them; empty where nothing was struck out
    • toString

      public String toString()
      Overrides:
      toString in class Object