Package com.compomics.util.gui.protein
Class ProteinSequencePane
java.lang.Object
com.compomics.util.gui.protein.ProteinSequencePane
public class ProteinSequencePane extends Object
This class contains a method that formats a given protein sequence such that
both the covered parts of the sequence and the peptide selected in the peptide
table is highlighted. The result is inserted into a JEditorPane.
- Author:
- Harald Barsnes
-
Constructor Summary
Constructors Constructor Description ProteinSequencePane()
Empty default constructor -
Method Summary
Modifier and Type Method Description static double
formatProteinSequence(JEditorPane editorPane, String cleanSequence, int[] coverage)
Formats the protein sequence such that the covered parts of the sequence is highlighted.static double
formatProteinSequence(JEditorPane editorPane, String cleanSequence, int[] coverage, TreeMap<String,String> keyValuePairs, HashMap<String,Color> tagColors, boolean showModifications, boolean showVariants, boolean showCoverage)
Formats the protein sequence such that the covered parts of the sequence is highlighted.static double
formatProteinSequence(JEditorPane editorPane, String cleanSequence, int selectedPeptideStart, int selectedPeptideEnd, int[] coverage)
Formats the protein sequence such that the covered parts of the sequence is highlighted.static double
formatProteinSequence(JEditorPane editorPane, String cleanSequence, int selectedPeptideStart, int selectedPeptideEnd, int[] coverage, TreeMap<String,String> aKeyValuePairs, HashMap<String,Color> selectedAnnotationType)
Formats the protein sequence such that both the covered parts of the sequence and the peptide selected in the peptide table is highlighted.static double
formatProteinSequence(JEditorPane editorPane, String cleanSequence, ArrayList<Integer> selectedPeptideStart, ArrayList<Integer> selectedPeptideEnd, int[] coverage)
Formats the protein sequence such that both the covered parts of the sequence and the peptide selected in the peptide table is highlighted.
-
Constructor Details
-
ProteinSequencePane
public ProteinSequencePane()Empty default constructor
-
-
Method Details
-
formatProteinSequence
public static double formatProteinSequence(JEditorPane editorPane, String cleanSequence, int[] coverage, TreeMap<String,String> keyValuePairs, HashMap<String,Color> tagColors, boolean showModifications, boolean showVariants, boolean showCoverage)Formats the protein sequence such that the covered parts of the sequence is highlighted. The result is inserted into the provided JEditorPane.- Parameters:
editorPane
- the editor pane to add the formatted sequence tocleanSequence
- the clean protein sequence, i.e., just the amino acid sequencecoverage
- the sequence coverage map with numbers indicating the number of times a given residue is used, zero means no coverage, (note: only uses index 1-n)keyValuePairs
- the key value pairs used for PEFF formatingtagColors
- the colors to use for the different tags, key is the tagshowModifications
- if the modifications are to be highlighted or notshowVariants
- if the variants are to be highlighted or notshowCoverage
- if the coverage is to be highlighted or not- Returns:
- the calculated sequence coverage in percent (0-100)
-
formatProteinSequence
public static double formatProteinSequence(JEditorPane editorPane, String cleanSequence, int[] coverage)Formats the protein sequence such that the covered parts of the sequence is highlighted. The result is inserted into the provided JEditorPane.- Parameters:
editorPane
- the editor pane to add the formatted sequence tocleanSequence
- the clean protein sequence, i.e., just the amino acid sequencecoverage
- the sequence coverage map with numbers indicating the number of times a given residue is used, zero means no coverage, (note: only uses index 1-n)- Returns:
- the calculated sequence coverage in percent (0-100)
-
formatProteinSequence
public static double formatProteinSequence(JEditorPane editorPane, String cleanSequence, int selectedPeptideStart, int selectedPeptideEnd, int[] coverage)Formats the protein sequence such that the covered parts of the sequence is highlighted. The result is inserted into the provided JEditorPane.- Parameters:
editorPane
- the editor pane to add the formatted sequence tocleanSequence
- the clean protein sequence, i.e., just the amino acid sequenceselectedPeptideStart
- the starting index of the selected peptideselectedPeptideEnd
- the ending index of the selected peptidecoverage
- the sequence coverage map with numbers indicating the number of times a given residue is used, zero means no coverage, (note: only uses index 1-n)- Returns:
- the calculated sequence coverage in percent (0-100)
-
formatProteinSequence
public static double formatProteinSequence(JEditorPane editorPane, String cleanSequence, ArrayList<Integer> selectedPeptideStart, ArrayList<Integer> selectedPeptideEnd, int[] coverage)Formats the protein sequence such that both the covered parts of the sequence and the peptide selected in the peptide table is highlighted. The result is inserted into the provided JEditorPane. This method accounts for redundancies of the selected peptide in the protein sequence- Parameters:
editorPane
- the editor pane to add the formatted sequence tocleanSequence
- the clean protein sequence, i.e., just the amino acid sequenceselectedPeptideStart
- the start indexes of the currently selected peptideselectedPeptideEnd
- the end indexes if the currently selected peptidecoverage
- the sequence coverage map with numbers indicating the number of times a given residue is used, zero means no coverage, (note: only uses index 1-n)- Returns:
- the calculated sequence coverage in percent (0-100)
-
formatProteinSequence
public static double formatProteinSequence(JEditorPane editorPane, String cleanSequence, int selectedPeptideStart, int selectedPeptideEnd, int[] coverage, TreeMap<String,String> aKeyValuePairs, HashMap<String,Color> selectedAnnotationType)Formats the protein sequence such that both the covered parts of the sequence and the peptide selected in the peptide table is highlighted. The result is inserted into the provided JEditorPane.- Parameters:
editorPane
- the editor pane to add the formatted sequence tocleanSequence
- the clean protein sequence, i.e., just the amino acid sequenceselectedPeptideStart
- the start index of the currently selected peptideselectedPeptideEnd
- the end index if the currently selected peptidecoverage
- the sequence coverage map with numbers indicating the number of times a given residue is used, zero means no coverage, (note: only uses index 1-n)aKeyValuePairs
- the key value pairs used for PEFF formatingselectedAnnotationType
- the colors to use for the different tags, key is the tag- Returns:
- the calculated sequence coverage in percent (0-100)
-