public class IdentificationFeaturesGenerator extends Object
Constructor and Description |
---|
IdentificationFeaturesGenerator()
Empty default constructor
|
IdentificationFeaturesGenerator(Identification identification,
IdentificationParameters identificationParameters,
SequenceProvider sequenceProvider,
Metrics metrics,
SpectrumCountingParameters spectrumCountingPreferences)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
clearSpectrumCounting()
Clears the spectrum counting data in cache.
|
int[] |
estimateAACoverage(long proteinMatchKey,
boolean enzymatic)
Returns amino acid coverage of this protein by enzymatic or non-enzymatic
peptides only in an array where the index of the best validation level of
every peptide covering a given amino acid is given.
|
static double |
estimateSpectrumCounting(Identification identification,
SequenceProvider sequenceProvider,
long proteinMatchKey,
SpectrumCountingParameters spectrumCountingPreferences,
int maxPepLength,
IdentificationParameters identificationParameters)
Returns the spectrum counting index based on the project settings.
|
int[] |
getAACoverage(long proteinMatchKey)
Indicates the validation level of every amino acid in the given protein.
|
String |
getAmbiguousModificationSiteNumber(IdentificationMatch identificationMatch)
Returns a summary of the number of modifications present on the sequence
ambiguously assigned to an amino acid grouped by representative site
followed by secondary ambiguous sites.
|
String |
getAmbiguousModificationSiteNumber(IdentificationMatch match,
ArrayList<String> targetedModifications)
Returns a summary of the number of modifications present on the sequence
ambiguously assigned to an amino acid grouped by representative site
followed by secondary ambiguous sites.
|
String |
getAmbiguousModificationSites(IdentificationMatch identificationMatch,
String sequence)
Returns a list of the modifications present on the sequence ambiguously
assigned to an amino acid grouped by representative site followed by
secondary ambiguous sites.
|
String |
getAmbiguousModificationSites(IdentificationMatch match,
String sequence,
ArrayList<String> targetedModifications)
Returns a list of the modifications present on the sequence ambiguously
assigned to an amino acid grouped by representative site followed by
secondary ambiguous sites.
|
String |
getConfidentModificationSites(IdentificationMatch identificationMatch,
String sequence)
Returns a summary of all modifications present on the sequence
confidently assigned to an amino acid.
|
String |
getConfidentModificationSites(IdentificationMatch match,
String sequence,
ArrayList<String> targetedModifications)
Returns a summary of the modifications present on the peptide sequence
confidently assigned to an amino acid with focus on given list of
modifications.
|
String |
getConfidentModificationSitesNumber(IdentificationMatch identificationMatch)
Returns the number of confidently localized variable modifications.
|
String |
getConfidentModificationSitesNumber(IdentificationMatch match,
ArrayList<String> targetedModifications)
Returns the number of confidently localized variable modifications.
|
double[] |
getCoverableAA(long proteinMatchKey)
Returns an array of the likelihood to find identify a given amino acid in
the protein sequence.
|
TreeSet<String> |
getFoundModifications()
Returns the variable modifications found in the currently loaded dataset.
|
IdentificationFeaturesCache |
getIdentificationFeaturesCache()
Returns the identification features cache.
|
NonSymmetricalNormalDistribution |
getMassErrorDistribution(String spectrumFile)
Returns the precursor mass error distribution of validated peptides in a
spectrum file.
|
int |
getMaxNSpectra()
Returns the maximum number of spectra accounted by a single peptide Match
all found in a protein match.
|
Metrics |
getMetrics()
Returns the metrics.
|
String |
getModifiedSequence(IdentificationMatch identificationMatch,
String sequence)
Returns the match sequence annotated with modifications.
|
int |
getNConfidentPeptides(long proteinMatchKey)
Returns the number of confident peptides for a given protein match.
|
int |
getNConfidentProteins()
Returns the number of confident proteins.
|
int |
getNConfidentSpectra(long proteinMatchKey)
Returns the number of confident spectra for a given protein match.
|
int |
getNConfidentSpectraForPeptide(long peptideMatchKey)
Returns the number of confident spectra for a given peptide match.
|
long[] |
getNonEnzymatic(long proteinMatchKey,
DigestionParameters digestionPreferences)
Returns a list of non-enzymatic peptides for a given protein match.
|
double |
getNormalizedSpectrumCounting(long proteinMatchKey)
Returns the spectrum counting metric of the protein match of interest
using the preference settings normalized to the injected protein amount
using the spectrum counting preferences of the identification features
generator.
|
double |
getNormalizedSpectrumCounting(long proteinMatchKey,
Metrics metrics,
UnitOfMeasurement unit,
Double referenceMass,
SpectrumCountingMethod method)
Returns the spectrum counting metric of the protein match of interest
using the preference settings normalized to the injected protein amount.
|
double |
getNormalizedSpectrumCounting(long proteinMatchKey,
SpectrumCountingParameters spectrumCountingPreferences,
Metrics metrics)
Returns the spectrum counting metric of the protein match of interest
using the preference settings normalized to the injected protein amount
using the given spectrum counting preferences.
|
double |
getNormalizedSpectrumCounting(long proteinMatchKey,
UnitOfMeasurement unit,
SpectrumCountingMethod method)
Returns the spectrum counting metric of the protein match of interest
using the preference settings normalized to the injected protein amount.
|
Integer |
getNSpectra(long proteinMatchKey)
Estimates the number of spectra for the given protein match.
|
int |
getNUniquePeptides(long proteinMatchKey)
Returns the number of unique peptides for this protein match.
|
int |
getNUniqueValidatedPeptides(long proteinMatchKey)
Returns the number of unique validated peptides for this protein match.
|
int |
getNValidatedPeptides(long proteinMatchKey)
Returns the number of validated peptides for a given protein match.
|
int |
getNValidatedProteinGroups(Peptide peptide)
Indicates whether a peptide is found in a single protein match.
|
int |
getNValidatedProteinGroups(Peptide peptide,
WaitingHandler waitingHandler)
Indicates whether a peptide is found in a single protein match.
|
int |
getNValidatedProteins()
Returns the number of validated proteins.
|
int |
getNValidatedPsms()
Returns the number of validated PSMs for the last selected peptide /!\
This value is only available after getSortedPsmKeys has been called.
|
int |
getNValidatedSpectra(long proteinMatchKey)
Returns the number of validated spectra for a given protein match.
|
int |
getNValidatedSpectraForPeptide(long peptideMatchKey)
Returns the number of validated spectra for a given peptide match.
|
double |
getObservableCoverage(long proteinMatchKey)
Returns the best protein coverage possible according to the given
cleavage settings.
|
long[] |
getProcessedProteinKeys(WaitingHandler waitingHandler,
FilterParameters filterPreferences)
Returns the sorted list of protein keys.
|
long[] |
getProteinKeys(WaitingHandler waitingHandler,
FilterParameters filterPreferences)
Returns the ordered protein keys to display when no filtering is applied.
|
HashMap<Integer,Double> |
getSequenceCoverage(long proteinMatchKey)
Returns the sequence coverage of the protein of interest.
|
long[] |
getSortedPeptideKeys(long proteinKey)
Returns a sorted list of peptide keys from the protein of interest.
|
long[] |
getSortedPsmKeys(long peptideKey,
boolean sortOnRt,
boolean forceUpdate)
Returns the ordered list of spectrum keys for a given peptide.
|
double |
getSpectrumCounting(long proteinMatchKey)
Returns the spectrum counting metric of the protein match of interest
using the preference settings.
|
Double |
getSpectrumCounting(long proteinMatchKey,
SpectrumCountingMethod method)
Returns the spectrum counting metric of the protein match of interest for
the given method.
|
long[] |
getValidatedProteins(FilterParameters filterPreferences)
Returns the list of validated protein keys.
|
long[] |
getValidatedProteins(WaitingHandler waitingHandler,
FilterParameters filterPreferences)
Returns the list of validated protein keys.
|
double |
getValidatedSequenceCoverage(long proteinMatchKey)
Returns the sequence coverage of the protein of interest.
|
boolean |
hasEnzymaticPeptides(long proteinMatchKey)
Returns true if the leading protein of the given group has any enzymatic
peptides.
|
boolean |
nSpectraInCache(long proteinMatchKey)
Indicates whether the number of spectra for a given protein match is in
cache.
|
boolean |
nValidatedPeptidesInCache(long proteinMatchKey)
Indicates whether the number of validated peptides is in cache for a
given protein match.
|
boolean |
nValidatedSpectraForPeptideInCache(long peptideMatchKey)
Indicates whether the number of validated spectra for a peptide match is
in cache.
|
boolean |
nValidatedSpectraInCache(long proteinMatchKey)
Indicates whether the number of validated spectra is in cache for the
given protein match.
|
boolean |
observableCoverageInCache(long proteinMatchKey)
Indicates whether the observable coverage of a protein match is in cache.
|
boolean |
sequenceCoverageInCache(long proteinMatchKey)
Indicates whether the sequence coverage is in cache.
|
void |
setIdentificationFeaturesCache(IdentificationFeaturesCache identificationFeaturesCache)
Sets the the identification features cache.
|
void |
setMassErrorDistribution(String spectrumFile,
ArrayList<Double> precursorMzDeviations)
Sets a mass error distribution in the massErrorDistribution map.
|
void |
setProteinKeys(long[] proteinList)
Sets the ordered protein list.
|
void |
setSpectrumCountingPreferences(SpectrumCountingParameters spectrumCountingPreferences)
Sets the spectrum couting preferences.
|
boolean |
spectrumCountingInCache(long proteinMatchKey)
Indicates whether the default spectrum counting value is in cache for a
protein match.
|
void |
updateCoverableAA(long proteinMatchKey)
Updates the array of booleans indicating whether the amino acids of given
peptides can generate peptides.
|
void |
updateNConfidentPeptides(long proteinMatchKey)
Updates the number of confident peptides for a given protein match.
|
void |
updateNConfidentSpectra(long proteinMatchKey)
Updates the number of confident spectra for a given protein match.
|
void |
updateNConfidentSpectraForPeptide(long peptideMatchKey)
Updates the number of confident spectra for a given peptide match.
|
void |
updateObservableCoverage(long proteinMatchKey)
Updates the best protein coverage possible according to the given
cleavage settings.
|
void |
updateSequenceCoverage(long proteinMatchKey)
Updates the sequence coverage of the protein of interest.
|
boolean |
validatedSequenceCoverageInCache(long proteinMatchKey)
Indicates whether the sequence coverage is in cache.
|
public IdentificationFeaturesGenerator()
public IdentificationFeaturesGenerator(Identification identification, IdentificationParameters identificationParameters, SequenceProvider sequenceProvider, Metrics metrics, SpectrumCountingParameters spectrumCountingPreferences)
identification
- an identification object allowing retrieving
matches and parametersidentificationParameters
- the identification parameterssequenceProvider
- a protein sequence providermetrics
- the metrics picked-up wile loading the dataspectrumCountingPreferences
- the spectrum counting preferencespublic void setMassErrorDistribution(String spectrumFile, ArrayList<Double> precursorMzDeviations)
spectrumFile
- the spectrum file of interestprecursorMzDeviations
- list of precursor mass errorspublic NonSymmetricalNormalDistribution getMassErrorDistribution(String spectrumFile)
spectrumFile
- the name of the file of interestpublic double[] getCoverableAA(long proteinMatchKey)
proteinMatchKey
- the key of the protein of interestpublic int[] getAACoverage(long proteinMatchKey)
proteinMatchKey
- the key of the protein of interestpublic void updateCoverableAA(long proteinMatchKey)
proteinMatchKey
- the key of the protein of interestpublic TreeSet<String> getFoundModifications()
public int[] estimateAACoverage(long proteinMatchKey, boolean enzymatic)
proteinMatchKey
- the key of the protein matchenzymatic
- if not all peptides are considered, if true only
enzymatic peptides will be considered, if false only non enzymaticpublic double getValidatedSequenceCoverage(long proteinMatchKey)
proteinMatchKey
- the key of the protein of interestpublic boolean validatedSequenceCoverageInCache(long proteinMatchKey)
proteinMatchKey
- the key of the protein matchpublic HashMap<Integer,Double> getSequenceCoverage(long proteinMatchKey)
proteinMatchKey
- the key of the protein of interestpublic boolean sequenceCoverageInCache(long proteinMatchKey)
proteinMatchKey
- the key of the protein matchpublic long[] getNonEnzymatic(long proteinMatchKey, DigestionParameters digestionPreferences)
proteinMatchKey
- the key of the protein matchdigestionPreferences
- the digestion preferencespublic void updateSequenceCoverage(long proteinMatchKey)
proteinMatchKey
- the key of the protein of interestpublic double getNormalizedSpectrumCounting(long proteinMatchKey)
proteinMatchKey
- the key of the protein match of interestpublic double getNormalizedSpectrumCounting(long proteinMatchKey, SpectrumCountingParameters spectrumCountingPreferences, Metrics metrics)
proteinMatchKey
- the key of the protein match of interestspectrumCountingPreferences
- the spectrum counting preferencesmetrics
- the metrics on the datasetpublic double getNormalizedSpectrumCounting(long proteinMatchKey, UnitOfMeasurement unit, SpectrumCountingMethod method)
proteinMatchKey
- the key of the protein match of interestunit
- the unit to use for the normalizationmethod
- the method to usepublic double getNormalizedSpectrumCounting(long proteinMatchKey, Metrics metrics, UnitOfMeasurement unit, Double referenceMass, SpectrumCountingMethod method)
proteinMatchKey
- the key of the protein match of interestmetrics
- the metrics on the datasetunit
- the unit to use for the normalizationmethod
- the method to usereferenceMass
- the reference mass if abundance normalization is
chosenpublic double getSpectrumCounting(long proteinMatchKey)
proteinMatchKey
- the key of the protein match of interestpublic Double getSpectrumCounting(long proteinMatchKey, SpectrumCountingMethod method)
proteinMatchKey
- the key of the protein match of interestmethod
- the method to usepublic boolean spectrumCountingInCache(long proteinMatchKey)
proteinMatchKey
- the key of the protein match of interestpublic static double estimateSpectrumCounting(Identification identification, SequenceProvider sequenceProvider, long proteinMatchKey, SpectrumCountingParameters spectrumCountingPreferences, int maxPepLength, IdentificationParameters identificationParameters)
identification
- the identificationsequenceProvider
- a provider for the protein sequencesproteinMatchKey
- the protein match keyspectrumCountingPreferences
- the spectrum counting preferencesmaxPepLength
- the maximal length accepted for a peptideidentificationParameters
- the identification parameterspublic double getObservableCoverage(long proteinMatchKey)
proteinMatchKey
- the key of the protein match of interestpublic boolean observableCoverageInCache(long proteinMatchKey)
proteinMatchKey
- the key of the protein matchpublic void updateObservableCoverage(long proteinMatchKey)
proteinMatchKey
- the key of the protein match of interestpublic int getNValidatedProteins()
public int getNConfidentProteins()
public int getNUniquePeptides(long proteinMatchKey)
proteinMatchKey
- the key of the matchpublic int getNUniqueValidatedPeptides(long proteinMatchKey)
proteinMatchKey
- the key of the matchpublic boolean hasEnzymaticPeptides(long proteinMatchKey)
proteinMatchKey
- the protein matchpublic int getNValidatedPeptides(long proteinMatchKey)
proteinMatchKey
- the key of the protein matchpublic int getNConfidentPeptides(long proteinMatchKey)
proteinMatchKey
- the key of the protein matchpublic void updateNConfidentPeptides(long proteinMatchKey)
proteinMatchKey
- the key of the protein matchpublic void updateNConfidentSpectra(long proteinMatchKey)
proteinMatchKey
- the key of the protein matchpublic boolean nValidatedPeptidesInCache(long proteinMatchKey)
proteinMatchKey
- the key of the protein matchpublic Integer getNSpectra(long proteinMatchKey)
proteinMatchKey
- the key of the given protein matchpublic boolean nSpectraInCache(long proteinMatchKey)
proteinMatchKey
- the key of the protein matchpublic int getMaxNSpectra()
public int getNValidatedSpectra(long proteinMatchKey)
proteinMatchKey
- the key of the protein matchpublic int getNConfidentSpectra(long proteinMatchKey)
proteinMatchKey
- the key of the protein matchpublic boolean nValidatedSpectraInCache(long proteinMatchKey)
proteinMatchKey
- the key of the protein matchpublic int getNValidatedSpectraForPeptide(long peptideMatchKey)
peptideMatchKey
- the key of the peptide matchpublic int getNConfidentSpectraForPeptide(long peptideMatchKey)
peptideMatchKey
- the key of the peptide matchpublic void updateNConfidentSpectraForPeptide(long peptideMatchKey)
peptideMatchKey
- the key of the peptide matchpublic boolean nValidatedSpectraForPeptideInCache(long peptideMatchKey)
peptideMatchKey
- the key of the peptide matchpublic void clearSpectrumCounting()
public String getConfidentModificationSites(IdentificationMatch identificationMatch, String sequence)
identificationMatch
- the identification matchsequence
- the sequencepublic String getConfidentModificationSitesNumber(IdentificationMatch identificationMatch)
identificationMatch
- the identification matchpublic String getAmbiguousModificationSites(IdentificationMatch identificationMatch, String sequence)
identificationMatch
- the identification matchsequence
- the sequencepublic String getAmbiguousModificationSiteNumber(IdentificationMatch identificationMatch)
identificationMatch
- the identification matchpublic String getConfidentModificationSites(IdentificationMatch match, String sequence, ArrayList<String> targetedModifications)
match
- the identification matchsequence
- the sequencetargetedModifications
- the mosifications to include in the summarypublic String getConfidentModificationSitesNumber(IdentificationMatch match, ArrayList<String> targetedModifications)
match
- the identification matchtargetedModifications
- the modifications to include in the summarypublic String getAmbiguousModificationSites(IdentificationMatch match, String sequence, ArrayList<String> targetedModifications)
match
- the identification matchsequence
- the sequencetargetedModifications
- the modifications to include in the summarypublic String getAmbiguousModificationSiteNumber(IdentificationMatch match, ArrayList<String> targetedModifications)
match
- the identification matchtargetedModifications
- the modifications to include in the summarypublic String getModifiedSequence(IdentificationMatch identificationMatch, String sequence)
identificationMatch
- the identification matchsequence
- the sequence of the matchpublic long[] getValidatedProteins(FilterParameters filterPreferences)
filterPreferences
- the filtering preferences used. can be nullpublic long[] getValidatedProteins(WaitingHandler waitingHandler, FilterParameters filterPreferences)
filterPreferences
- the filtering preferences used. can be nullwaitingHandler
- the waiting handler, can be nullpublic long[] getProcessedProteinKeys(WaitingHandler waitingHandler, FilterParameters filterPreferences)
filterPreferences
- the filtering preferences used. can be nullwaitingHandler
- the waiting handler, can be nullpublic long[] getProteinKeys(WaitingHandler waitingHandler, FilterParameters filterPreferences)
waitingHandler
- can be nullfilterPreferences
- the filtering preferences used. can be nullpublic long[] getSortedPeptideKeys(long proteinKey)
proteinKey
- the key of the protein of interestpublic long[] getSortedPsmKeys(long peptideKey, boolean sortOnRt, boolean forceUpdate)
peptideKey
- the key of the peptide of interestsortOnRt
- if true, the PSMs are sorted in retention time, false
sorts on PSM scoreforceUpdate
- if true, the sorted listed is recreated even if not
neededpublic int getNValidatedPsms()
public void setProteinKeys(long[] proteinList)
proteinList
- the ordered protein listpublic IdentificationFeaturesCache getIdentificationFeaturesCache()
public void setIdentificationFeaturesCache(IdentificationFeaturesCache identificationFeaturesCache)
identificationFeaturesCache
- the new identification features cachepublic Metrics getMetrics()
public void setSpectrumCountingPreferences(SpectrumCountingParameters spectrumCountingPreferences)
spectrumCountingPreferences
- the spectrum counting preferencespublic int getNValidatedProteinGroups(Peptide peptide)
peptide
- the peptide of interestpublic int getNValidatedProteinGroups(Peptide peptide, WaitingHandler waitingHandler)
peptide
- the peptide of interestwaitingHandler
- waiting handler allowing the canceling of the
progressCopyright © 2018. All rights reserved.