Skip to content

Update functions docs and tests#34

Merged
antagomir merged 18 commits intomainfrom
devel
Aug 1, 2022
Merged

Update functions docs and tests#34
antagomir merged 18 commits intomainfrom
devel

Conversation

@gaoyu19920914
Copy link
Contributor

Co-Authored-By: Daniel Garza danielriosgarza@gmail.com

What's new

added names_species and names_resources in related functions

randomA

  1. added parameter interactions and 5 interaction types to customize values and proportions of interspecies interactions
  2. added scale_off_diagonal to avoid exponential growth in certain gLV modeling scenarios
  3. added list_A to enable generating groups of species in simulation

randomE

  1. added trophic levels and trophic preferences
  2. added exact to switch the number of resources to consume/produce between a poisson distribution and the exact number

simulations

CRM, GLV, HubbellRates, and Logistic

  1. added control of stochasticity, external events, migration from the metacommunity, and the extend of measurement errors to all these simulations
  2. added microbial trophic levels (an implicit inter-species interaction) in simulateConsumerResource
  3. put together result matrix and some parameters into a list (which might affect ConvertToSE, and I will check for that)

handy plot functions

added in utils.R: makePlot, makePlotRes for simulations, and makeHeatmap for matrix
(these could be a transient status if we prefer to use miaVis to make beautiful plots)

documentations for functions

other minor improvements

What's changed

  1. names of parameters, see this form for a detailed table of variables
  2. ways to customize the distribution in randomA and randomE
  3. tests using previous data formats

What to expect for the next

  • an independent standard R package miaSimShiny with miaSim as a dependency
  • updates in other simulating functions
    1. review Ricker and SOI model
    2. review Hubbell (and replace it by HubbellRates if possible)
    3. review powerlawA (and replace it by randomA if needed)
  • format codes using stylerand biocthis

Co-Authored-By: Daniel Garza <danielriosgarza@gmail.com>
Copy link
Member

@antagomir antagomir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome job.

II left a few comments, will like to review once more after those have been somehow responded (at least in comments).

Could you also update the NEWS file? See https://blog.r-hub.io/2020/05/08/pkg-news/

@gaoyu19920914
Copy link
Contributor Author

Thanks @antagomir for all your comments, they are really helpful for develop a package of high quality 👍
I am going through them now, and will reply to your suggestions and comments one by one.

1. turn duplicated manuals to templates in \man-roxygen
2. remove ggplot plotting functions with miaViz::plotSeries
3. update NEWS
4. TODO: examples in miaSim.Rmd
generateSimulations
getCommunity
.replaceByZero
createParamList
estimateAFromSimulations
to facilitate comparisons among models using estimated A which is generated from a series of simulations.
Ricker model updated (unifying variable names and return format),
rdirichlet function added (to resolve dependency issue from gtools)
avoid ode solver "returning early" error in some cases
@antagomir
Copy link
Member

Hello @gaoyu19920914 - can you check if this PR is still something to merge?

If so, we should finalize the few issues there are in automated checks, and resolve the conversation.

Or if these were already handled otherwise we should close this PR.

Just let me know where we are with this one.

@gaoyu19920914
Copy link
Contributor Author

Hello @antagomir , thanks for your remind.

I just checked what to do, and will make some minor changes in the returning formats, and change their corresponding examples in miaSim.Rmd

Then I will solve the fail in check.

@antagomir
Copy link
Member

Great. THere have been some updates to the main branch, remember to pull those changes also before your push so that all is in sync.

to keep align with unified formats and variables
reduce notes from R CMD CHECK
@antagomir
Copy link
Member

Note that the branch still has conflicts with the main branch.

@gaoyu19920914
Copy link
Contributor Author

Note that the branch still has conflicts with the main branch.

Thanks for reminding, I am resolving these conflicts.

- uncomment examples of miaViz
- replace :-sequences by seq()
- miaSim.Rmd
- input validation in Hubbell
@gaoyu19920914
Copy link
Contributor Author

Thanks for the detailed comments, and here's a summary for the latest changes.

  1. I've uncommented all miaViz plot examples. The plots are good to visualize.
  2. for (i in 2:n)-like for-loop changed for the BioC review.
  3. Every simulateX function returns a list as their result, and this list is of specific format, with the first element named 'matrix' and of specific dimensions related to the number of species and length of time series to simulate, hence I take this kind of list as one specific type of object.
    In miaSim.Rmd vignette, to be coherent with other examples, all results are named as Xmodel, and converted results are named as X_TSE after modification.
  4. Input validation: mentioned changes has been made accordingly.

@antagomir
Copy link
Member

antagomir commented Jul 27, 2022

Ok sounds good!

There are still some failing checks that should be resolved. We can discuss more in Slack/Gitter on the details if necessary.

gaoyu19920914 and others added 4 commits July 27, 2022 10:23
remove link to SummarizedExperiment to solve R CMD CHECK failing
add TreeSummarizedExperiment to solve R CMD CHECK failing
@YagmurSimsekk YagmurSimsekk linked an issue Jul 30, 2022 that may be closed by this pull request
@antagomir
Copy link
Member

Are there pending issues? The system shows "Changes requested". If you can resolve all issues above that have been dealt with, we can see if everything is complete and this PR could be merged.

@YagmurSimsekk
Copy link
Member

@antagomir As far as I know, it is ready to merge, @gaoyu19920914 can confirm. However, I will take a last look and solve the reviews.

Copy link
Member

@YagmurSimsekk YagmurSimsekk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems ready to me.

@gaoyu19920914
Copy link
Contributor Author

@antagomir As far as I know, it is ready to merge, @gaoyu19920914 can confirm. However, I will take a last look and solve the reviews.

Thanks @YagmurSimsekk for your updates. I confirm that all previously mentioned issues are solved.

@gaoyu19920914 gaoyu19920914 requested a review from antagomir August 1, 2022 12:35
Copy link
Member

@antagomir antagomir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yess, almost there. Some minor suggestions to add.

Next time, let us aim at smaller and more focused PRs.

Also remember to update the version number if not done yet.

@antagomir
Copy link
Member

Just confirm when it is ready to merge.

@gaoyu19920914 gaoyu19920914 requested a review from antagomir August 1, 2022 18:12
@gaoyu19920914
Copy link
Contributor Author

I think we can merge all changes to main.

@antagomir
Copy link
Member

Super!

@antagomir antagomir merged commit e7af665 into main Aug 1, 2022
@YagmurSimsekk YagmurSimsekk deleted the devel branch August 20, 2022 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Argument abund_values deprecated and replaced with assay_name

3 participants