softparsmap
Class DataSourceXmlNcbiTaxonomy

java.lang.Object
  extended byooc.LinkedTagInstance
      extended bysoftparsmap.AbstractDataSource
          extended bysoftparsmap.DataSourceXmlNcbiTaxonomy
All Implemented Interfaces:
DataSource, Dependencies

public class DataSourceXmlNcbiTaxonomy
extends AbstractDataSource

This data source can be used when the sequence database is an XML document. NCBI Taxonomy is used to extract species tree information. It is necessary to construct an index file before using it in different tasks. Run it without arguments to see usage. See the def.xml file for more information.


Constructor Summary
DataSourceXmlNcbiTaxonomy()
           
 
Method Summary
 java.lang.String getNcbiNamesColumn(SpeciesNode n, int column)
           
 java.lang.Integer getNcbiTagId(SpeciesNode n)
           
 SequenceData getSequenceData(GeneLeaf leaf)
          Returns an instance that implements the interface SequenceData for a given gene leaf.
 java.lang.String getSpeciesName(SpeciesNode species)
          Returns the name of the species for a given species node.
 SpeciesNode getSpeciesTree(GeneNode geneTree)
          Returns the root to a species tree such that all genes found in the gene tree exist in this species tree.
 void initiate()
          Called by the program ComputeFamilyGroup or ComputeFamilyGroupPair once if the method Compute.initiateDataSource() returns true, else it is not called at all.
static void main(java.lang.String[] args)
           
 
Methods inherited from class softparsmap.AbstractDataSource
getPropertyFile
 
Methods inherited from class ooc.LinkedTagInstance
containsKey, get, getAttribute, getAttributeBoolean, getAttributeDouble, getAttributeFloat, getAttributeInteger, getAttributeList, getAttributeRef, getAttributeShort, getAttributeString, getAttributeTag, getChildIterator, getChildIteratorByName, getContainer, getContainerTag, getFirstChildTagByName, getTag, getTagId, getTagInstance, getTagInstance, getTagRef, hasAttributeValue, hasChildTagByName, hasChildTags, hasTag, isMutable, keySet, put, remove, setTag, setupInstance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataSourceXmlNcbiTaxonomy

public DataSourceXmlNcbiTaxonomy()
Method Detail

initiate

public void initiate()
Description copied from interface: DataSource
Called by the program ComputeFamilyGroup or ComputeFamilyGroupPair once if the method Compute.initiateDataSource() returns true, else it is not called at all.


getSpeciesName

public java.lang.String getSpeciesName(SpeciesNode species)
Description copied from interface: DataSource
Returns the name of the species for a given species node.

Parameters:
species - is the species node.
Returns:
the name of the species that is associated with the species node
See Also:
SpeciesNode

getSpeciesTree

public SpeciesNode getSpeciesTree(GeneNode geneTree)
Description copied from interface: DataSource
Returns the root to a species tree such that all genes found in the gene tree exist in this species tree.

Parameters:
geneTree - the root of the gene tree
Returns:
the root to the species tree
See Also:
SpeciesNode, GeneNode

getSequenceData

public SequenceData getSequenceData(GeneLeaf leaf)
Description copied from interface: DataSource
Returns an instance that implements the interface SequenceData for a given gene leaf.

Parameters:
leaf - the gene leaf.
Returns:
an instance of SequenceData
See Also:
SequenceData

getNcbiTagId

public java.lang.Integer getNcbiTagId(SpeciesNode n)

getNcbiNamesColumn

public java.lang.String getNcbiNamesColumn(SpeciesNode n,
                                           int column)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception