Skip to content

Suggested function names and updating figures - #74

Open
AbhirupaGhosh wants to merge 11 commits into
mainfrom
function-names
Open

AbhirupaGhosh wants to merge 11 commits into
mainfrom
function-names

Conversation

@AbhirupaGhosh

Copy link
Copy Markdown
Contributor

Description

This PR is for discussion only and is not meant to be merged.

The naming proposal is added in dev/function_renaming.md
I have defined some rules for renaming the functions.
Please comment on the rules + names in the md.
Once agreed, I will do the renames in a follow-up PR.

@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.

Still going through, but wanted to leave a couple of comments?

Might help separate . from user-facing ones?

Comment thread dev/function_renaming.md Resolved
Comment thread dev/function_renaming.md Resolved
@AbhirupaGhosh AbhirupaGhosh changed the title Suggested function names Suggested function names and updating figures Nov 9, 2026
Comment thread R/amRdataPlots.R Resolved
AbhirupaGhosh and others added 4 commits November 10, 2026 15:08
generateSummary and generatePlots read ORBs and the country names are only kept if they have valid ISO3 codes.
I went through manually first.

These are from Claude Sonnet 5.5.
Propose function renaming scheme (dev/function_renaming.md)

Adds a proposal for standardizing function names across amRdata. Nothing
in R/ is renamed yet; this is for review first.

Rules (AG et al.,):
- Exported: lowerCamelCase, no leading dot.
- Internal: leading dot + lowerCamelCase.
- Names follow verbNoun (.fetchBVBRCData, .buildPanarooGeneTable);
  `is` predicates are fine (.isCompleteSet).
- .manifest*, .bfc* and .cli* keep their shared prefix, in camelCase.
- Acronyms stay uppercase (ID, AMR, DB, QC, API, GFF, GTO, TSV, FASTA,
  ORB, HMMER, CDHIT, BVBRC); DuckDB follows the product spelling.
- verbNoun takes priority over `2`/`To` names
  (.panaroo2duckdb -> .writePanarooTables).
- The .amr_ prefix is dropped.

Known gaps (to fix before implementing):
- ~40 functions in R/ have no row yet: resumeDyads, the .amr_theme /
  .amr_filter_evidence / .amr_resolve_evidence_mode helpers, the
  HMMER/dyad and Panaroo import helpers, and the .plot*/format helpers.
- Some rows refer to functions no longer defined in R/ (e.g.
  buildMatrices, .parseProteinClusters, .panaroo2* helpers) and need
  to be dropped or reconciled.
- Singular/plural and abbreviation choices are not yet consistent.
Comment thread dev/function_renaming.md Resolved
Comment thread dev/function_renaming.md
| `.bvbrcFutureMap` | — | helpers.R | Internal |
| `.id_checker` | `.checkIDs` | helpers.R | Internal |
| `.preserve_export_id_text` | `.preserveExportIdText` | helpers.R | Internal |
| `.amr_bfc` | `.bfc` | helpers.R | Internal |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

does .bfc also need a verb in the new name?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

also does bfc need to be capped like BFC?

Comment thread dev/function_renaming.md
| `.id_checker` | `.checkIDs` | helpers.R | Internal |
| `.preserve_export_id_text` | `.preserveExportIdText` | helpers.R | Internal |
| `.amr_bfc` | `.bfc` | helpers.R | Internal |
| `.amr_bfc_find` | `.bfcFind` | helpers.R | Internal |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

should it be findBfc w/ the verbNoun format mentioned at the top?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

or is this grouping .bfc things together? If that's the case, do you do .bfcVerbNoun?

Comment thread dev/function_renaming.md Outdated
| `.amr_set_future_plan` | `.setFuturePlan` | helpers.R | Internal |
| `.bvbrcFutureMap` | — | helpers.R | Internal |
| `.id_checker` | `.checkIDs` | helpers.R | Internal |
| `.preserve_export_id_text` | `.preserveExportIdText` | helpers.R | Internal |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

should it be preserveExportIDText since we are capitalizing ID/AMR/etc

Comment thread dev/function_renaming.md
| `.filterGenomes` | — | data_curation.R | Internal |
| `.is_complete_set` | `.isCompleteSet` | data_curation.R | Internal |
| `.list_complete` | `.listCompleteGenomes` | data_curation.R | Internal |
| `.cli_dump_fastas_gto_chunk` | `.cliDumpFASTAsGTOChunk` | data_curation.R | Internal |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

should it be capitalized to CLI instead of cli?

This branch has not been deployed

No deployments
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.

3 participants