public class FMIndex extends Object implements PeptideMapper
Modifier and Type | Class and Description |
---|---|
class |
FMIndex.MassIndexMap
struct for building own data structure for mass to index mapping.
|
Modifier and Type | Field and Description |
---|---|
ArrayList<Integer> |
indexStringLengths
Length of the indexed string (all concatenated protein sequences).
|
ArrayList<int[]> |
lessTablesPrimary
Less table for doing an update step according to the LF step.
|
ArrayList<int[]> |
lessTablesReversed
Less table for doing an update step according to the LF step reversed.
|
ArrayList<WaveletTree> |
occurrenceTablesPrimary
Wavelet tree for storing the burrows wheeler transform.
|
ArrayList<WaveletTree> |
occurrenceTablesReversed
Wavelet tree for storing the burrows wheeler transform reversed.
|
Constructor and Description |
---|
FMIndex(WaitingHandler waitingHandler,
boolean displayProgress,
PeptideVariantsPreferences peptideVariantsPreferences,
SearchParameters searchParameters)
Constructor.
|
FMIndex(WaitingHandler waitingHandler,
boolean displayProgress,
PtmSettings ptmSettings,
PeptideVariantsPreferences peptideVariantsPreferences)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addPTMPattern(PTM ptm)
Adds a PTM pattern for bitwise pattern search.
|
boolean |
checkPTMPattern(PeptideProteinMapping peptideProteinMapping)
Checking if peptide-protein should be discarded due to pattern PTM conflict.
|
void |
close()
Closes all connections to files, tries to delete corrupted and deprecated
indexes.
|
double |
computeInverseMassValue(double currentMass,
double refMass)
Compute the inverse mass value.
|
int[] |
computeMappingRanges(double mass)
Compute mapping ranges.
|
double |
computeMassValue(double currentMass,
double refMass)
Compute the mass value.
|
void |
emptyCache()
Empties all caches.
|
long |
getAllocatedBytes()
Computes the number of allocated bytes.
|
ArrayList<PeptideProteinMapping> |
getProteinMapping(String peptide,
SequenceMatchingPreferences seqMatchPref)
Main method for mapping a peptide with all variants against all
registered proteins in the experiment.
|
ArrayList<PeptideProteinMapping> |
getProteinMapping(Tag tag,
TagMatcher tagMatcher,
SequenceMatchingPreferences sequenceMatchingPreferences)
Mapping tags against the proteome.
|
ArrayList<PeptideProteinMapping> |
getProteinMapping(Tag tag,
TagMatcher tagMatcher,
SequenceMatchingPreferences sequenceMatchingPreferences,
Double massTolerance)
Mapping tags against the proteome.
|
ArrayList<PeptideProteinMapping> |
getProteinMappingWithoutVariants(String peptide,
SequenceMatchingPreferences seqMatchPref,
int indexPart)
Exact mapping peptides against the proteome.
|
ArrayList<PeptideProteinMapping> |
getProteinMappingWithoutVariants(Tag tag,
TagMatcher tagMatcher,
SequenceMatchingPreferences sequenceMatchingPreferences,
int indexPart)
Mapping tags against proteome without variants.
|
ArrayList<PeptideProteinMapping> |
getProteinMappingWithVariants(Tag tag,
TagMatcher tagMatcher,
SequenceMatchingPreferences sequenceMatchingPreferences,
int indexPart)
Mapping tags against proteome with variants.
|
ArrayList<PeptideProteinMapping> |
getProteinMappingWithVariantsGeneric(String peptide,
SequenceMatchingPreferences seqMatchPref,
int indexPart)
Variant tolerant mapping peptides against the proteome.
|
ArrayList<PeptideProteinMapping> |
getProteinMappingWithVariantsSpecific(String peptide,
SequenceMatchingPreferences seqMatchPref,
int indexPart)
Variant tolerant mapping peptides against the proteome.
|
double |
pepMass(String peptide)
Computing the mass of a peptide.
|
boolean |
withinMassTolerance(double mass,
int numX)
Lookup, if mass can be described a combination of numX different amino acids
|
public ArrayList<WaveletTree> occurrenceTablesPrimary
public ArrayList<WaveletTree> occurrenceTablesReversed
public ArrayList<int[]> lessTablesPrimary
public ArrayList<int[]> lessTablesReversed
public FMIndex(WaitingHandler waitingHandler, boolean displayProgress, PeptideVariantsPreferences peptideVariantsPreferences, SearchParameters searchParameters)
waitingHandler
- the waiting handlerdisplayProgress
- if true, the progress is displayedpeptideVariantsPreferences
- contains all parameters for variantssearchParameters
- the search parameterspublic FMIndex(WaitingHandler waitingHandler, boolean displayProgress, PtmSettings ptmSettings, PeptideVariantsPreferences peptideVariantsPreferences)
waitingHandler
- the waiting handlerdisplayProgress
- if true, the progress is displayedptmSettings
- contains modification parameters for identificationpeptideVariantsPreferences
- contains all parameters for variantspublic double computeMassValue(double currentMass, double refMass)
currentMass
- the current massrefMass
- the reference masspublic double computeInverseMassValue(double currentMass, double refMass)
currentMass
- the current massrefMass
- the reference masspublic void addPTMPattern(PTM ptm)
ptm
- PTM objectpublic boolean checkPTMPattern(PeptideProteinMapping peptideProteinMapping)
peptideProteinMapping
- the peptide protein mappingpublic int[] computeMappingRanges(double mass)
mass
- the masspublic long getAllocatedBytes()
public ArrayList<PeptideProteinMapping> getProteinMapping(String peptide, SequenceMatchingPreferences seqMatchPref)
getProteinMapping
in interface PeptideMapper
peptide
- the peptideseqMatchPref
- the sequence matching preferencespublic ArrayList<PeptideProteinMapping> getProteinMappingWithoutVariants(String peptide, SequenceMatchingPreferences seqMatchPref, int indexPart)
peptide
- the peptideseqMatchPref
- the sequence matching preferencesindexPart
- the index partpublic ArrayList<PeptideProteinMapping> getProteinMappingWithVariantsGeneric(String peptide, SequenceMatchingPreferences seqMatchPref, int indexPart)
peptide
- the peptideseqMatchPref
- the sequence match preferencesindexPart
- the index partpublic ArrayList<PeptideProteinMapping> getProteinMappingWithVariantsSpecific(String peptide, SequenceMatchingPreferences seqMatchPref, int indexPart)
peptide
- the peptideseqMatchPref
- the sequence matching preferencesindexPart
- the index partpublic void emptyCache()
PeptideMapper
emptyCache
in interface PeptideMapper
public void close() throws IOException, SQLException
PeptideMapper
close
in interface PeptideMapper
IOException
- exception thrown whenever an error occurs while
reading or writing a file.SQLException
- exception thrown whenever a problem occurred while
interacting with a database.public double pepMass(String peptide)
peptide
- the peptidepublic boolean withinMassTolerance(double mass, int numX)
mass
- to be describednumX
- number of Xspublic ArrayList<PeptideProteinMapping> getProteinMapping(Tag tag, TagMatcher tagMatcher, SequenceMatchingPreferences sequenceMatchingPreferences, Double massTolerance) throws IOException, InterruptedException, ClassNotFoundException, SQLException
getProteinMapping
in interface PeptideMapper
tag
- information about the identified peptidetagMatcher
- the tag matchersequenceMatchingPreferences
- the sequence matching preferencesmassTolerance
- the mass toleranceIOException
- thrown if an IOException occursInterruptedException
- thrown if an InterruptedException occursClassNotFoundException
- thrown if a ClassNotFoundExceptionSQLException
- thrown if an SQLException occurspublic ArrayList<PeptideProteinMapping> getProteinMapping(Tag tag, TagMatcher tagMatcher, SequenceMatchingPreferences sequenceMatchingPreferences) throws IOException, InterruptedException, ClassNotFoundException, SQLException
getProteinMapping
in interface PeptideMapper
tag
- information about the identified peptidetagMatcher
- the tag matchersequenceMatchingPreferences
- the sequence matching preferencesIOException
- thrown if an IOException occursInterruptedException
- thrown if an InterruptedException occursClassNotFoundException
- thrown if a ClassNotFoundExceptionSQLException
- thrown if an SQLException occurspublic ArrayList<PeptideProteinMapping> getProteinMappingWithoutVariants(Tag tag, TagMatcher tagMatcher, SequenceMatchingPreferences sequenceMatchingPreferences, int indexPart) throws IOException, InterruptedException, ClassNotFoundException, SQLException
tag
- the tagtagMatcher
- the tag matchersequenceMatchingPreferences
- the sequence matching preferencesindexPart
- the index partIOException
- thrown if an IOException occursInterruptedException
- thrown if an InterruptedException occursClassNotFoundException
- thrown if a ClassNotFoundExceptionSQLException
- thrown if an SQLException occurspublic ArrayList<PeptideProteinMapping> getProteinMappingWithVariants(Tag tag, TagMatcher tagMatcher, SequenceMatchingPreferences sequenceMatchingPreferences, int indexPart) throws IOException, InterruptedException, ClassNotFoundException, SQLException
tag
- the tagtagMatcher
- the tag matchersequenceMatchingPreferences
- the sequence matching preferencesindexPart
- the index partIOException
- thrown if an IOException occursInterruptedException
- thrown if an InterruptedException occursClassNotFoundException
- thrown if a ClassNotFoundExceptionSQLException
- thrown if an SQLException occursCopyright © 2019. All rights reserved.