Skip to content

Enhance GenomicFigure aesthetics and add scaling options for coverage tracks#15

Open
alsmith151 wants to merge 5 commits intomainfrom
feat/aesthetic-plot-improvements
Open

Enhance GenomicFigure aesthetics and add scaling options for coverage tracks#15
alsmith151 wants to merge 5 commits intomainfrom
feat/aesthetic-plot-improvements

Conversation

@alsmith151
Copy link
Copy Markdown
Owner

This pull request introduces new normalization and scaling options for QuantNado coverage tracks, improves the flexibility of plotting, and adds convenience methods and minor bug fixes. The most important changes are grouped below by theme.

QuantNado Coverage Track Enhancements:

  • Added new parameters (scaling_factor, normalise, normalize, and library_sizes) to QuantNadoCoverageTrack and QuantNadoStrandedCoverageTrack for more flexible normalization and scaling of coverage data. These parameters are now passed directly to QuantNado's extraction methods and applied to the resulting data. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Updated the internal data fetching logic in both coverage track classes to apply scaling_factor and normalization options, ensuring consistent processing whether using precomputed or freshly extracted data. [1] [2]

API and Usability Improvements:

  • Added a defaults method to GenomicFigure for quickly applying a standard scaffold (autocolor, scalebar, and gene annotation) with optional genome and palette parameters. [1] [2]
  • Improved the subplot creation in the plot method of GenomicFigure by sharing the x-axis among tracks, which enhances usability and consistency in the output figures.

Documentation and Testing:

  • Updated the docstring example for GenomicFigure to use Python prompt-style formatting for clarity.
  • Added a new test script test_quantnado.py demonstrating the use of the new normalization and scaling options with real data.

Bug Fixes:

  • Fixed vertical alignment issues for titles and scale bars in track plotting by correcting y-position calculations and ensuring fallback to default text bounding boxes when needed. [1] [2]

Dependency Update:

  • Added an explicit import of pandas as pd in plotnado/tracks/quantnado.py to support new parameter types.

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.

1 participant