Class ProteinSequencePanel
java.lang.Object
eu.isas.peptideshaker.gui.protein_sequence.ProteinSequencePanel
This class can be used to create a protein sequence plot.
- Author:
- Harald Barsnes, Marc Vaudel
-
Constructor Summary
ConstructorsConstructorDescriptionProteinSequencePanel(Color backgroundColor) Creates a new ProteinSequencePanel object. -
Method Summary
Modifier and TypeMethodDescriptionorg.jfree.chart.ChartPanelReturns the chart panel.org.jfree.chart.ChartPanelgetSequencePlot(ProteinSequencePanelParent aProteinSequencePanelParent, no.uib.jsparklines.data.JSparklinesDataset sparklineDataset, HashMap<Integer, ArrayList<ResidueAnnotation>> proteinAnnotations, boolean addReferenceLine, boolean allowZooming) Returns a sequence plot as a ChartPanel.static ArrayList<no.uib.jsparklines.data.JSparklinesDataSeries> getSparkLineDataSeriesCoverage(double[] aaHeight, int[] aaColorIndex, HashMap<Integer, Color> colors) Returns an array list with the coverage.voidsetBackground(Color backgroundColor) Set the background color.voidsetReferenceLine(double referenceLineWidth, Color referenceLineColor) Set the reference line properties.
-
Constructor Details
-
ProteinSequencePanel
Creates a new ProteinSequencePanel object. Use getSequencePlot() to get the plot/chart.- Parameters:
backgroundColor- the plot/chart background color
-
-
Method Details
-
setBackground
Set the background color.- Parameters:
backgroundColor- the plot/chart background color
-
setReferenceLine
Set the reference line properties. Will not have any effect until getSequencePlot(..) is called again with 'addReferenceLine' set to true.- Parameters:
referenceLineWidth- reference line widthreferenceLineColor- 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 parentsparklineDataset- the datasetproteinAnnotations- the protein annotationsaddReferenceLine- if true, a reference line is addedallowZooming- 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 heightsaaColorIndex- the color indexescolors- the index to color map- Returns:
- an array list with the coverage
-