prt_report_my_pet
Creates report_my_pet.html in specified directory
Contents
Syntax
prt_report_my_pet (focusSpecies, comparisonSpecies, T, f, destinationFolder, filename)
Description
Writes report_my_pet.html with a list of parameters and implied model properties for selected species. focusSpecies can be empty, or a single species; comparisonSpecies can be empty (if focusSpecies is specified), or a cell-string of entries; their parameter values are taken from allStat. The parameters of the focusSpeces are obtained from one of three sources:
- allStat.mat (first input must be a character string)
- metaData, metaPar and par (first input must be a cell string), which are output structures of mydata_my_pet, pars_init_my_pet and pars_init_my_pet respectively, as part of the parameter estimation process.
- solutionSet_my_pet_date.mat in local directory (first input must be a scalar) as saved by method mmea of estim_pars in which several solutions are stored. The scalar stands for the number of solutions for the focus species that are shown. Only with the file with most recent date that starts with "solutionSet_" is used to read parameter values.
The traits are computed using statistics_st.
Input:
- focusSpecies: character-string with name of entry of special interest or cellstring with structures with {par, metaPar, txtPar, metaData} or a scalar; might also be empty
- comparisonSpecies: cell string with entry names, might be empty
- T: optional scalar with temperature in Kelvin for all species (default: T_typical, which is species-specific)
- f: optional scalar scaled functional response (default: 1); it applies to all species
- destinationFolder: optional string with destination folder the output html-file (default: current folder)
- filename: optional string with name of output file (default report_My_pet.html, with My_pet replaced by the first species_name)
Output:
- no Malab output, but a html-file is written with report-table and opens automatically in the system browser
Remarks
If the focus species is specified by string (rather than by data), its parameters are obtained from allStat.mat. The parameters of the comparison species are obtained from allStat.mat, and the data of creation of that file is indicated on the top of the report. The allStat.mat is available via the Collection tab of the Add-my-pet webpage (https://www.bio.vu.nl/thb/deb/deblab/add_my_pet/), and needs to be in the work folder or on a path. AmPtool functions select or clade can be used to create a cell string of comparison species.
The difference between focus and comparison species only becomes important in the case of more than one comparison species and color-coding is used to indicate how eccentric the focus-species is from the comparison-species. The lava color-scheme is used, from white (high) to black (low), via red and blue, to show the value of the eccentricity. This quantity is computed for each statistic and parameter and is the squared distance to the mean of the comparison species as a hyperbolically-transformed fraction of the variance for the comparison-species. Function color_lava is used to convert the eccentricity to rgb-colors. If the focus species also occurs in the comparison species, it is removed from that list. So, if the comparison species all belong to the same genus, for instance, you can change your selection of focus species, and so change colors, without affecting numbers. If you just have a set of species and want to avoid colors, treat them all as comparison species, leaving focusSpecies empty. If model types differ among species in the tabel, only parameter and statistics fields for the focus species are shown. In absence of a focus species, the first comparison species serves this role. The default name of the output file is report_My_pet, but this name is replaced by filename, if specified, which is not opened automatically. If filename is specified, destinationFolder must be specified as well
The search boxes in the top-line of the report can be used to symbols, units, descriptions, but also (on the top-right) to make selections from the statictics and/or the parameters. NA means "not applicable": the parameter or statistic does not depend on temperature or food. nan means "not a number": the model for that species does not have that field.
Example of use
- If results_My_Pet.mat exists in current directory (where "My_Pet" is replaced by the name of some species, but don't replace "my_pet"): load('results_My_Pet.mat'); prt_report_my_pet({par, metaPar, txtPar, metaData}, [], T, f, destinationFolder)
- prt_report_my_pet('Daphnia_magna')
- prt_report_my_pet('Daphnia_pulex', [], C2K(22), 0.8)
- prt_report_my_pet('Lutjanus_analis', select('Lutjanus'), C2K(21))
- prt_report_my_pet('Nasalis_larvatus', clade('Nasalis_larvatus'))
- prt_report_my_pet([], clade('Nasalis_larvatus'))
- prt_report_my_pet(3) if solutionsSet_my_pet_date.mat was produced via estim_pars method mmea