Class PsPeptideSection

java.lang.Object
eu.isas.peptideshaker.export.sections.PsPeptideSection

public class PsPeptideSection extends Object
This class outputs the peptide related export features.
Author:
Marc Vaudel
  • Constructor Summary

    Constructors
    Constructor
    Description
    PsPeptideSection(ArrayList<com.compomics.util.io.export.ExportFeature> exportFeatures, boolean indexes, boolean header, com.compomics.util.io.export.ExportWriter writer)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    getfeature(com.compomics.util.experiment.identification.Identification identification, com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator identificationFeaturesGenerator, com.compomics.util.experiment.io.biology.protein.SequenceProvider sequenceProvider, com.compomics.util.experiment.io.biology.protein.ProteinDetailsProvider proteinDetailsProvider, com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, int nSurroundingAA, String linePrefix, com.compomics.util.experiment.identification.matches.PeptideMatch peptideMatch, com.compomics.util.io.export.features.peptideshaker.PsPeptideFeature peptideFeature, boolean validatedOnly, boolean decoys, com.compomics.util.waiting.WaitingHandler waitingHandler)
    Returns the component of the section corresponding to the given feature.
    static String
    getPeptideLocalizationText(String proteinAccession, int[] sites)
    Returns the peptide localization on the given protein as text in the form accession (site1,site2).
    static String
    getPeptideModificationLocationConfidence(com.compomics.util.experiment.identification.matches.PeptideMatch peptideMatch, com.compomics.util.parameters.identification.search.ModificationParameters modificationParameters)
    Returns the peptide modification location confidence as a string.
    static String
    getProteinGroupText(long proteinGroupKey, com.compomics.util.experiment.identification.Identification identification)
    Returns a description of the given protein group in the form proteinA,proteinB(confidence).
    void
    Writes the title of the section.
    void
    writeSection(com.compomics.util.experiment.identification.Identification identification, com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator identificationFeaturesGenerator, com.compomics.util.experiment.io.biology.protein.SequenceProvider sequenceProvider, com.compomics.util.experiment.io.biology.protein.ProteinDetailsProvider proteinDetailsProvider, com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider, com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, long[] keys, int nSurroundingAA, String linePrefix, boolean validatedOnly, boolean decoys, com.compomics.util.waiting.WaitingHandler waitingHandler)
    Writes the desired section.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • PsPeptideSection

      public PsPeptideSection(ArrayList<com.compomics.util.io.export.ExportFeature> exportFeatures, boolean indexes, boolean header, com.compomics.util.io.export.ExportWriter writer)
      Constructor.
      Parameters:
      exportFeatures - the features to export in this section
      indexes - indicates whether the line index should be written
      header - indicates whether the table header should be written
      writer - the writer which will write to the file
  • Method Details

    • writeSection

      public void writeSection(com.compomics.util.experiment.identification.Identification identification, com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator identificationFeaturesGenerator, com.compomics.util.experiment.io.biology.protein.SequenceProvider sequenceProvider, com.compomics.util.experiment.io.biology.protein.ProteinDetailsProvider proteinDetailsProvider, com.compomics.util.experiment.mass_spectrometry.SpectrumProvider spectrumProvider, com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, long[] keys, int nSurroundingAA, String linePrefix, boolean validatedOnly, boolean decoys, com.compomics.util.waiting.WaitingHandler waitingHandler) throws IOException
      Writes the desired section.
      Parameters:
      identification - The identification of the project.
      identificationFeaturesGenerator - The identification features generator of the project.
      sequenceProvider - The sequence provider.
      proteinDetailsProvider - The protein details provider.
      spectrumProvider - The spectrum provider.
      identificationParameters - The identification parameters.
      keys - The keys of the PSM matches to output.
      nSurroundingAA - The number of surrounding amino acids to export.
      linePrefix - The line prefix.
      validatedOnly - Whether only validated matches should be exported.
      decoys - Whether decoy matches should be exported as well.
      waitingHandler - The waiting handler.
      Throws:
      IOException - exception thrown if an error occurred while reading or writing a file
    • getfeature

      public static String getfeature(com.compomics.util.experiment.identification.Identification identification, com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator identificationFeaturesGenerator, com.compomics.util.experiment.io.biology.protein.SequenceProvider sequenceProvider, com.compomics.util.experiment.io.biology.protein.ProteinDetailsProvider proteinDetailsProvider, com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, int nSurroundingAA, String linePrefix, com.compomics.util.experiment.identification.matches.PeptideMatch peptideMatch, com.compomics.util.io.export.features.peptideshaker.PsPeptideFeature peptideFeature, boolean validatedOnly, boolean decoys, com.compomics.util.waiting.WaitingHandler waitingHandler)
      Returns the component of the section corresponding to the given feature.
      Parameters:
      identification - the identification of the project
      identificationFeaturesGenerator - the identification features generator of the project
      sequenceProvider - a provider for the protein sequences
      proteinDetailsProvider - a provider for protein details
      identificationParameters - the identification parameters
      nSurroundingAA - the number of surrounding amino acids to export
      linePrefix - the line prefix to use.
      peptideMatch - the peptide match
      peptideFeature - the peptide feature to export
      validatedOnly - whether only validated matches should be exported
      decoys - whether decoy matches should be exported as well
      waitingHandler - the waiting handler
      Returns:
      the component of the section corresponding to the given feature
    • getProteinGroupText

      public static String getProteinGroupText(long proteinGroupKey, com.compomics.util.experiment.identification.Identification identification)
      Returns a description of the given protein group in the form proteinA,proteinB(confidence).
      Parameters:
      proteinGroupKey - the key of the protein group
      identification - the identification object
      Returns:
      a description of the given protein group
    • getPeptideLocalizationText

      public static String getPeptideLocalizationText(String proteinAccession, int[] sites)
      Returns the peptide localization on the given protein as text in the form accession (site1,site2).
      Parameters:
      proteinAccession - the protein accession
      sites - the position of the peptide on the protein
      Returns:
      the peptide localization on the given protein as text
    • getPeptideModificationLocationConfidence

      public static String getPeptideModificationLocationConfidence(com.compomics.util.experiment.identification.matches.PeptideMatch peptideMatch, com.compomics.util.parameters.identification.search.ModificationParameters modificationParameters)
      Returns the peptide modification location confidence as a string.
      Parameters:
      peptideMatch - the peptide match
      modificationParameters - the modification parameters
      Returns:
      the peptide modification location confidence as a string
    • writeHeader

      public void writeHeader() throws IOException
      Writes the title of the section.
      Throws:
      IOException - exception thrown whenever an error occurred while writing the file