PecanProject / pecan

The Predictive Ecosystem Analyzer (PEcAn) is an integrated ecological bioinformatics toolbox.
www.pecanproject.org
Other
202 stars 230 forks source link

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

Open koolgax99 opened 1 year ago

koolgax99 commented 1 year ago

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"?>

-1 2022/09/29 15:46:00 +0000 /data/workflows/PEcAn_99000000004 bety bety postgres 5432 bety PostgreSQL true /data/dbfiles temperate.coniferous 3000 FALSE TRUE 1 NPP uniform sampling 1000000014 99000000004 772 1999-01-01 00:00:00 2003-12-31 00:00:00 5000000006 2000/01/01 2000/12/31 localhost amqp://guest:guest@rabbitmq/%2F SIPNET_r136 ` 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) - [x] 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 commented 1 year ago

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

github-actions[bot] commented 4 months ago

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