Skip to content

tiny-plot: user-defined view limits for DGE scatter plots, and other consistency improvements#273

Merged
taimontgomery merged 8 commits intomasterfrom
issue-271
Jan 13, 2023
Merged

tiny-plot: user-defined view limits for DGE scatter plots, and other consistency improvements#273
taimontgomery merged 8 commits intomasterfrom
issue-271

Conversation

@AlexTate
Copy link
Member

@AlexTate AlexTate commented Jan 12, 2023

This PR adds options for user-specified min and/or max view limits for DGE scatter plots, which are specified as log2 count values and can be whole or fractional numbers. It also includes minor changes to output filenames from tiny-deseq and tiny-plot to be consistent with the "experimental condition vs. control condition" order used in DGE scatter plots. Plot titles and axis labels in bar plots have been updated to have sentence case, to be consistent with the scatter plots.

The following minor bugs have also been addressed:

  • A bug in lower view limit calculation that occurs when the feature with the lowest count also has a count of zero in another group/replicate (for DGE scatter plots and replicate scatter plots, respectively). Under certain conditions this could lead to the lowest count feature being clipped from the plot space. This is usually a non-issue due to the axes margins.
  • A divide by zero edge case for certain data limits while calculating major tick locations in scatter plots
  • The plot's true viewLimits are now used when placing major ticks (previously the data limit was used for the upper bound, but the view limit includes a margin if calculated automatically). This results in slightly more liberal placement of upper tick marks
  • The Run Config template in the testdata folder had not included the recently-added DGE class filtering options

Closes #271

… are free to specify either or both values. Values are expected to match what the user sees on the labeled plot axes, i.e. the log2 normalized value rather than the raw count value.

This commit also addresses a bug in the lower limit calculation that occurs when the feature with the lowest count also has a count of zero in another sample/group (for DGE scatter plots and replicate scatter plots, respectively). Under certain conditions this could lead to the lowest count feature being clipped from the plot space. This is usually a non-issue due to the axes margins.

get_scatter_view_lims() will report a warning if the values for axes.xmargin and axes.ymargin differ. The larger of the two values will be chosen if this happens.
… in filenames for tiny-deseq's DGE tables, and in tiny-plot's DGE scatter plots
… also includes a version bump since this PR represents the first functional change to tinyRNA since the v1.2.1 release
…e plugin for PyCharm so that it doesn't crash when using conda-provided R on macOS
@taimontgomery
Copy link
Collaborator

Tested custom plot limits successfully with Lib303 dataset. File names and plot labels are correct.

@taimontgomery taimontgomery merged commit 065b607 into master Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tiny-plot: user-defined view limits for DGE scatter plots, and other consistency improvements

2 participants