Skip to content

Minor changes to the ML scripts#15

Open
AbhirupaGhosh wants to merge 5 commits intomainfrom
ML_script_updates
Open

Minor changes to the ML scripts#15
AbhirupaGhosh wants to merge 5 commits intomainfrom
ML_script_updates

Conversation

@AbhirupaGhosh
Copy link
Copy Markdown
Contributor

@AbhirupaGhosh AbhirupaGhosh commented Feb 17, 2026

Some necessary updates

  1. Rename and update MCC calculation functions
  2. Sens and spec in final performance tsvs

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.

@AbhirupaGhosh AbhirupaGhosh changed the title Rename and update MCC calculation functions Minor changes to the ML scripts Feb 17, 2026
@AbhirupaGhosh AbhirupaGhosh marked this pull request as ready for review March 24, 2026 15:08
@AbhirupaGhosh AbhirupaGhosh self-assigned this Mar 24, 2026
Copy link
Copy Markdown
Member

@jananiravi jananiravi left a comment

Choose a reason for hiding this comment

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

Again, looks good to me, but need local runners: @epbrenner @eboyer221. Thanks!

# nmcc <- (mcc + 1) / 2

return(round(nmcc, 2))
return(mcc)
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.

might still need to round to two decimals, right?

"Calculation of log2(AUPRC/prior) may be inappropriate."))
if (prior > 0.3 && prior < 0.7) {
warning(paste(
"Classes are roughly balanced.",
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.

😂 roughly!

))
} else if (prior >= 0.7) {
warning(paste(
"Classes are imbalanced toward the resistant phenotype.",
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.

toward = clarify more explicitly whether R/S is higher


```{r plot-prc}
test_data_plus_predictions <- readr::read_tsv(results/ML_pred/Sfl_drug_AMP_domains_binary_prediction.tsv)
test_data_plus_predictions <- readr::read_tsv(results / ML_pred / Sfl_drug_AMP_domains_binary_prediction.tsv)
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.

there is no " to define path and / is now ' / '. Will this even work? 🤔


```{r plot-roc}
test_data_plus_predictions <- readr::read_tsv(results/ML_pred/Sfl_drug_AMP_domains_binary_prediction.tsv)
test_data_plus_predictions <- readr::read_tsv(results / ML_pred / Sfl_drug_AMP_domains_binary_prediction.tsv)
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.

check this and topfeat below too

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.

2 participants