public class ProteinTree
extends java.lang.Object
Constructor and Description |
---|
ProteinTree(java.io.File indexFolder,
int memoryAllocation)
Creates a tree based on the proteins present in the sequence factory.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes all connections to files.
|
java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>> |
getProteinMapping(java.lang.String peptideSequence)
Returns the protein mapping in the sequence factory for the given peptide
sequence.
|
void |
initiateTree(int initialTagSize,
int maxNodeSize,
Enzyme enzyme,
WaitingHandler waitingHandler)
Initiates the tree.
|
void |
initiateTree(int initialTagSize,
int maxNodeSize,
WaitingHandler waitingHandler)
Initiates the tree.
|
public ProteinTree(java.io.File indexFolder, int memoryAllocation)
indexFolder
- the folder where to store the database tree. If null
the tree will be kept in memorymemoryAllocation
- the number of GB available for the tree in
memory.public void initiateTree(int initialTagSize, int maxNodeSize, WaitingHandler waitingHandler) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.InterruptedException, java.lang.ClassNotFoundException
maxNodeSize
- the maximal size of a node. large nodes will be fast
to initiate but slow to query. I typically use 5000.waitingHandler
- the waiting handler used to display progress to the
user. Can be null but strongly recommended :)java.io.IOException
java.lang.IllegalArgumentException
java.lang.InterruptedException
java.lang.ClassNotFoundException
public void initiateTree(int initialTagSize, int maxNodeSize, Enzyme enzyme, WaitingHandler waitingHandler) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.InterruptedException, java.io.IOException, java.lang.IllegalArgumentException, java.lang.InterruptedException, java.lang.ClassNotFoundException
initialTagSize
- the initial size of peptide tag. Large initial size
are slow to query, low initial size are slow to initiate. I typically use
3 for databases containing less than 100 000 proteins.maxNodeSize
- the maximal size of a node. large nodes will be fast
to initiate but slow to query. I typically use 5000.enzyme
- the enzyme used to select peptides. If null all possible
peptides will be indexed (takes more memory)waitingHandler
- the waiting handler used to display progress to the
user. Can be null.java.io.IOException
java.lang.IllegalArgumentException
java.lang.InterruptedException
java.lang.ClassNotFoundException
public java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>> getProteinMapping(java.lang.String peptideSequence) throws java.io.IOException, java.lang.InterruptedException, java.lang.ClassNotFoundException
peptideSequence
- the peptide sequencejava.io.IOException
java.lang.InterruptedException
java.lang.ClassNotFoundException
public void close()
Copyright © 2013. All Rights Reserved.