Skip to content

Commit dc08e39

Browse files
committed
Detail corrections for tiny-plot:
- Uses of "stylesheet" are corrected to "style sheet" per the matplotlib documentation - A note about zero-count features/classes for the scatter_dge plots - Various clarifying edits, small stuff
1 parent f613b09 commit dc08e39

5 files changed

Lines changed: 13 additions & 10 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ At the core of tinyRNA is tiny-count, a highly flexible counting utility that al
161161
A wrapper R script for DESeq2 facilitates DGE analysis of counted sample files.
162162

163163
### `tiny-plot`
164-
The results of feature counting and DGE analysis are visualized with high resolution plot PDFs. User-defined plot styles are also supported via a Matplotlib stylesheet.
164+
The results of feature counting and DGE analysis are visualized with high resolution plot PDFs. User-defined plot styles are also supported via a Matplotlib style sheet.
165165

166166
[Full documentation for tiny-plot can be found here.](doc/tiny-plot.md)
167167

doc/Configuration.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ To make it simple to specify your fastq files and their locations, along with as
3232

3333
Small RNAs can often be classified by sequence characteristics, such as length, strandedness, and 5' nucleotide. We provide a Features Sheet (`features.csv`) in which you can define selection rules to more accurately capture counts for the small RNAs of interest. [More info](#features-sheet-details).
3434

35-
#### Plot Stylesheet
35+
#### Plot Style Sheet
3636

37-
Plot styles can be optionally overridden using a matplotlibrc stylesheet. [More info](#plot-stylesheet-details).
37+
Plot styles can be optionally overridden using a matplotlibrc style sheet. [More info](#plot-style-sheet-details).
3838

3939
## Editing YAML Files
4040
The Run Config and Paths File are YAML formatted files that can be edited with a text editor. Changing values in these files is pretty straight forward, but it is useful to know a little about YAML syntax.
@@ -174,5 +174,5 @@ Examples:
174174
### Case Sensitivity
175175
All selectors are case-insensitive.
176176

177-
## Plot Stylesheet Details
178-
Matplotlib uses key-value "rc parameters" to allow for customization of its properties and styles, and one way these parameters can be specified is with a [matplotlibrc file](https://matplotlib.org/3.4.3/tutorials/introductory/customizing.html#a-sample-matplotlibrc-file), which we simply refer to as the Plot Stylesheet. You can obtain a copy of the default stylesheet used by tiny-plot with the command `tiny get-templates`. Please keep in mind that tiny-plot overrides these defaults for a few specific elements of certain plots. Feel free to reach out if there is a plot style you wish to override but find you are unable to.
177+
## Plot Style Sheet Details
178+
Matplotlib uses key-value "rc parameters" to allow for customization of its properties and styles, and one way these parameters can be specified is with a [matplotlibrc file](https://matplotlib.org/3.5.2/tutorials/introductory/customizing.html#a-sample-matplotlibrc-file), which we simply refer to as the Plot Style Sheet. You can obtain a copy of the default style sheet used by tiny-plot with the command `tiny get-templates`, and your modified style sheet can be passed using the [plot_style_sheet parameter](Parameters.md#style-sheet). Please keep in mind that tiny-plot overrides these defaults for a few specific elements of certain plots. Feel free to reach out if there is a plot style you wish to override but find you are unable to.

doc/Parameters.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Feature expression levels are considered significant if their P value is less th
217217
|----------------|-------------------|--------------------------|
218218
| | plot_style_sheet: | `--style-sheet MPLSTYLE` |
219219

220-
The plot style sheet can be used to override the default Matplotlib styles used by tiny-plot. Unlike the other parameters, this option is found in the Paths File. See the [Plot Stylesheet documentation](Configuration.md#plot-stylesheet-details) for more information.
220+
The plot style sheet can be used to override the default Matplotlib styles used by tiny-plot. Unlike the other parameters, this option is found in the Paths File. The expected value for this parameter is the path to your modified style sheet. See the [Plot Style Sheet documentation](Configuration.md#plot-style-sheet-details) for more information.
221221

222222
### Vector Scatter
223223
| Run Config Key | Commandline Argument |
@@ -241,7 +241,7 @@ The min and/or max bounds for plotted lengths can be set with this option. See [
241241
| plot_dge_scatter_min: | `--dge-min VALUE` |
242242
| plot_dge_scatter_max: | `--dge-max VALUE` |
243243

244-
The min and/or max bounds for DGE scatter plots can be set with this option. The value you provide should be a log2 count value and can be whole or fractional, e.g. `--dge-min 1.9` would produce a plot whose first tick mark is labeled 2 and would include points for feature counts as low as 3.74. Unspecified bounds are automatically calculated to fit the data, and will include the margin specified by the `axes.[x/y]margin` key in the [Plot Stylesheet](Configuration.md#plot-stylesheet-details).
244+
The min and/or max bounds for DGE scatter plots can be set with this option. The value you provide should be a log2 count value and can be whole or fractional, e.g. `--dge-min 1.9` would produce a plot whose first tick mark is labeled 2 and would include points for feature counts as low as 3.74. Unspecified bounds are automatically calculated to fit the data, and will include the margin specified by the `axes.[x/y]margin` key in the [Plot Style Sheet](Configuration.md#plot-style-sheet-details).
245245

246246
### Labels for Class-related Plots
247247
| Run Config Key | Commandline Argument |

doc/tiny-plot.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Rules are referred to by their row number in the Features Sheet and the first no
5959
- Alignments which do not overlap with any features
6060

6161
#### Rule Chart Styles
62-
Percentage label darkness and bar colors reflect the magnitude of the rule's contribution. Magnitude is always considered on a 0-100% scale, rather than scaling down to the chart's view limits. These styles cannot be changed using a plot stylesheet.
62+
Percentage label darkness and bar colors reflect the magnitude of the rule's contribution. Magnitude is always considered on a 0-100% scale, rather than scaling down to the chart's view limits. These styles cannot be changed using a plot style sheet.
6363

6464

6565

@@ -111,6 +111,9 @@ The control condition is plotted on the x-axis, but it must be specified in your
111111
#### View Limits
112112
Both the lower and upper bound of the plot's axes [can be set manually](Parameters.md#bounds-for-lendist-charts). Unspecified bounds are automatically calculated to fit the data.
113113

114+
#### Zero-Count Features
115+
Due to the plot's log scale, points are not plotted for features that have 0 reads in one of the compared conditions. Zero-count features will be supported in a future release.
116+
114117

115118

116119
## sample_avg_scatter_by_dge_class

tiny/rna/plotterlib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,13 +383,13 @@ def get_scatter_view_lims(counts_df: pd.DataFrame, vmin: int = None, vmax: int =
383383
x0, x1 = (minpos if x0 <= 0 else x0,
384384
minpos if x1 <= 0 else x1)
385385

386-
# Get axes margin preferences from stylesheet
386+
# Get axes margin preferences from style sheet
387387
rc_mar = {mpl.rcParams.get(f"axes.{m}", 0)
388388
for m in ('xmargin', 'ymargin')}
389389

390390
margin = max(rc_mar)
391391
if len(rc_mar) != 1:
392-
print("Stylesheet values for axes.xmargin and axes.ymargin differ. "
392+
print("Style sheet values for axes.xmargin and axes.ymargin differ. "
393393
"The larger value will be chosen for the scatter plot margin.",
394394
file=sys.stderr)
395395

0 commit comments

Comments
 (0)