public class ProteinTree
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
ProteinTree.PeptideIterator
Alphabetical iterator for the tree.
|
Modifier and Type | Field and Description |
---|---|
static int |
proteinBatchSize
The number of proteins which should be imported at a time.
|
static java.lang.String |
version
The version of the protein tree.
|
Constructor and Description |
---|
ProteinTree(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.
|
void |
emptyCache()
Empties the cache.
|
int |
getCacheSize()
Returns the size of the cache used for peptide mappings (note that there
are two of them).
|
java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>> |
getMatchedPeptideSequences(java.lang.String peptideSequence,
java.lang.String proteinAccession,
ProteinMatch.MatchingType matchingType,
java.lang.Double massTolerance)
Returns a list of peptides matched using the given peptide sequence in
the given protein according the provided matching settings.
|
ProteinTree.PeptideIterator |
getPeptideIterator()
Returns a PeptideIterator which iterates alphabetically all peptides
corresponding to the end of a branch in the tree.
|
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 based on string matching only.
|
java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>>> |
getProteinMapping(java.lang.String peptideSequence,
ProteinMatch.MatchingType matchingType,
java.lang.Double massTolerance)
Returns the protein mapping in the sequence factory for the given peptide
sequence.
|
void |
initiateTree(int initialTagSize,
int maxNodeSize,
int maxPeptideSize,
Enzyme enzyme,
WaitingHandler waitingHandler,
boolean printExpectedImportTime,
boolean displayProgress)
Initiates the tree.
|
void |
initiateTree(int initialTagSize,
int maxNodeSize,
int maxPeptideSize,
WaitingHandler waitingHandler,
boolean printExpectedImportTime,
boolean displayProgress)
Initiates the tree.
|
void |
setCacheSize(int cacheSize)
Sets the size of the cache used for peptide mappings (note that there are
two of them).
|
public static final java.lang.String version
public static final int proteinBatchSize
public ProteinTree(int memoryAllocation) throws java.io.IOException
memoryAllocation
- the number of MB available for the tree in
memory.java.io.IOException
public void initiateTree(int initialTagSize, int maxNodeSize, int maxPeptideSize, WaitingHandler waitingHandler, boolean printExpectedImportTime, boolean displayProgress) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.InterruptedException, java.lang.ClassNotFoundException, java.sql.SQLException
initialTagSize
- the initial tag sizemaxNodeSize
- the maximal size of a node. large nodes will be fast
to initiate but slow to query. I typically use 500 giving an approximate
query time <20ms.maxPeptideSize
- the maximum peptide sizewaitingHandler
- the waiting handler used to display progress to the
user. Can be null but strongly recommended :)printExpectedImportTime
- if true the expected import time will be
printed to the waiting handlerdisplayProgress
- display progressjava.io.IOException
java.lang.IllegalArgumentException
java.lang.InterruptedException
java.lang.ClassNotFoundException
java.sql.SQLException
public void initiateTree(int initialTagSize, int maxNodeSize, int maxPeptideSize, Enzyme enzyme, WaitingHandler waitingHandler, boolean printExpectedImportTime, boolean displayProgress) throws java.io.IOException, java.lang.IllegalArgumentException, java.lang.InterruptedException, java.io.IOException, java.lang.IllegalArgumentException, java.lang.InterruptedException, java.lang.ClassNotFoundException, java.sql.SQLException
initialTagSize
- the initial size of peptide tag. Large initial size
are fast to query, low initial size are fast to initiate. I typically use
3 for databases containing less than 100 000 proteins giving an
approximate initiation time of 60ms per accession.maxNodeSize
- the maximal size of a node. large nodes will be fast
to initiate but slow to query. I typically use 500 giving an approximate
query time <20ms.maxPeptideSize
- the maximum peptide sizeenzyme
- the enzyme used to select peptides. If null all possible
peptides will be indexedwaitingHandler
- the waiting handler used to display progress to the
user. Can be null.printExpectedImportTime
- if true the expected import time will be
printed to the waiting handlerdisplayProgress
- display progressjava.io.IOException
java.lang.IllegalArgumentException
java.lang.InterruptedException
java.lang.ClassNotFoundException
java.sql.SQLException
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, java.sql.SQLException
peptideSequence
- the peptide sequencejava.io.IOException
java.lang.InterruptedException
java.lang.ClassNotFoundException
java.sql.SQLException
public java.util.HashMap<java.lang.String,java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>>> getProteinMapping(java.lang.String peptideSequence, ProteinMatch.MatchingType matchingType, java.lang.Double massTolerance) throws java.io.IOException, java.lang.InterruptedException, java.lang.ClassNotFoundException, java.sql.SQLException
peptideSequence
- the peptide sequencematchingType
- the matching typemassTolerance
- the mass tolerance for matching type
'indistiguishibleAminoAcids'. Can be null otherwisejava.io.IOException
java.lang.InterruptedException
java.lang.ClassNotFoundException
java.sql.SQLException
public void close() throws java.io.IOException, java.sql.SQLException
java.io.IOException
java.sql.SQLException
public int getCacheSize()
public void setCacheSize(int cacheSize)
cacheSize
- the size of the cache used for peptide mappingspublic void emptyCache()
public java.util.HashMap<java.lang.String,java.util.ArrayList<java.lang.Integer>> getMatchedPeptideSequences(java.lang.String peptideSequence, java.lang.String proteinAccession, ProteinMatch.MatchingType matchingType, java.lang.Double massTolerance) throws java.io.IOException, java.lang.InterruptedException, java.lang.ClassNotFoundException, java.sql.SQLException
peptideSequence
- the original peptide sequenceproteinAccession
- the accession of the protein of interestmatchingType
- the matching typemassTolerance
- the mass tolerance for indistinguishable amino acids
matching modejava.io.IOException
java.lang.InterruptedException
java.sql.SQLException
java.lang.ClassNotFoundException
public ProteinTree.PeptideIterator getPeptideIterator() throws java.sql.SQLException, java.io.IOException, java.lang.ClassNotFoundException
java.sql.SQLException
java.io.IOException
java.lang.ClassNotFoundException
Copyright © 2013. All Rights Reserved.