com.compomics.util.gui.protein
Class ProteinSequencePane

java.lang.Object
  extended by 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
ProteinSequencePane()
           
 
Method Summary
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.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProteinSequencePane

public ProteinSequencePane()
Method Detail

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 to
cleanSequence - the clean protein sequence, i.e., just the amino acid sequence
coverage - 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 formating
tagColors - the colors to use for the different tags, key is the tag
showModifications - if the modifications are to be highlighted or not
showVariants - if the variants are to be highlighted or not
showCoverage - 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 to
cleanSequence - the clean protein sequence, i.e., just the amino acid sequence
coverage - 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 to
cleanSequence - the clean protein sequence, i.e., just the amino acid sequence
selectedPeptideStart - the starting index of the selected peptide
selectedPeptideEnd - the ending index of the selected peptide
coverage - 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 to
cleanSequence - the clean protein sequence, i.e., just the amino acid sequence
selectedPeptideStart - the start indexes of the currently selected peptide
selectedPeptideEnd - the end indexes if the currently selected peptide
coverage - 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 to
cleanSequence - the clean protein sequence, i.e., just the amino acid sequence
selectedPeptideStart - the start index of the currently selected peptide
selectedPeptideEnd - the end index if the currently selected peptide
coverage - 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 formating
selectedAnnotationType - the colors to use for the different tags, key is the tag
Returns:
the calculated sequence coverage in percent (0-100)


Copyright © 2012. All Rights Reserved.