public class Node extends Object implements 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,
HashMap<String,ArrayList<Integer>> accessions)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addAccession(String accession,
ArrayList<Integer> indexes)
Adds an accession to the node.
|
void |
clearAccessions()
Clears the accessions of this node.
|
HashMap<String,ArrayList<Integer>> |
getAccessions()
Returns the accessions attribute.
|
HashMap<String,ArrayList<Integer>> |
getAllMappings()
Returns all the protein mapping of the node.
|
int |
getDepth()
Returns the depth of the node in the tree.
|
HashMap<String,HashMap<String,ArrayList<Integer>>> |
getProteinMapping(AminoAcidSequence query,
String currentSequence,
SequenceMatchingPreferences sequenceMatchingPreferences)
Returns the protein mappings for the given peptide sequence.
|
long |
getSize()
Returns the size of the node in accession*tag.
|
Node |
getSubNode(String sequence)
Returns the subnode associated to an amino acid sequence.
|
HashMap<Character,Node> |
getSubtree()
Returns the subtree.
|
HashMap<String,ArrayList<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 HashMap<String,HashMap<String,ArrayList<Integer>>> getProteinMapping(AminoAcidSequence query, String currentSequence, SequenceMatchingPreferences sequenceMatchingPreferences) throws IOException, InterruptedException, ClassNotFoundException
query
- the given amino acid sequence to query the treecurrentSequence
- the sequence found until nowsequenceMatchingPreferences
- the sequence matching preferencesIOException
- if an IOException occursClassNotFoundException
- if a ClassNotFoundException occursInterruptedException
- if an InterruptedException occurspublic boolean splitNode(int maxNodeSize, int maxDepth) throws IOException, IllegalArgumentException, InterruptedException, ClassNotFoundException
maxNodeSize
- the maximal node size allowed when splittingmaxDepth
- the maximum depthIOException
- if an IOException occursClassNotFoundException
- if a ClassNotFoundException occursInterruptedException
- if an InterruptedException occursIllegalArgumentException
- if an IllegalArgumentException occurspublic void addAccession(String accession, ArrayList<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 HashMap<String,ArrayList<Integer>> getAccessions()
public HashMap<String,ArrayList<Integer>> getTermini()
public HashMap<Character,Node> getSubtree()
public void clearAccessions()
public boolean isEmpty()
public int getDepth()
public HashMap<String,ArrayList<Integer>> getAllMappings() throws IOException
IOException
- if an IOException occursCopyright © 2016. All rights reserved.