Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor and breakdown: ExtractCore #4

Open
1 of 2 tasks
jibarozzo opened this issue Feb 23, 2025 · 1 comment
Open
1 of 2 tasks

Refactor and breakdown: ExtractCore #4

jibarozzo opened this issue Feb 23, 2025 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed Normal Priority When can we get this started/done?

Comments

@jibarozzo
Copy link
Collaborator

jibarozzo commented Feb 23, 2025

I'm adding issues I work and encounter them. They are not super priorities unless stated other wise, like hindering the analysis itself.

Code Smells

The ExtractCore functions, as it stands, has many hard coded elements. For example, line 111 of core_microbiome_function.R contains magic numbers in a row count, hard coded for a specific dataset ("glbrc"). It should be refactored to dynamic count rows for applicability to other data sets, in this case the `filtered_phyloseq.rda" with all datasets from BRCs.

For now changing magic numbers for dynamic inputs can get this working for the complete dataset.
We can later improve this by breaking down the ExtractCore function into smaller functions, eliminating duplicate and competing code for better readability and reproducibility. For example, lines 90-127 contain duplicate code and hard coded elements. When does it consider the magic number and when does it consider the whole dataset? Maybe this logic can be handle in the function signature.

To-do

  • Add dynamic handling of data input.
  • Breakdown lines 90-127 into community_dissimilarity function and TEST.

I've created a GitHub project to keep track of issue and mark progress on the analysis.

@B-Kristy @adina @jaejinlee83 @fandemonium

@jibarozzo jibarozzo added the bug Something isn't working label Feb 23, 2025
@jibarozzo jibarozzo added this to the All-BRC-Analysis milestone Feb 23, 2025
@jibarozzo jibarozzo self-assigned this Feb 23, 2025
@jibarozzo jibarozzo added the enhancement New feature or request label Feb 23, 2025
@jibarozzo jibarozzo added help wanted Extra attention is needed Normal Priority When can we get this started/done? labels Feb 23, 2025
@jibarozzo
Copy link
Collaborator Author

jibarozzo commented Feb 25, 2025

function_refactor branch created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted Extra attention is needed Normal Priority When can we get this started/done?
Projects
None yet
Development

No branches or pull requests

2 participants