Package eu.isas.peptideshaker.utils
Class DisplayFeaturesGenerator
java.lang.Object
eu.isas.peptideshaker.utils.DisplayFeaturesGenerator
This class creates the display features needed for the GUI.
- Author:
- Marc Vaudel, Harald Barsnes
-
Constructor Summary
ConstructorsConstructorDescriptionDisplayFeaturesGenerator(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 TypeMethodDescriptionReturns 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.getGoAccessionLink(String goAccession) 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 StringgetPrideAccessionLink(String projectAccession) Returns the project accession number as a web link to the given project in PRIDE.static StringgetPrideAssayArchiveLink(String projectAccession, String assayAccession) Returns the assay accession number as a web link to the given assay in the PRIDE archive.static StringgetPrideProjectArchiveLink(String projectAccession) 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.
-
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 parametersdisplayParameters- the display parameterssequenceProvider- the sequence providerproteinDetailsProvider- the protein details provider
-
-
Method Details
-
getDatabaseLink
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 forincludeHtmlTags- if true, the starting and ending HTML tags are includedunderlineLink- if true, the link is underlined- Returns:
- the transformed accession number
-
getDatabaseLinks
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
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 forunderlineLink- if true, the link is underlined- Returns:
- the transformed accession number
-
getSrsAccessionLink
Returns the protein accession number as a web link to the given protein at https://srs.ebi.ac.uk.- Parameters:
proteinAccession- the protein accession numberdatabase- the protein database- Returns:
- the protein accession web link
-
getUniProtAccessionLink
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
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
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
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
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
Returns the assay accession number as a web link to the given assay in the PRIDE archive.- Parameters:
projectAccession- the project accession numberassayAccession- 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 peptidemodificationScores- 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 arraydisplayedModifications- 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 interestuseHtmlColorCoding- if true, color coded HTML is used, otherwise modification tags, e.g, <mox>, are usedincludeHtmlStartEndTags- if true, HTML start and end tags are addeduseShortName- 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 interestuseHtmlColorCoding- if true, color coded HTML is used, otherwise modification tags, e.g, <mox>, are usedincludeHtmlStartEndTags- if true, HTML start and end tags are addeduseShortName- 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 interestmodificationScores- the modification localization scoresuseHtmlColorCoding- if true, color coded HTML is used, otherwise modification tags, e.g, <mox>, are usedincludeHtmlStartEndTags- if true, HTML start and end tags are addeduseShortName- 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 displaydisplayedModifications- 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 displaydisplayedModifications- the names of the modifications to display- Returns:
- a map of filtered modifications based on the user display preferences
-
addGoLink
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
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 interestsequenceMatchingPreferences- The sequence matching preferencesidentificationFeaturesGenerator- the identification feature generatormetrics- the metricsidentification- the identificationallPeptides- if true, all peptides are consideredsearchParameters- the search parametersenzymatic- whether enzymatic only or not enzymatic only peptides should be considered- Returns:
- the residue annotation for a given protein
-