Table.barplot.R
Creates nice barplots from tab-delimited tables.
See source code, Artistic license 2.0.
§ References
Rodriguez-R & Konstantinidis, 2016, PeerJ Preprints.
§ Requirements
§ Usage
Table.barplot.R --x in_file [opts] out_file float float
§ Arguments
- Input file*
--x in_file
A tab-delimited file containing header (first row) and row names (first column).- Sizes
--sizes string
A numeric vector containing the real size of the samples (columns) in the same order of the input table. If set, the values are assumed to be 100%, otherwise the sum of the columns is used. Separate values by commas.- Top
--top integer
Maximum number of categories to display. Any additional categories will be listed as 'Others'.- Colors per group
--colors-per-group integer
Number of categories in the first two saturation groups of colors. The third group contains the remaining categories if needed.- Bars width
--bars-width integer
Width of the barplot with respect to the legend.- Legend ncol
--legend-ncol integer
Number of columns in the legend.- Other col
--other-col string
Color of the 'Others' category.- Add trend
--add-trend
Controls if semi-transparent areas are to be plotted between the bars to connect the regions (trend regions).- Organic trend
--organic-trend
Controls if the trend regions are to be smoothed (curves). By default, trend regions have straight edges. If TRUE, forces add.trend=TRUE.- Sort by
--sort-by string
Any function that takes a numeric vector and returns a numeric scalar. This function is applied to each row, and the resulting values are used to sort the rows (decreasingly). Good options include: sd, min, max, mean, median.- Min report
--min-report integer
Minimum percentage to report the value in the plot. Any value above 100 indicates that no values are to be reported.- Order
--order string
Controls how the rows should be ordered. If empty (default), sort.by is applied per row and the results are sorted decreasingly. If NA, no sorting is performed, i.e., the original order is respected. If a vector is provided, it is assumed to be the custom order to be used (either by numeric index or by row names). Separate values by commas.- Col
--col string
Colors to use. If provided, overrides the variables `top` and `colors.per.group`, but `other.col` is still used if the vector is insufficient for all the rows. Separate values by commas. An additional palette is available when using value 'coto' (palette contributed by Luis (Coto) Orellana).- Output file*
out_file
Output file in PDF format.- width*
float
Width of the plot (in inches).- height*
float
Height of the plot (in inches).