microsud / dysbiosisR

The dysbiosisR package implements tools for calculating some common microbiome dysbiosis measures
https://microsud.github.io/dysbiosisR/
GNU General Public License v3.0
12 stars 0 forks source link

added distanceToReferencePlane-function #2

Closed wsteenhu closed 1 year ago

wsteenhu commented 2 years ago

Hi Sudarshan, I think I managed to at least set a skeleton for the implementation of the distanceToReferencePlane-function. I tried to align with your conventions (so copy-pasted quite a lot :)). I verified that, given a matrix with x, y, z coordinates for a group of samples (created using an ordination like PCoA and selecting the first 3 columns), I can generate the same results using our R implementation compared to the original Python-code (I can share the benchmark results if you like). One open question is whether or not we should check if the order of sample ids in the phyloseq is the same as in the distance matrix (I added a small line to check, may also apply to some of the other functions that take both phyloseq and distance matrix as input). Looking forward to your comments/edits!

codecov[bot] commented 2 years ago

Codecov Report

Merging #2 (82c77b0) into master (0f37281) will increase coverage by 3.98%. The diff coverage is 86.36%.

@@            Coverage Diff             @@
##           master       #2      +/-   ##
==========================================
+ Coverage   59.83%   63.82%   +3.98%     
==========================================
  Files           8        9       +1     
  Lines         249      293      +44     
==========================================
+ Hits          149      187      +38     
- Misses        100      106       +6     
Impacted Files Coverage Δ
R/dysbiosisOverview.R 0.00% <0.00%> (ø)
R/distanceToReferencePlane.R 88.37% <88.37%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

microsud commented 2 years ago

I have done the review. Looks almost done with minor comments. You can see all my comments the tab Files Changed Make sure you update your branch with this synced version before making any changes. Edite: Forgot to mention that you also need to add this function in the https://github.com/microsud/dysbiosisR/blob/master/R/dysbiosisOverview.R function. This provides a quick list of supported measures by the dysbiosisR package.

Cheers, Sudarshan

wsteenhu commented 1 year ago

Hi Sudarshan, thanks for this. I resolved the issue above and added the function to the overview. I however cannot see any comments under the Files changed-tab (this seems to only show the diff of my previous commit). Anything I am missing or can I push again?

microsud commented 1 year ago

Thanks! Wierd I se it here https://github.com/microsud/dysbiosisR/pull/2/files#diff-9246663636b0efdfb05df0459c0404c67d5f90652860ffa783f0c80da3b93552

if you cannot find then push your commit to this branch and I will check it. Thanks again for working on this.

wsteenhu commented 1 year ago

Hi, yeah odd, I do see you went through the files (see some blue bars), but can't find any comments... Sorry about that. I now added the function to the overview and added a reference to the python-implementation in the description as you suggested. Let me know if it needs more work!

microsud commented 1 year ago

Great and thanks for this contribution!