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

Improve Return List Structure in ExtractCore #27

Open
jibarozzo opened this issue Mar 12, 2025 · 0 comments
Open

Improve Return List Structure in ExtractCore #27

jibarozzo opened this issue Mar 12, 2025 · 0 comments
Assignees
Labels
discussion Ideas or SOPs to guide development enhancement New feature or request

Comments

@jibarozzo
Copy link
Collaborator

Description:
The ExtractCore function currently returns an unnamed list, which can be confusing for end users to navigate. This issue proposes improving the return list by using named elements with informative and consistent naming conventions.


Current Implementation

return_list <- list(core_otus, BC_ranked, otu_ranked, occ_abun, otu, map, taxon)
return(return_list)

Proposed Implementation

return_list <- list(
  core_otus = core_otus,               # Core OTUs identified
  bray_curtis_ranked = BC_ranked,      # Bray-Curtis dissimilarity rankings
  otu_rankings = otu_ranked,           # OTU occupancy/abundance rankings
  occupancy_abundance = occ_abun,      # OTU occupancy and abundance data
  otu_table = otu,                     # OTU table (samples x OTUs)
  sample_metadata = map,               # Sample metadata
  taxonomy_table = taxon               # Taxonomy table
)
return(return_list)

Before

results <- ExtractCore(...)
core_otus <- results[[1]]  # Unclear and error-prone

After

results <- ExtractCore(...)
core_otus <- results$core_otus  # Clear and self-documenting

@B-Kristy @Gian77

@jibarozzo jibarozzo added discussion Ideas or SOPs to guide development enhancement New feature or request labels Mar 12, 2025
@jibarozzo jibarozzo added this to the Function Refactoring milestone Mar 12, 2025
@jibarozzo jibarozzo self-assigned this Mar 12, 2025
@jibarozzo jibarozzo changed the title Improve Return List Structure in extract_core Function Improve Return List Structure in ExtractCore Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Ideas or SOPs to guide development enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant