You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For the purpose of building out a GUI for the composite plot image generating tool (#96), the CLI class is broken up in this commit to separate out the input data parsing and chart building from command line parsing and input validation components in the CLI class. The new class organization further added minor adjustments to script behavior:
- the default filepath suffix is now "_plot.png"
- color defaults are determined by a null input and n>2 condition uses YEP color palette instead of Kelly colors
- data parsing issues throw Exceptions rather than print statements
- input/output extensions no longer restricted
The new ColorSeries class saves color palettes and can be reused and expanded upon for future tools.
* Command line interface class for scripts.Figure_Generation.PlotComposite to create line plot images based on the output files of scripts.Figure_Generation.TagPileup.
@Parameters(index = "0", description = "Composite data to plot. (formatted like TagPileup composite output)")
41
-
privateFilecompositeData;
33
+
privateFileinputComposite;
42
34
43
-
@Option(names = { "-o",
44
-
"--output" }, description = "specify output filename, please use PNG extension\n(default=Input filename with \"_compositePlot.png\" appended to the name in working directory of ScriptManager")
35
+
@Option(names = { "-o", "--output" }, description = "specify output filename, please use PNG extension\n(default=Input filename with \"_compositePlot.png\" appended to the name in working directory of ScriptManager")
* The script class to create/display line plot images based on the output files of scripts.Figure_Generation.TagPileup.
22
+
* @author Olivia Lang
23
+
* @see util.ColorSeries
24
+
* @see charts.CompositePlot
25
+
* @see cli.Figure_Generation.CompositePlotCLI
26
+
*/
27
+
publicclassPlotComposite {
28
+
29
+
/**
30
+
* Static method that parses the input composite data (formatted like output of TagPileup), determines the default color palette if none specified, and plots the line chart, saving the image file to the appropriate output if indicated.
31
+
* @param input a tab-delimited file containing the composite information in the format of scripts.Figure_Generation.TagPileup's output
32
+
* @param OUT_PATH filepath to save composite image to. if null, defaults to <InputWithoutExtension>_plot.png.
33
+
* @param outputImage to save image (true) or not (false)
34
+
* @param title the string to include at the top of the line chart
35
+
* @param COLORS the color palette list of colors to plot. If null, then a different color palette is chosen based on the number of lines parsed from the composite input file: if n=1, then black is used, if n=2, then the first plot is blue and the second is red, if n>2, then the YEP color pallete is used.
36
+
* @param legend to include the legend in the chart (true) or not (false)
System.err.println("(Caution!) Number of colors specified(" + COLORS.size() + ") doesnt match number of dataseries(" + dataset.getSeriesCount() + ")\n");
0 commit comments