Class ProteinSequencePanel

java.lang.Object
eu.isas.peptideshaker.gui.protein_sequence.ProteinSequencePanel

public class ProteinSequencePanel extends Object
This class can be used to create a protein sequence plot.
Author:
Harald Barsnes, Marc Vaudel
  • Constructor Details

    • ProteinSequencePanel

      public ProteinSequencePanel(Color backgroundColor)
      Creates a new ProteinSequencePanel object. Use getSequencePlot() to get the plot/chart.
      Parameters:
      backgroundColor - the plot/chart background color
  • Method Details

    • setBackground

      public void setBackground(Color backgroundColor)
      Set the background color.
      Parameters:
      backgroundColor - the plot/chart background color
    • setReferenceLine

      public void setReferenceLine(double referenceLineWidth, Color referenceLineColor)
      Set the reference line properties. Will not have any effect until getSequencePlot(..) is called again with 'addReferenceLine' set to true.
      Parameters:
      referenceLineWidth - reference line width
      referenceLineColor - reference line color
    • getSequencePlot

      public org.jfree.chart.ChartPanel getSequencePlot(ProteinSequencePanelParent aProteinSequencePanelParent, no.uib.jsparklines.data.JSparklinesDataset sparklineDataset, HashMap<Integer,ArrayList<ResidueAnnotation>> proteinAnnotations, boolean addReferenceLine, boolean allowZooming)
      Returns a sequence plot as a ChartPanel.
      Parameters:
      aProteinSequencePanelParent - the protein sequence panel parent
      sparklineDataset - the dataset
      proteinAnnotations - the protein annotations
      addReferenceLine - if true, a reference line is added
      allowZooming - if true, the user can zoom in the created plot/chart
      Returns:
      a sequence plot
    • getChartPanel

      public org.jfree.chart.ChartPanel getChartPanel()
      Returns the chart panel.
      Returns:
      the chart panel
    • getSparkLineDataSeriesCoverage

      public static ArrayList<no.uib.jsparklines.data.JSparklinesDataSeries> getSparkLineDataSeriesCoverage(double[] aaHeight, int[] aaColorIndex, HashMap<Integer,Color> colors)
      Returns an array list with the coverage.
      Parameters:
      aaHeight - the heights
      aaColorIndex - the color indexes
      colors - the index to color map
      Returns:
      an array list with the coverage