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

[WIP] Run meta analysis for a settings file API #3053

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

koolgax99
Copy link
Contributor

@koolgax99 koolgax99 commented Oct 7, 2022

Description

This API /api/ma/run will run a meta analysis if a settings file is provided in the body of the request. The settings file should me send as xml.

Upon successful run of the meta analysis the response will consist the data from the post.distns.MA.Rdata file from the output directory as a list.

Sample request on Postman
image

Sample settings file
<?xml version="1.0"?> <info> <notes/> <userid>-1</userid> <username/> <date>2022/09/29 15:46:00 +0000</date> </info> <outdir>/data/workflows/PEcAn_99000000004</outdir> <database> <bety> <user>bety</user> <password>bety</password> <host>postgres</host> <port>5432</port> <dbname>bety</dbname> <driver>PostgreSQL</driver> <write>true</write> </bety> <dbfiles>/data/dbfiles</dbfiles> </database> <pfts> <pft> <name>temperate.coniferous</name> </pft> </pfts> <meta.analysis> <iter>3000</iter> <random.effects> <on>FALSE</on> <use_ghs>TRUE</use_ghs> </random.effects> </meta.analysis> <ensemble> <size>1</size> <variable>NPP</variable> <samplingspace> <parameters> <method>uniform</method> </parameters> <met> <method>sampling</method> </met> </samplingspace> </ensemble> <model> <id>1000000014</id> </model> <workflow> <id>99000000004</id> </workflow> <run> <site> <id>772</id> <met.start>1999-01-01 00:00:00</met.start> <met.end>2003-12-31 00:00:00</met.end> </site> <inputs> <met> <id>5000000006</id> </met> </inputs> <start.date>2000/01/01</start.date> <end.date>2000/12/31</end.date> </run> <host> <name>localhost</name> <rabbitmq> <uri>amqp://guest:guest@rabbitmq/%2F</uri> <queue>SIPNET_r136</queue> </rabbitmq> </host>

Sample Output of the API
{ "status": "Meta Analysis ran successfully", "data": [ { "distn": "beta", "parama": 2.63, "paramb": 6.52, "n": 0, "_row": "growth_resp_factor" }, { "distn": "gamma", "parama": 4599.0942, "paramb": 13859.064, "n": 363, "_row": "leaf_turnover_rate" }, { "distn": "gamma", "parama": 130531.937, "paramb": 7335.3038, "_row": "root_respiration_rate" }, { "distn": "norm", "parama": 0.6032, "paramb": 0.0322, "_row": "root_turnover_rate" }, { "distn": "norm", "parama": 16.8391, "paramb": 0.1774, "_row": "Amax" }, { "distn": "norm", "parama": 1.4098, "paramb": 0.0252, "_row": "leaf_respiration_rate_m2" }, { "distn": "gamma", "parama": 1571.2799, "paramb": 303.327, "n": 455, "_row": "SLA" }, { "distn": "norm", "parama": 50.4784, "paramb": 0.182, "n": 291, "_row": "leafC" }, { "distn": "norm", "parama": 0, "paramb": 3, "_row": "Vm_low_temp" }, { "distn": "unif", "parama": 0.6, "paramb": 0.9, "_row": "AmaxFrac" }, { "distn": "unif", "parama": 5, "paramb": 40, "_row": "psnTOpt" }, { "distn": "unif", "parama": 0, "paramb": 100, "_row": "stem_respiration_rate" }, { "distn": "unif", "parama": 0.38, "paramb": 0.62, "_row": "extinction_coefficient" }, { "distn": "unif", "parama": 4, "paramb": 27, "_row": "half_saturation_PAR" }, { "distn": "unif", "parama": 0.01, "paramb": 0.25, "_row": "dVPDSlope" }, { "distn": "unif", "parama": 1, "paramb": 3, "_row": "dVpdExp" }, { "distn": "unif", "parama": 1.4, "paramb": 2.6, "_row": "veg_respiration_Q10" }, { "distn": "unif", "parama": 1.4, "paramb": 5, "_row": "fine_root_respiration_Q10" }, { "distn": "unif", "parama": 1.4, "paramb": 5, "_row": "coarse_root_respiration_Q10" } ] }

Review Time Estimate

  • Immediately
  • Within one week
  • When possible

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation.
  • My name is in the list of CITATION.cff
  • I have updated the CHANGELOG.md.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@koolgax99
Copy link
Contributor Author

@dlebauer @robkooper Sir can you please review this for me.

Copy link

github-actions bot commented May 3, 2024

This PR is stale because it has been open 365 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants