Search in sources :

Example 1 with PeptideAndProteinBuilder

use of com.compomics.util.experiment.identification.protein_inference.PeptideAndProteinBuilder in project peptide-shaker by compomics.

the class PeptideShaker method attachSpectrumProbabilitiesAndBuildPeptidesAndProteins.

/**
 * Attaches the spectrum posterior error probabilities to the spectrum
 * matches and creates peptides and proteins.
 *
 * @param sequenceProvider a protein sequence provider
 * @param sequenceMatchingPreferences the sequence matching preferences
 * @param projectType the project type
 * @param fastaParameters the FASTA parsing parameters
 * @param waitingHandler the handler displaying feedback to the user
 */
private void attachSpectrumProbabilitiesAndBuildPeptidesAndProteins(SequenceProvider sequenceProvider, SequenceMatchingParameters sequenceMatchingPreferences, ProjectType projectType, FastaParameters fastaParameters, WaitingHandler waitingHandler) {
    waitingHandler.setSecondaryProgressCounterIndeterminate(false);
    waitingHandler.setMaxSecondaryProgressCounter(identification.getSpectrumIdentificationSize());
    PeptideAndProteinBuilder peptideAndProteinBuilder = new PeptideAndProteinBuilder(identification);
    identification.getSpectrumIdentification().values().stream().flatMap(keys -> keys.stream()).parallel().map(key -> identification.getSpectrumMatch(key)).forEach(spectrumMatch -> attachSpectrumProbabilitiesAndBuildPeptidesAndProteins(spectrumMatch, peptideAndProteinBuilder, sequenceProvider, sequenceMatchingPreferences, projectType, fastaParameters, waitingHandler));
    waitingHandler.setSecondaryProgressCounterIndeterminate(true);
}
Also used : ModificationFactory(com.compomics.util.experiment.biology.modifications.ModificationFactory) IdentificationFeaturesGenerator(com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator) FractionParameters(com.compomics.util.parameters.identification.advanced.FractionParameters) TimeoutException(java.util.concurrent.TimeoutException) ProteinProcessor(eu.isas.peptideshaker.processing.ProteinProcessor) EnzymeFactory(com.compomics.util.experiment.biology.enzymes.EnzymeFactory) WaitingHandler(com.compomics.util.waiting.WaitingHandler) SpectrumProvider(com.compomics.util.experiment.mass_spectrometry.SpectrumProvider) com.compomics.util.experiment.identification(com.compomics.util.experiment.identification) CompomicsWrapper(com.compomics.software.CompomicsWrapper) SequenceMatchingParameters(com.compomics.util.parameters.identification.advanced.SequenceMatchingParameters) FastaSummary(com.compomics.util.experiment.io.biology.protein.FastaSummary) IdMatchValidationParameters(com.compomics.util.parameters.identification.advanced.IdMatchValidationParameters) GroupSimplification(eu.isas.peptideshaker.protein_inference.GroupSimplification) SearchParameters(com.compomics.util.parameters.identification.search.SearchParameters) PsmScorer(eu.isas.peptideshaker.scoring.psm_scoring.PsmScorer) IdentificationParameters(com.compomics.util.parameters.identification.IdentificationParameters) ScalingFactorsEstimators(com.compomics.util.experiment.quantification.spectrumcounting.ScalingFactorsEstimators) PSParameter(com.compomics.util.experiment.identification.peptide_shaker.PSParameter) PsmScoringParameters(com.compomics.util.parameters.identification.advanced.PsmScoringParameters) PsmProcessor(eu.isas.peptideshaker.processing.PsmProcessor) FileImporter(eu.isas.peptideshaker.fileimport.FileImporter) ExceptionHandler(com.compomics.util.exceptions.ExceptionHandler) ProteinInference(eu.isas.peptideshaker.protein_inference.ProteinInference) MatchesValidator(eu.isas.peptideshaker.validation.MatchesValidator) Metrics(com.compomics.util.experiment.identification.peptide_shaker.Metrics) UtilitiesUserParameters(com.compomics.util.parameters.UtilitiesUserParameters) PeptideAndProteinBuilder(com.compomics.util.experiment.identification.protein_inference.PeptideAndProteinBuilder) TargetDecoyMap(eu.isas.peptideshaker.scoring.targetdecoy.TargetDecoyMap) ProjectParameters(com.compomics.util.experiment.ProjectParameters) SimpleDateFormat(java.text.SimpleDateFormat) HashMap(java.util.HashMap) ProteinDetailsProvider(com.compomics.util.experiment.io.biology.protein.ProteinDetailsProvider) SpectrumMatch(com.compomics.util.experiment.identification.matches.SpectrumMatch) ArrayList(java.util.ArrayList) InputMap(eu.isas.peptideshaker.scoring.maps.InputMap) ProjectType(com.compomics.util.parameters.peptide_shaker.ProjectType) ProcessingParameters(com.compomics.util.parameters.tools.ProcessingParameters) ProjectDetails(eu.isas.peptideshaker.preferences.ProjectDetails) ObjectsDB(com.compomics.util.db.object.ObjectsDB) Duration(com.compomics.util.waiting.Duration) SpectrumCountingParameters(com.compomics.util.parameters.quantification.spectrum_counting.SpectrumCountingParameters) SequenceProvider(com.compomics.util.experiment.io.biology.protein.SequenceProvider) PeptideInference(com.compomics.util.experiment.identification.peptide_inference.PeptideInference) IOException(java.io.IOException) PSMaps(eu.isas.peptideshaker.scoring.PSMaps) File(java.io.File) ModificationLocalizationScorer(eu.isas.peptideshaker.ptm.ModificationLocalizationScorer) FastaParameters(com.compomics.util.experiment.io.biology.protein.FastaParameters) GeneMaps(com.compomics.util.experiment.biology.genes.GeneMaps) ModificationLocalizationParameters(com.compomics.util.parameters.identification.advanced.ModificationLocalizationParameters) InputStream(java.io.InputStream) PeptideAndProteinBuilder(com.compomics.util.experiment.identification.protein_inference.PeptideAndProteinBuilder)

