public class Node
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static int |
proteinBatchSize
The number of proteins which should be imported at a time.
|
Constructor and Description |
---|
Node(int depth)
Constructor.
|
Node(int depth,
java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>> accessions)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAccession(java.lang.String accession,
java.util.ArrayList<java.lang.Integer> indexes)
Adds an accession to the node.
|
void |
clearAccessions()
Clears the accessions of this node.
|
java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>> |
getAccessions()
Returns the accessions attribute.
|
java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>> |
getAllMappings()
Returns all the protein mapping of the node.
|
int |
getDepth()
Returns the depth of the node in the tree.
|
java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>>> |
getProteinMapping(java.lang.String peptideSequence,
ProteinMatch.MatchingType matchingType,
java.lang.Double massTolerance)
Returns the protein mappings for the given peptide sequence.
|
long |
getSize()
Returns the size of the node in accession*tag.
|
Node |
getSubNode(java.lang.String sequence)
Returns the subnode associated to an amino acid sequence.
|
java.util.HashMap<java.lang.Character,Node> |
getSubtree()
Returns the subtree.
|
java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>> |
getTermini()
Returns the terminal mappings (they are not in the subtree).
|
boolean |
isEmpty()
Indicates whether the node is empty.
|
boolean |
splitNode(int maxNodeSize,
int maxDepth)
Splits the node into subnode if its size is larger than the maxNodeSize
and does the same for every sub node.
|
public static final int proteinBatchSize
public Node(int depth)
depth
- the depth of the nodepublic Node(int depth, java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>> accessions)
depth
- the depth of the nodeaccessions
- the accessions of the nodepublic java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>>> getProteinMapping(java.lang.String peptideSequence, ProteinMatch.MatchingType matchingType, java.lang.Double massTolerance) throws java.io.IOException, java.lang.InterruptedException, java.lang.ClassNotFoundException
peptideSequence
- the given peptide sequencematchingType
- the matching typemassTolerance
- the mass tolerance for matching type
'indistiguishibleAminoAcids'. Can be null otherwisejava.io.IOException
java.lang.InterruptedException
java.lang.ClassNotFoundException
public boolean splitNode(int maxNodeSize, int maxDepth) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.InterruptedException, java.lang.ClassNotFoundException
maxNodeSize
- the maximal node size allowed when splittingmaxDepth
- the maximum depthjava.io.IOException
java.lang.IllegalArgumentException
java.lang.InterruptedException
java.lang.ClassNotFoundException
public void addAccession(java.lang.String accession, java.util.ArrayList<java.lang.Integer> indexes)
accession
- the accession to addindexes
- the indexes in this accession where the key can be found.
Any prior entry will be silently overwrittenpublic long getSize()
public java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>> getAccessions()
public java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>> getTermini()
public java.util.HashMap<java.lang.Character,Node> getSubtree()
public void clearAccessions()
public boolean isEmpty()
public int getDepth()
public java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>> getAllMappings() throws java.io.IOException
java.io.IOException
public Node getSubNode(java.lang.String sequence)
sequence
- the amino acid sequenceCopyright © 2013. All Rights Reserved.