Class DisplayFeaturesGenerator

java.lang.Object
eu.isas.peptideshaker.utils.DisplayFeaturesGenerator

public class DisplayFeaturesGenerator extends Object
This class creates the display features needed for the GUI.
Author:
Marc Vaudel, Harald Barsnes
  • Constructor Summary

    Constructors
    Constructor
    Description
    DisplayFeaturesGenerator(com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, DisplayParameters displayParameters, com.compomics.util.experiment.io.biology.protein.SequenceProvider sequenceProvider, com.compomics.util.experiment.io.biology.protein.ProteinDetailsProvider proteinDetailsProvider)
    Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    addGoLink(String goAccession)
    Returns the GO accession number as a web link to the given GO term at QuickGO.
    getDatabaseLink(String proteinAccession)
    Transforms the protein accession number into an HTML link to the corresponding database.
    getDatabaseLink(String proteinAccession, boolean includeHtmlTags, boolean underlineLink)
    Transforms the protein accession number into an HTML link to the corresponding database.
    getDatabaseLinks(String[] proteinAccessions)
    Transforms the protein accession number into an HTML link to the corresponding database.
    getDatabaseLinks(String[] proteinAccessions, boolean underlineLink)
    Transforms the protein accession number into an HTML link to the corresponding database.
    static String[]
    getDisplayedModifications(String[] modificationArray, HashSet<String> displayedModifications)
    Returns an array containing only the modifications to display.
    static String[]
    getFilteredAmbiguousModifications(com.compomics.util.experiment.biology.proteins.Peptide peptide, HashSet<String> displayedModifications)
    Exports the modifications that are not confidently localized.
    static String[]
    getFilteredConfidentModificationsSites(com.compomics.util.experiment.biology.proteins.Peptide peptide, HashSet<String> displayedModifications)
    Exports the confidently localized modification sites in a map: site > mapped modifications.
    Returns the GO accession number as a web link to the given GO term at QuickGO.
    getNcbiAccessionLink(String proteinAccession)
    Returns the protein accession number as a web link to the given protein at https://www.ncbi.nlm.nih.gov/protein.
    getNextProtAccessionLink(String proteinAccession)
    Returns the protein accession number as a web link to the given protein at https://www.nextprot.org.
    getPeptideModificationTooltipAsHtml(com.compomics.util.experiment.biology.proteins.Peptide peptide)
    Returns a string with the HTML tooltip for the peptide indicating the modification details.
    getPeptideModificationTooltipAsHtml(com.compomics.util.experiment.biology.proteins.Peptide peptide, com.compomics.util.experiment.identification.peptide_shaker.PSModificationScores modificationScores)
    Returns a string with the HTML tooltip for the peptide indicating the modification details.
    getPeptideModificationTooltipAsHtml(com.compomics.util.experiment.identification.matches.PeptideMatch peptideMatch)
    Returns a string with the HTML tooltip for the peptide indicating the modification details.
    getPeptideModificationTooltipAsHtml(com.compomics.util.experiment.identification.matches.SpectrumMatch spectrumMatch)
    Returns a string with the HTML tooltip for the peptide indicating the modification details.
    static String
    getPrideAccessionLink(String projectAccession)
    Returns the project accession number as a web link to the given project in PRIDE.
    static String
    getPrideAssayArchiveLink(String projectAccession, String assayAccession)
    Returns the assay accession number as a web link to the given assay in the PRIDE archive.
    static String
    Returns the project accession number as a web link to the given project in the PRIDE archive.
    getResidueAnnotation(long proteinMatchKey, com.compomics.util.parameters.identification.advanced.SequenceMatchingParameters sequenceMatchingPreferences, com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator identificationFeaturesGenerator, com.compomics.util.experiment.identification.peptide_shaker.Metrics metrics, com.compomics.util.experiment.identification.Identification identification, boolean allPeptides, com.compomics.util.parameters.identification.search.SearchParameters searchParameters, boolean enzymatic)
    Returns the residue annotation for a given protein in a map for enzymatic or not enzymatic peptides only.
    getSrsAccessionLink(String proteinAccession, String database)
    Returns the protein accession number as a web link to the given protein at https://srs.ebi.ac.uk.
    getTaggedPeptideSequence(com.compomics.util.experiment.biology.proteins.Peptide peptide, com.compomics.util.experiment.identification.peptide_shaker.PSModificationScores modificationScores, boolean useHtmlColorCoding, boolean includeHtmlStartEndTags, boolean useShortName)
    Returns the peptide with modification sites tagged (color coded or with modification tags, e.g, <mox>) in the sequence based on the provided modification localization scores.
    getTaggedPeptideSequence(com.compomics.util.experiment.identification.matches.PeptideMatch peptideMatch, boolean useHtmlColorCoding, boolean includeHtmlStartEndTags, boolean useShortName)
    Returns the peptide with modification sites tagged (color coded or with modification tags, e.g, <mox>) in the sequence based on PeptideShaker site inference results for the given peptide match.
    getTaggedPeptideSequence(com.compomics.util.experiment.identification.matches.SpectrumMatch spectrumMatch, boolean useHtmlColorCoding, boolean includeHtmlStartEndTags, boolean useShortName)
    Returns the peptide with modification sites tagged (color coded or with modification tags, e.g, <mox>) in the sequence based on PeptideShaker site inference results for the best assumption of the given spectrum match.
    getTagModificationTooltipAsHtml(com.compomics.util.experiment.identification.amino_acid_tags.Tag tag)
    Returns a string with the HTML tooltip for the tag indicating the modification details.
    getUniProtAccessionLink(String proteinAccession)
    Returns the protein accession number as a web link to the given protein at https://www.uniprot.org/uniprot.

    Methods inherited from class java.lang.Object

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

    • DisplayFeaturesGenerator

      public DisplayFeaturesGenerator(com.compomics.util.parameters.identification.IdentificationParameters identificationParameters, DisplayParameters displayParameters, com.compomics.util.experiment.io.biology.protein.SequenceProvider sequenceProvider, com.compomics.util.experiment.io.biology.protein.ProteinDetailsProvider proteinDetailsProvider)
      Constructor
      Parameters:
      identificationParameters - the identification parameters
      displayParameters - the display parameters
      sequenceProvider - the sequence provider
      proteinDetailsProvider - the protein details provider
  • Method Details

    • getDatabaseLink

      public String getDatabaseLink(String proteinAccession)
      Transforms the protein accession number into an HTML link to the corresponding database. Note that this is a complete HTML with HTML and a href tags, where the main use is to include it in the protein tables.
      Parameters:
      proteinAccession - the protein to get the database link for
      Returns:
      the transformed accession number
    • getDatabaseLink

      public String getDatabaseLink(String proteinAccession, boolean includeHtmlTags, boolean underlineLink)
      Transforms the protein accession number into an HTML link to the corresponding database.
      Parameters:
      proteinAccession - the protein to get the database link for
      includeHtmlTags - if true, the starting and ending HTML tags are included
      underlineLink - if true, the link is underlined
      Returns:
      the transformed accession number
    • getDatabaseLinks

      public String getDatabaseLinks(String[] proteinAccessions)
      Transforms the protein accession number into an HTML link to the corresponding database. Note that this is a complete HTML with HTML and a href tags, where the main use is to include it in the protein tables.
      Parameters:
      proteinAccessions - the list of the accessions of proteins to get the database links for
      Returns:
      the transformed accession number
    • getDatabaseLinks

      public String getDatabaseLinks(String[] proteinAccessions, boolean underlineLink)
      Transforms the protein accession number into an HTML link to the corresponding database. Note that this is a complete HTML with HTML and a href tags, where the main use is to include it in the protein tables.
      Parameters:
      proteinAccessions - the list of the accessions of proteins to get the database links for
      underlineLink - if true, the link is underlined
      Returns:
      the transformed accession number
    • getSrsAccessionLink

      public String getSrsAccessionLink(String proteinAccession, String database)
      Returns the protein accession number as a web link to the given protein at https://srs.ebi.ac.uk.
      Parameters:
      proteinAccession - the protein accession number
      database - the protein database
      Returns:
      the protein accession web link
    • getUniProtAccessionLink

      public String getUniProtAccessionLink(String proteinAccession)
      Returns the protein accession number as a web link to the given protein at https://www.uniprot.org/uniprot.
      Parameters:
      proteinAccession - the protein accession number
      Returns:
      the protein accession web link
    • getNextProtAccessionLink

      public String getNextProtAccessionLink(String proteinAccession)
      Returns the protein accession number as a web link to the given protein at https://www.nextprot.org.
      Parameters:
      proteinAccession - the protein accession number
      Returns:
      the protein accession web link
    • getNcbiAccessionLink

      public String getNcbiAccessionLink(String proteinAccession)
      Returns the protein accession number as a web link to the given protein at https://www.ncbi.nlm.nih.gov/protein.
      Parameters:
      proteinAccession - the protein accession number
      Returns:
      the protein accession web link
    • getPrideAccessionLink

      public static String getPrideAccessionLink(String projectAccession)
      Returns the project accession number as a web link to the given project in PRIDE.
      Parameters:
      projectAccession - the project accession number
      Returns:
      the project accession web link
    • getPrideProjectArchiveLink

      public static String getPrideProjectArchiveLink(String projectAccession)
      Returns the project accession number as a web link to the given project in the PRIDE archive.
      Parameters:
      projectAccession - the project accession number
      Returns:
      the project accession web link
    • getPrideAssayArchiveLink

      public static String getPrideAssayArchiveLink(String projectAccession, String assayAccession)
      Returns the assay accession number as a web link to the given assay in the PRIDE archive.
      Parameters:
      projectAccession - the project accession number
      assayAccession - the assay accession number
      Returns:
      the project accession web link
    • getPeptideModificationTooltipAsHtml

      public String getPeptideModificationTooltipAsHtml(com.compomics.util.experiment.identification.matches.SpectrumMatch spectrumMatch)
      Returns a string with the HTML tooltip for the peptide indicating the modification details.
      Parameters:
      spectrumMatch - the spectrum match
      Returns:
      a string with the HTML tooltip for the peptide
    • getPeptideModificationTooltipAsHtml

      public String getPeptideModificationTooltipAsHtml(com.compomics.util.experiment.identification.matches.PeptideMatch peptideMatch)
      Returns a string with the HTML tooltip for the peptide indicating the modification details.
      Parameters:
      peptideMatch - the peptide match
      Returns:
      a string with the HTML tooltip for the peptide
    • getPeptideModificationTooltipAsHtml

      public String getPeptideModificationTooltipAsHtml(com.compomics.util.experiment.biology.proteins.Peptide peptide, com.compomics.util.experiment.identification.peptide_shaker.PSModificationScores modificationScores)
      Returns a string with the HTML tooltip for the peptide indicating the modification details.
      Parameters:
      peptide - the peptide
      modificationScores - the modification scores
      Returns:
      a string with the HTML tooltip for the peptide
    • getDisplayedModifications

      public static String[] getDisplayedModifications(String[] modificationArray, HashSet<String> displayedModifications)
      Returns an array containing only the modifications to display.
      Parameters:
      modificationArray - the original array
      displayedModifications - the displayed modifications
      Returns:
      an array containing only the modifications to display
    • getPeptideModificationTooltipAsHtml

      public String getPeptideModificationTooltipAsHtml(com.compomics.util.experiment.biology.proteins.Peptide peptide)
      Returns a string with the HTML tooltip for the peptide indicating the modification details.
      Parameters:
      peptide - the peptide
      Returns:
      a string with the HTML tooltip for the peptide
    • getTagModificationTooltipAsHtml

      public String getTagModificationTooltipAsHtml(com.compomics.util.experiment.identification.amino_acid_tags.Tag tag)
      Returns a string with the HTML tooltip for the tag indicating the modification details. Null if no modifications.
      Parameters:
      tag - the tag
      Returns:
      a string with the HTML tooltip for the tag
    • getTaggedPeptideSequence

      public String getTaggedPeptideSequence(com.compomics.util.experiment.identification.matches.PeptideMatch peptideMatch, boolean useHtmlColorCoding, boolean includeHtmlStartEndTags, boolean useShortName)
      Returns the peptide with modification sites tagged (color coded or with modification tags, e.g, <mox>) in the sequence based on PeptideShaker site inference results for the given peptide match.
      Parameters:
      peptideMatch - the peptide match of interest
      useHtmlColorCoding - if true, color coded HTML is used, otherwise modification tags, e.g, <mox>, are used
      includeHtmlStartEndTags - if true, HTML start and end tags are added
      useShortName - if true the short names are used in the tags
      Returns:
      the tagged peptide sequence
    • getTaggedPeptideSequence

      public String getTaggedPeptideSequence(com.compomics.util.experiment.identification.matches.SpectrumMatch spectrumMatch, boolean useHtmlColorCoding, boolean includeHtmlStartEndTags, boolean useShortName)
      Returns the peptide with modification sites tagged (color coded or with modification tags, e.g, <mox>) in the sequence based on PeptideShaker site inference results for the best assumption of the given spectrum match.
      Parameters:
      spectrumMatch - the spectrum match of interest
      useHtmlColorCoding - if true, color coded HTML is used, otherwise modification tags, e.g, <mox>, are used
      includeHtmlStartEndTags - if true, HTML start and end tags are added
      useShortName - if true the short names are used in the tags
      Returns:
      the tagged peptide sequence
    • getTaggedPeptideSequence

      public String getTaggedPeptideSequence(com.compomics.util.experiment.biology.proteins.Peptide peptide, com.compomics.util.experiment.identification.peptide_shaker.PSModificationScores modificationScores, boolean useHtmlColorCoding, boolean includeHtmlStartEndTags, boolean useShortName)
      Returns the peptide with modification sites tagged (color coded or with modification tags, e.g, <mox>) in the sequence based on the provided modification localization scores.
      Parameters:
      peptide - the spectrum match of interest
      modificationScores - the modification localization scores
      useHtmlColorCoding - if true, color coded HTML is used, otherwise modification tags, e.g, <mox>, are used
      includeHtmlStartEndTags - if true, HTML start and end tags are added
      useShortName - if true the short names are used in the tags
      Returns:
      the tagged peptide sequence
    • getFilteredConfidentModificationsSites

      public static String[] getFilteredConfidentModificationsSites(com.compomics.util.experiment.biology.proteins.Peptide peptide, HashSet<String> displayedModifications)
      Exports the confidently localized modification sites in a map: site > mapped modifications.
      Parameters:
      peptide - the peptide to display
      displayedModifications - the names of the modifications to display
      Returns:
      a map of filtered modifications based on the user display preferences
    • getFilteredAmbiguousModifications

      public static String[] getFilteredAmbiguousModifications(com.compomics.util.experiment.biology.proteins.Peptide peptide, HashSet<String> displayedModifications)
      Exports the modifications that are not confidently localized.
      Parameters:
      peptide - the peptide to display
      displayedModifications - the names of the modifications to display
      Returns:
      a map of filtered modifications based on the user display preferences
    • addGoLink

      public String addGoLink(String goAccession)
      Returns the GO accession number as a web link to the given GO term at QuickGO.
      Parameters:
      goAccession - the GO accession number
      Returns:
      the GO accession number as a web link to the given GO term at QuickGO
    • getGoAccessionLink

      public String getGoAccessionLink(String goAccession)
      Returns the GO accession number as a web link to the given GO term at QuickGO.
      Parameters:
      goAccession - the GO accession number
      Returns:
      the GO accession web link
    • getResidueAnnotation

      public HashMap<Integer,ArrayList<ResidueAnnotation>> getResidueAnnotation(long proteinMatchKey, com.compomics.util.parameters.identification.advanced.SequenceMatchingParameters sequenceMatchingPreferences, com.compomics.util.experiment.identification.features.IdentificationFeaturesGenerator identificationFeaturesGenerator, com.compomics.util.experiment.identification.peptide_shaker.Metrics metrics, com.compomics.util.experiment.identification.Identification identification, boolean allPeptides, com.compomics.util.parameters.identification.search.SearchParameters searchParameters, boolean enzymatic)
      Returns the residue annotation for a given protein in a map for enzymatic or not enzymatic peptides only. Residue number > annotations. 0 is the first amino acid.
      Parameters:
      proteinMatchKey - the key of the match of interest
      sequenceMatchingPreferences - The sequence matching preferences
      identificationFeaturesGenerator - the identification feature generator
      metrics - the metrics
      identification - the identification
      allPeptides - if true, all peptides are considered
      searchParameters - the search parameters
      enzymatic - whether enzymatic only or not enzymatic only peptides should be considered
      Returns:
      the residue annotation for a given protein