public class SpeciesDictionary
extends java.lang.Object
Contains a collection of species, with scientific name, NCBI and TOL code.
Constructor and Description |
---|
SpeciesDictionary()
Simple constructor, need to fill tables independantly
|
Modifier and Type | Method and Description |
---|---|
void |
addSpecies(java.lang.String c,
java.lang.String s,
java.lang.String n)
Add a new species in the dictionary
|
java.util.Vector |
containsScientificNameList(java.lang.String prefix)
Get species list containing a parameter prefix, regarding the scientific full name
|
java.lang.String |
get5LettersCode(java.lang.String c)
Get the 5 letters code from the numerical code
|
java.lang.String |
getNumericalCode(java.lang.String c)
Get the numerical code from the 5 letters code
|
java.lang.String |
getScientificName(java.lang.String c)
Get the scientific name from the 5 letters code
|
java.lang.String |
getScientificNameFromNumerical(java.lang.String n)
Get the scientific name from the 5 letters code
|
boolean |
isCompatible(java.lang.String taxonParam,
java.util.Hashtable allowedConstraints,
java.util.Hashtable forbiddenConstraints)
Test if a taxon is compatible with a constraint list, regarding a species tree
|
boolean |
isCompatible(Tree treeParam,
java.util.Hashtable allowedConstraints,
java.util.Hashtable forbiddenConstraints)
Test if a all taxa of a gene tree is compatible with a constraint list, regarding a species tree
|
java.lang.String |
next()
Get the next species in the iterator
|
void |
parseSpeciesDico(java.io.File speciesFile)
Parse a dico file to fill this dictionary
|
java.util.Vector |
prefixList(java.lang.String prefix)
Get species list containing a parameter prefix
|
java.util.Vector |
prefixScientificNameList(java.lang.String prefix)
Get species list containing a parameter prefix, regarding the scientific full name
|
void |
setSpeciesTree(Tree speciesTree)
Link a species tree to a dictionnary
|
void |
start()
Starts the iterator
|
public SpeciesDictionary()
public void addSpecies(java.lang.String c, java.lang.String s, java.lang.String n)
c
- The 5 letters string, coding for speciess
- The scientific namen
- The numerical codepublic java.lang.String getNumericalCode(java.lang.String c)
c
- The 5 letters string, coding for speciespublic java.lang.String getScientificName(java.lang.String c)
c
- The 5 letters string, coding for speciespublic java.lang.String get5LettersCode(java.lang.String c)
c
- The numerical code of the species cpublic java.lang.String getScientificNameFromNumerical(java.lang.String n)
c
- The numerical code, coding for speciespublic java.util.Vector prefixList(java.lang.String prefix)
prefix
- The prefixpublic java.util.Vector prefixScientificNameList(java.lang.String prefix)
prefix
- The prefixpublic java.util.Vector containsScientificNameList(java.lang.String prefix)
prefix
- The prefixpublic boolean isCompatible(java.lang.String taxonParam, java.util.Hashtable allowedConstraints, java.util.Hashtable forbiddenConstraints)
taxonParam
- The taxon to fit in constraintsallowedConstraints
- The table of positive constraintsforbiddenConstraints
- The table of positive constraintsspeciesTree
- The reference species treepublic boolean isCompatible(Tree treeParam, java.util.Hashtable allowedConstraints, java.util.Hashtable forbiddenConstraints)
taxonParam
- The taxon to fit in constraintsallowedConstraints
- The table of positive constraintsforbiddenConstraints
- The table of positive constraintsspeciesTree
- The reference species treepublic void start()
public void setSpeciesTree(Tree speciesTree)
the
- species tree valuepublic void parseSpeciesDico(java.io.File speciesFile)
the
- species dictionarypublic java.lang.String next()