Aggregations

CompomicsWrapper (com.compomics.software.CompomicsWrapper)1 ObjectsDB (com.compomics.util.db.object.ObjectsDB)1 ExceptionHandler (com.compomics.util.exceptions.ExceptionHandler)1 ProjectParameters (com.compomics.util.experiment.ProjectParameters)1 EnzymeFactory (com.compomics.util.experiment.biology.enzymes.EnzymeFactory)1 GeneMaps (com.compomics.util.experiment.biology.genes.GeneMaps)1 ModificationFactory (com.compomics.util.experiment.biology.modifications.ModificationFactory)1 com.compomics.util.experiment.identification (com.compomics.util.experiment.identification)1 IdentificationFeaturesGenerator (com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator)1 SpectrumMatch (com.compomics.util.experiment.identification.matches.SpectrumMatch)1 PeptideInference (com.compomics.util.experiment.identification.peptide_inference.PeptideInference)1 Metrics (com.compomics.util.experiment.identification.peptide_shaker.Metrics)1 PSParameter (com.compomics.util.experiment.identification.peptide_shaker.PSParameter)1 PeptideAndProteinBuilder (com.compomics.util.experiment.identification.protein_inference.PeptideAndProteinBuilder)1 FastaParameters (com.compomics.util.experiment.io.biology.protein.FastaParameters)1 FastaSummary (com.compomics.util.experiment.io.biology.protein.FastaSummary)1 ProteinDetailsProvider (com.compomics.util.experiment.io.biology.protein.ProteinDetailsProvider)1 SequenceProvider (com.compomics.util.experiment.io.biology.protein.SequenceProvider)1 SpectrumProvider (com.compomics.util.experiment.mass_spectrometry.SpectrumProvider)1 ScalingFactorsEstimators (com.compomics.util.experiment.quantification.spectrumcounting.ScalingFactorsEstimators)1