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(AminoAcidPattern query,
java.lang.String currentSequence,
AminoAcidPattern.MatchingType matchingType,
java.lang.Double massTolerance,
boolean limitXs)
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(AminoAcidPattern query, java.lang.String currentSequence, AminoAcidPattern.MatchingType matchingType, java.lang.Double massTolerance, boolean limitXs) throws java.io.IOException, java.lang.InterruptedException, java.lang.ClassNotFoundException
query - the given amino acid pattern to query the treecurrentSequence - the sequence found until nowmatchingType - the matching typemassTolerance - the mass tolerance for matching type
'indistiguishibleAminoAcids'. Can be null otherwiselimitXs - if true the share of Xs in the peptide sequences will be limited in order to increase sequencing speed.java.io.IOExceptionjava.lang.InterruptedExceptionjava.lang.ClassNotFoundExceptionpublic 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.IOExceptionjava.lang.IllegalArgumentExceptionjava.lang.InterruptedExceptionjava.lang.ClassNotFoundExceptionpublic 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.IOExceptionpublic Node getSubNode(java.lang.String sequence)
sequence - the amino acid sequenceCopyright © 2014. All Rights Reserved.