Skip to content

All stat and plot generation functions - #3

Merged
AbhirupaGhosh merged 19 commits into
mainfrom
generate_stat_plot
Jul 28, 2026
Merged

All stat and plot generation functions#3
AbhirupaGhosh merged 19 commits into
mainfrom
generate_stat_plot

Conversation

@AbhirupaGhosh

Copy link
Copy Markdown
Contributor

Description

What kind of change(s) are included?

  • Feature (adds or updates new capabilities)
  • Bug fix (fixes an issue).
  • Enhancement (adds functionality).
  • Breaking change (these changes would cause existing functionality to not work as expected).

Checklist

Please ensure that all boxes are checked before indicating that this pull request is ready for review.

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have searched for existing content to ensure this is not a duplicate.
  • I have performed a self-review of these additions (including spelling, grammar, and related).
  • I have added comments to my code to help provide understanding.
  • I have added a test which covers the code changes found within this PR.
  • I have deleted all non-relevant text in this pull request template.
  • Reviewer assignment: Tag a relevant team member to review and approve the changes.

epbrenner and others added 3 commits January 20, 2026 17:42
Updated the Markdown design because the tables were coming out as weird piles of spaghetti instead. Added a helper function to simplify some of the repeated operations. Added new package to DESCRIPTION file. Plots have issues with labels clipping out of view, TBA.
@AbhirupaGhosh
AbhirupaGhosh requested a review from eboyer221 June 4, 2026 19:53
@AbhirupaGhosh

Copy link
Copy Markdown
Contributor Author

The script works with the example metadata.parquet with the following calls.

source("R/amRdataPlots.R")
generateSummary("data/metadata.parquet", out_path = "data/")
generatePlots("data/metadata.parquet", out_path = "data/")

@AbhirupaGhosh
AbhirupaGhosh marked this pull request as ready for review July 27, 2026 22:49
- add custom colors based on other 2 packages
- cleanup and sort results from summarization fn
- cleaned up titles/labels in both functions
- generated example PDF, MD, HTML
- rm oneoff dependencies like treemap + unused kableExtra
- consistency check between 'resistant isolates' vs. 'AMR isolates' vs. genomes in some cases. still needs checking.

@jananiravi jananiravi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Left a few comments for revision.

Comment thread R/utils_colors.R
Comment thread R/amRdataPlots.R
Comment thread R/amRdataPlots.R
Comment thread R/amRdataPlots.R Outdated
Comment thread R/amRdataPlots.R Outdated
Comment thread R/amRdataPlots.R
AbhirupaGhosh and others added 4 commits July 27, 2026 18:12
- Include total observations, unique genome IDs, and associated publications.
- Detail antibiotics and antibiotic classes with counts.
- Present phenotype counts and resistant proportions per antibiotic and class.
- Summarize laboratory methods, collection years, isolation countries, sources, and hosts.
@AbhirupaGhosh

Copy link
Copy Markdown
Contributor Author

I addressed @jananiravi 's comments and suggestions.

jananiravi
jananiravi previously approved these changes Jul 28, 2026
Comment thread data/amr_metadata_summary.md Outdated

@eboyer221 eboyer221 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick turnaround on the changes we discussed @AbhirupaGhosh! Confirming everything's resolved.
Holding off on tests for now, but we can follow up in a later PR. Approving.

@AbhirupaGhosh
AbhirupaGhosh merged commit b43ba33 into main Jul 28, 2026
@AbhirupaGhosh
AbhirupaGhosh deleted the generate_stat_plot branch July 28, 2026 16:58
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.

4 participants