public class ProteinTree extends Object
Constructor and Description |
---|
ProteinTree(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.
|
HashMap<String,ArrayList<Integer>> |
getProteinMapping(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(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 IOException, IllegalArgumentException, InterruptedException, 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 :)IOException
IllegalArgumentException
InterruptedException
ClassNotFoundException
public void initiateTree(int initialTagSize, int maxNodeSize, Enzyme enzyme, WaitingHandler waitingHandler) throws IOException, IllegalArgumentException, InterruptedException, IOException, IllegalArgumentException, InterruptedException, 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.IOException
IllegalArgumentException
InterruptedException
ClassNotFoundException
public HashMap<String,ArrayList<Integer>> getProteinMapping(String peptideSequence) throws IOException, InterruptedException, ClassNotFoundException
peptideSequence
- the peptide sequenceIOException
InterruptedException
ClassNotFoundException
public void close()
Copyright © 2013. All Rights Reserved.