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(AminoAcidPattern query,
String currentSequence,
AminoAcidPattern.MatchingType matchingType,
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(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(AminoAcidPattern query, String currentSequence, AminoAcidPattern.MatchingType matchingType, Double massTolerance, boolean limitXs) throws IOException, InterruptedException, 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.IOException
InterruptedException
ClassNotFoundException
public boolean splitNode(int maxNodeSize, int maxDepth) throws IOException, IllegalArgumentException, InterruptedException, ClassNotFoundException
maxNodeSize
- the maximal node size allowed when splittingmaxDepth
- the maximum depthIOException
IllegalArgumentException
InterruptedException
ClassNotFoundException
public 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
Copyright © 2014. All Rights Reserved.