Repository navigation
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
@claude review |
| - **Input scale:** A required parameter, either `counts` or `proportions`. | ||
| - **Logarithm base:** An optional parameter, defaulting to the natural logarithm (`e`). | ||
| The base must be greater than 1. | ||
| - **Depth normalization:** `none`. This protocol does not rarefy or otherwise |
There was a problem hiding this comment.
Be more explicit about what to do if a non-rarefied table is given (provide a warning not to compare across samples, and advise rarefaction)
| (*Nature Communications*, 2025, DOI: 10.1038/s41467-025-66888-1) is an application | ||
| of the method, not the method-origin citation. | ||
|
|
||
| This protocol intentionally does not perform rarefaction. Because Shannon diversity |
There was a problem hiding this comment.
Repetitive, consolidate rarefaction instructions above because it's more important than a note
| the execution metadata, not as additional rows or columns in this output table. | ||
|
|
||
| ## Notes | ||
|
|
There was a problem hiding this comment.
I think we want notes about preferred software that implements this method in R and Python (e.g. in R, use the vegan package and function name)
| @@ -0,0 +1,4 @@ | |||
| feature_id,sample_a,sample_b | |||
There was a problem hiding this comment.
This is interesting because it's not normalized/rarefied. This should be expected to provide a warning to the user, in addition to the results.
| @@ -0,0 +1,4 @@ | |||
| feature_id,sample_a,sample_b | |||
There was a problem hiding this comment.
This small table is appropriate for a test
| evaluation: | ||
| mode: diagnostic | ||
| accepted_outcomes: | ||
| - outcome: refused_for_missing_values |
There was a problem hiding this comment.
Is this part of the protocol standard? Probably what we needed is "error" or "refused"
| mode: diagnostic | ||
| accepted_outcomes: | ||
| - outcome: refused_for_missing_values | ||
| expected_absent: [result] |
There was a problem hiding this comment.
Not sure whether this is complementary to the outcome value - worth reviewing alongside the protocol standard. I would model tests against the testthat package, which allows for different types of assertions, including expect_warning, expect_error, expect_message, expect_value.
| ### Step 1: Validate the table and parameters | ||
|
|
||
| Read the input as a feature-by-sample table and preserve the sample column names. | ||
| Reject the input if the feature identifiers are missing or duplicated, if there are |
There was a problem hiding this comment.
How to decide what belongs in Step 1 and what belongs in Materials? Are materials validated?
| table. The calculation is descriptive: this protocol does not compare groups, test | ||
| hypotheses, or interpret the resulting values. | ||
|
|
||
| ## Materials |
There was a problem hiding this comment.
Come up with a strict definition of what belongs in materials, and how materials are validated.
| - **Input scale:** A required parameter, either `counts` or `proportions`. | ||
| - **Logarithm base:** An optional parameter, defaulting to the natural logarithm (`e`). | ||
| The base must be greater than 1. | ||
| - **Depth normalization:** `none`. This protocol does not rarefy or otherwise |
There was a problem hiding this comment.
Depth normalization is a description of the protocol, not a material.
|
Hi @ohih8 , please see waldronlab/agent-protocol-standard#46 for instructions on clarifying how to specify the rarefaction recommendation in this PR. |
Closes #50
Adds Shannon diversity protocol and two small tests for it. More tests should be added in the future, however these are the most important and it is probably a good idea to wait until the testing infrastructure is fully set up before generating a large amount of tests.
NOTE: This Protocol does not include rarefaction or sequencing depth-normalization as an intentional design choice by me to simplify the protocol. It can certainly be added if desired, however I wanted to keep the protocol concise.