netZoo / netZooR

netZooR is a network biology package implemented in R.
https://netzoo.github.io/
GNU General Public License v3.0
100 stars 39 forks source link

Add TIGER #283

Closed cchen22 closed 1 year ago

cchen22 commented 1 year ago

@marouenbg I have updated the "TIGER.R" file in the "R" folder and added two example data files, "expr.rda" and "prior.rda," to the "data" folder. Please let me know if these changes are sufficient?

marouenbg commented 1 year ago

Thanks @cchen22 , can you please run devtools::document() at the root of the netZoo folder and upload the generated files?

cchen22 commented 1 year ago

@marouenbg The situation is more complex than I initially thought. I have now documented everything and successfully tested the "example(TIGER)" on my end. However, an error message indicates that the "cmdstanr" R package needs to be installed. I'm unsure about the best course of action, as it requires two steps outlined in my ReadMe file

  1. Install the "cmdstanr" package by running the command: install.packages("cmdstanr", repos = c("https://mc-stan.org/r-packages/", getOption("repos")))
  2. Install cmdstan by running the command: cmdstanr::install_cmdstan()

Please advise on how to proceed. Thank you!

marouenbg commented 1 year ago

Oh I see, can you add the package in the depends section here: https://github.com/netZoo/netZooR/blob/master/DESCRIPTION#L24

marouenbg commented 1 year ago

Does it work on your end after adding it to the dependencies?

cchen22 commented 1 year ago

Does it work on your end after adding it to the dependencies?

No. ERROR: dependency 'cmdstanr' is not available for package 'netZooR'

marouenbg commented 1 year ago

OK remove it from description and try running this function at the root of netZooR https://mc-stan.org/rstantools/reference/use_rstan.html and upload the new updated files to this PR

cchen22 commented 1 year ago

OK remove it from description and try running this function at the root of netZooR https://mc-stan.org/rstantools/reference/use_rstan.html and upload the new updated files to this PR

This appears to be a pipeline for rstan, not for cmdstanr. Unfortunately, these are two separate packages... When I created TIGER, I searched for a solution to this question but had no luck. However, I came across a potentially useful repository: https://github.com/rok-cesnovar/misc/tree/master/democmdstanr. I will examine it and inform you later.

marouenbg commented 1 year ago

You can also add a remotes section in description like so Remotes: stan-dev/cmdstanr

cchen22 commented 1 year ago

You can also add a remotes section in description like so Remotes: stan-dev/cmdstanr

I finally applied this method and added a .onLoad function to check and install stan when netZooR is loaded. On my end cmdstanr can be successfully installed and example(TIGER) works fine. However, I encountered some error messages that don't appear to be related to Stan. Could you share your thoughts on this? Thanks!

marouenbg commented 1 year ago

OK, I am on it now.

marouenbg commented 1 year ago

@cchen22 The issues you mentioned were fixed. Let me know how it goes.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage has no change and project coverage change: -0.09 :warning:

Comparison is base (e6c9280) 41.52% compared to head (7bd555e) 41.43%.

:exclamation: Current head 7bd555e differs from pull request most recent head 5d33f21. Consider uploading reports for the commit 5d33f21 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## devel #283 +/- ## ========================================== - Coverage 41.52% 41.43% -0.09% ========================================== Files 21 22 +1 Lines 2786 2792 +6 ========================================== Hits 1157 1157 - Misses 1629 1635 +6 ``` | [Impacted Files](https://app.codecov.io/gh/netZoo/netZooR/pull/283?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=netZoo) | Coverage Δ | | |---|---|---| | [R/TIGER.R](https://app.codecov.io/gh/netZoo/netZooR/pull/283?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=netZoo#diff-Ui9USUdFUi5S) | `0.00% <0.00%> (ø)` | | | [R/zzz.R](https://app.codecov.io/gh/netZoo/netZooR/pull/283?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=netZoo#diff-Ui96enouUg==) | `0.00% <0.00%> (ø)` | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

cchen22 commented 1 year ago

@marouenbg Well done! I've noticed that there are two warnings regarding my example datasets "prior.rda" and "expr.rda". I'm curious about how you document your previous datasets in netZooR, such as the one named "small1976.rda". Did you use the method by Hadley?

marouenbg commented 1 year ago

Hi @cchen22 yep, here is how that data file was documented in CONDOR.R https://github.com/netZoo/netZooR/blob/81cb072fd4f3e1b47b99ef2ce67d1cad6a83bde1/R/CONDOR.R#L1032

cchen22 commented 1 year ago

Hi @cchen22 yep, here is how that data file was documented in CONDOR.R

https://github.com/netZoo/netZooR/blob/81cb072fd4f3e1b47b99ef2ce67d1cad6a83bde1/R/CONDOR.R#L1032

OK, I'll add the dataset document. Anything else I need to do before merging?

marouenbg commented 1 year ago

Thanks @cchen22 , this should be fine for this iteration, we will add tests in a new PR.

marouenbg commented 1 year ago

Also, make sure to update docs with devtools, like you did earlier devtools::document()

marouenbg commented 1 year ago

@cchen22 everything looks good, merging now. Fantastic work! Please use Tiger from the netZooR distribution so that you use the same version used by others which makes it easier to replicate bugs etc...

marouenbg commented 1 year ago

Hi @cchen22 , would it be possible to update the TIGER vignette using netZooR code? Thank you!

cchen22 commented 1 year ago

Hi @cchen22 , would it be possible to update the TIGER vignette using netZooR code? Thank you!

Sure! But do you want me to start a new PR?

marouenbg commented 1 year ago

Yes, here please https://github.com/netZoo/netbooks

marouenbg commented 1 year ago

Hello @cchen22, would it be possible to add a small description of TIGER in the readme file through a new pull request? Thank you https://github.com/netZoo/netZooR/blob/devel/README.md