builtin
MalariaImmunityReport
dataclass
Bases: BuiltInReporter
The malaria immunity report is a JSON-formatted file (MalariaImmunityReport.json) that provides statistics for several antibody types for specified age bins over a specified reporting duration. Specifically, the report tracks the average and standard deviation in the fraction of observed antibodies for merozoite surface protein ( MSP), Plasmodium falciparum erythrocyte membrane protein 1 (PfEMP1), and non-specific (and less immunogenic) minor surface epitopes. The total possible is determined by parameters Falciparum_MSP_Variants, Falciparum_PfEMP1_Variants, and Falciparum_Nonspecific_Types. The greater the fraction, the more antibodies the individual has against possible new infections. The smaller the fraction, the more naïve the individual’s immune system is to malaria.
Source code in emodpy_malaria/reporters/builtin.py
MalariaPatientJSONReport
dataclass
Bases: BuiltInReporter
The malaria patient data report is a JSON-formatted report (MalariaPatientReport.json) that provides medical data for each individual on each day of the simulation. For example, for a specified number of time steps, each “patient” has information collected on the temperature of their fever, their parasite counts, treatments they received, and other relevant data.
Source code in emodpy_malaria/reporters/builtin.py
MalariaSummaryReport
dataclass
Bases: BuiltInReporter
The population-level malaria summary report is a JSON-formatted report (MalariaSummaryReport.json) that provides a summary of malaria data across the population. The data are grouped into different bins such as age, parasitemia, and infectiousness.
Source code in emodpy_malaria/reporters/builtin.py
ReportAntibodies
dataclass
Bases: BuiltInReporter
ReportAntibodies generates a ReportAntibodies.csv
Source code in emodpy_malaria/reporters/builtin.py
ReportDrugStatus
dataclass
Bases: BuiltInReporter
The drug status report provides status information on the drugs that an individual has taken or is waiting to take. Because the report provides information for each drug, for each individual, and for each time step, you may want to use the Start_Day and End_Day parameters to limit the size the output file.
Source code in emodpy_malaria/reporters/builtin.py
ReportEventCounter
dataclass
Bases: BuiltInReporter
The event counter report is a JSON-formatted file (ReportEventCounter.json) that keeps track of how many of each event types occurs during a time step. The report produced is similar to the InsetChart.json channel report, where there is one channel for each event defined in the configuration file (config.json).
Source code in emodpy_malaria/reporters/builtin.py
ReportFpgNewInfections
dataclass
Bases: BuiltInReporter
ReportFpgNewInfections generates a ReportFpgNewInfections.csv
Source code in emodpy_malaria/reporters/builtin.py
ReportFpgOutputForObservationalModel
dataclass
Bases: BuiltInReporter
ReportFpgOutputForObservationalModel generates two files: infIndexRecursive-genomes-df.csv - This file will be the list of infected people in each node at each time step where each row represents one person. variantsXXX_afFPG.npy - This file is a two dimensional numpy array. It is an array of genomes where each row is an genome and each column is a 0 or 1. The 'XXX' will indicate the number of genome locations found in a single genome (i.e. 24, 100, etc.).
Source code in emodpy_malaria/reporters/builtin.py
ReportHumanMigrationTracking
dataclass
Bases: BuiltInReporter
The human migration tracking report is a CSV-formatted report (ReportHumanMigrationTracking.csv) that provides details about human travel during simulations. The report provides one line for each surviving individual who migrates during the simulation.
Source code in emodpy_malaria/reporters/builtin.py
ReportInfectionStatsMalaria
dataclass
Bases: BuiltInReporter
ReportInfectionStatsMalaria
Source code in emodpy_malaria/reporters/builtin.py
ReportInterventionPopAvg
dataclass
Bases: BuiltInReporter
ReportInterventionPopAvg is a CSV-formatted report that gives population average data on the usage of interventions. It provides data on the fraction of people or nodes that have an intervention as well as averages on the intervention's efficacy. For each persistent intervention that has been distributed to a node or person, the report provides one line in the CSV for each intervention used in that node. Since node-level intervention (usually vector control) can only have one per node, the data will be for that one intervention. The individual-level interventions will have data for the people in that node.
Source code in emodpy_malaria/reporters/builtin.py
ReportMalariaFiltered
dataclass
Bases: BuiltInReporter
The malaria filtered report (ReportMalariaFiltered.json) is the same as the default InsetChart report, but provides filtering options to enable the user to select the data to be displayed for each time step or for each node. See InsetChart for more information about InsetChart.json.
Source code in emodpy_malaria/reporters/builtin.py
ReportMalariaFilteredIntraHost
dataclass
Bases: BuiltInReporter
The filtered malaria spatial report (ReportMalariaFilteredIntraHost.bin) provides TBD
Source code in emodpy_malaria/reporters/builtin.py
ReportMicrosporidia
dataclass
Bases: BuiltInReporter
ReportMicrosporidia generates a ReportMicrosporidia.csv. It is a stratified report where the data is stratified by time, node, species and microsporidia strain; with columns of counts of vectors in each state for that stratification.
Source code in emodpy_malaria/reporters/builtin.py
ReportNodeDemographics
dataclass
Bases: BuiltInReporter
The node demographics report is a CSV-formatted report (ReportNodeDemographics.csv) that provides population information stratified by node. For each time step, the report collects data on each node and age bin.
Source code in emodpy_malaria/reporters/builtin.py
ReportNodeDemographicsMalaria
dataclass
Bases: BuiltInReporter
This report extends the data collected in the ReportNodeDemographics by adding data about the number of infections with specific barcodes.
Note: If you need detailed data on the infections with different barcodes, use the SqlReportMalaria. That report contains data on all barcodes, without specifying what they are.
Source code in emodpy_malaria/reporters/builtin.py
ReportNodeDemographicsMalariaGenetics
dataclass
Bases: BuiltInReporter
This report extends the data collected in the ReportNodeDemographics by adding data about the number of infections with specific barcodes. Requires Malaria_Model to be set to MALARIA_MECHANISTIC_MODEL_WITH_PARASITE_GENETICS.
Note: If you need detailed data on the infections with different barcodes, use the SqlReportMalaria. That report contains detailed data on humans, infections, barcodes, and more.
Source code in emodpy_malaria/reporters/builtin.py
ReportSimpleMalariaTransmission
dataclass
Bases: BuiltInReporter
The simple malaria transmission report (ReportSimpleMalariaTransmission.csv) is a csv report that provides data on malaria transmission, by tracking who transmitted malaria to whom. The report can only be used when the simulation setup parameter Malaria_Model is set to MALARIA_MECHANISTIC_MODEL_WITH_CO_TRANSMISSION. This report is typically used as input to the GenEpi model.
Source code in emodpy_malaria/reporters/builtin.py
ReportSimulationStats
dataclass
Bases: BuiltInReporter
Adds ReportSimulationStats to collect data on the computational performance of the model (duration, memory, number of persisted interventions, etc).
Source code in emodpy_malaria/reporters/builtin.py
ReportVectorGenetics
dataclass
Bases: BuiltInReporter
The vector genetics report is a CSV-formatted report (ReportVectorGenetics.csv) that collects information on how many vectors of each genome/allele combination exist at each time, node, and vector state. Information can only be collected on one species per report.
Source code in emodpy_malaria/reporters/builtin.py
ReportVectorMigration
dataclass
Bases: BuiltInReporter
This report provides detailed information on where and when vectors are migrating. Because there can be one line for each migrating vector, you may want to use the Start_Day and End_Day parameters to limit the size the output file.
Source code in emodpy_malaria/reporters/builtin.py
ReportVectorStats
dataclass
Bases: BuiltInReporter
The vector statistics report is a CSV-formatted report (ReportVectorStats.csv) that provides detailed life-cycle data on the vectors in the simulation. The report is stratified by time, node ID, and (optionally) species.
Source code in emodpy_malaria/reporters/builtin.py
ReportVectorStatsMalariaGenetics
dataclass
Bases: BuiltInReporter
This report extends the data collected in the ReportVectorStats by adding data about the number of infections with specific barcodes. Requires Malaria_Model to be set to MALARIA_MECHANISTIC_MODEL_WITH_PARASITE_GENETICS.
Source code in emodpy_malaria/reporters/builtin.py
SpatialReportMalariaFiltered
dataclass
Bases: BuiltInReporter
The filtered malaria spatial report (SpatialReportMalariaFiltered.bin) provides spatial information on malaria simulations and allows for filtering the data and collection over different intervals. This report is similar to the Spatial output report but allows for data collection and filtering over different intervals using the Start_Day and a Reporting_Interval parameters
Source code in emodpy_malaria/reporters/builtin.py
SqlReportMalaria
dataclass
Bases: BuiltInReporter
The SqlReportMalaria outputs epidemiological and transmission data. This report does not contain any genomics data. Because of the quantity and complexity of the data, the report output is a multi-table SQLite relational database (see https://sqlitebrowser.org/). Use the configuration parameters to manage the size of the database.
Source code in emodpy_malaria/reporters/builtin.py
SqlReportMalariaGenetics
dataclass
Bases: BuiltInReporter
The SqlReportMalariaGenetics outputs epidemiological and transmission data. Because of the quantity and complexity of the data, the report output is a multi-table SQLite relational database (see https://sqlitebrowser.org/). Use the configuration parameters to manage the size of the database.
Source code in emodpy_malaria/reporters/builtin.py
VectorHabitatReport
dataclass
Bases: BuiltInReporter
The vector habitat report is a JSON-formatted file (VectorHabitatReport.json) containing habitat data for each vector species included in the simulation. It focuses on statistics relevant to mosquito developmental stages (e.g. eggs and larvae), such as egg capacity and larval crowding.
Source code in emodpy_malaria/reporters/builtin.py
add_coordinator_event_recorder(task, event_list=None, only_include_events_in_list=True)
Adds ReportEventRecorderCoordinator report to the simulation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter |
required |
event_list
|
list
|
A list of coordinator-level events to record or exclude, depending on value of only_include_coordinator_events_in_list |
None
|
only_include_events_in_list
|
bool
|
If True, only record node-level events listed. if False, record ALL node-level events EXCEPT for the ones listed |
True
|
Source code in emodpy_malaria/reporters/builtin.py
add_drug_status_report(task, manifest, start_day=0, end_day=365000)
Adds ReportDrugStatus report to the simulation. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
start_day
|
int
|
the day of the simulation to start collecting data |
0
|
end_day
|
int
|
the day of the simulation to stop collecting data |
365000
|
Returns:
| Type | Description |
|---|---|
Union[ReportDrugStatus, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
add_event_recorder(task, event_list=None, only_include_events_in_list=True, ips_to_record=None, start_day=0, end_day=365000, node_ids=None, min_age_years=0, max_age_years=365000, must_have_ip_key_value='', must_have_intervention='', property_change_ip_to_record='')
Adds ReportEventRecorder report to the simulation. The health events and interventions report (ReportEventRecorder.csv) provides information on each individual’s demographics and health status at the time of an event. Additionally, it is possible to see the value of specific IndividualProperties, as assigned in the demographics file (see NodeProperties and IndividualProperties for more information).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter |
required |
event_list
|
list
|
a list of events to record or exclude, depending on value of only_include_events_in_list |
None
|
only_include_events_in_list
|
bool
|
if True, only record events listed. if False, record ALL events EXCEPT for the ones listed |
True
|
ips_to_record
|
list
|
list of individual properties to include in report |
None
|
start_day
|
int
|
The day of the simulation to start collecting data |
0
|
end_day
|
int
|
The day of the simulation to stop collecting data. |
365000
|
node_ids
|
list
|
Data will be collected for the nodes in this list, if None - all nodes have data collected. |
None
|
min_age_years
|
float
|
Minimum age in years of people to collect data on |
0
|
max_age_years
|
float
|
Maximum age in years of people to collect data on |
365000
|
must_have_ip_key_value
|
str
|
A Key:Value pair that the individual must have in order to be included. Empty string means don't look at IndividualProperties |
''
|
must_have_intervention
|
str
|
The name of the intervention that the person must have in order to be included. Empty string means don't look at the interventions |
''
|
property_change_ip_to_record
|
str
|
If the string is not empty, then the recorder will add the PropertyChange event to the list of events that the report is listening to. However, it will only record the events where the property changed the value of the given key |
''
|
Source code in emodpy_malaria/reporters/builtin.py
add_human_migration_tracking(task, manifest)
Adds ReportHumanMigrationTracking report to the simulation. There are no special parameter that need to be configured to generate the report. However, the simulation must have migration enabled.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
Returns:
| Type | Description |
|---|---|
Union[ReportHumanMigrationTracking, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
add_malaria_cotransmission_report(task, manifest, start_day=0, end_day=365000, node_ids=None, min_age_years=0, max_age_years=MAX_AGE_YEARS, must_have_ip_key_value='', must_have_intervention='', include_human_to_vector=0, filename_suffix='')
Adds ReportSimpleMalariaTransmission report to the simulation. See class definition for description of the report. This is the report used to track malaria CoTransmission (co_transmission)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
start_day
|
int
|
the day to start collecting data for the report. |
0
|
end_day
|
int
|
the day of the simulation to stop reporting data |
365000
|
node_ids
|
list
|
list of nodes for which to collect data for the report |
None
|
min_age_years
|
float
|
minimum age in years of people to collect data on |
0
|
max_age_years
|
float
|
maximum age in years of people to collect data on |
MAX_AGE_YEARS
|
include_human_to_vector
|
int
|
ff set to 1, Human-to-Vector transmission events will be included. One can identify these events because the 'acquireIndividualId'=0 and transmitTime=acquireTime. WARNING: This can make the file size quite large |
0
|
must_have_ip_key_value
|
str
|
a "Key:Value" pair that the individual must have in order to be included. Empty string means don't look at IPs (individual properties) |
''
|
must_have_intervention
|
str
|
the name of the intervention that the person must have in order to be included. Empty string means don't look at the interventions |
''
|
filename_suffix
|
str
|
augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports |
''
|
Returns:
| Type | Description |
|---|---|
Union[ReportSimpleMalariaTransmission, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
add_malaria_immunity_report(task, manifest, start_day=0, end_day=365000, node_ids=None, reporting_interval=1, max_number_reports=365000, age_bins=None, must_have_ip_key_value='', must_have_intervention='', pretty_format=False, filename_suffix='')
Adds MalariaImmunityReport report to the simulation. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
start_day
|
int
|
the day of the simulation to start collecting data |
0
|
end_day
|
int
|
the day of simulation to stop collecting data |
365000
|
node_ids
|
list
|
list of nodes for which to collect data |
None
|
reporting_interval
|
int
|
defines the cadence of the report by specifying how many time steps to collect data before writing to the file. |
1
|
max_number_reports
|
int
|
the maximum number of report output files that will be produced for a given simulation |
365000
|
age_bins
|
list
|
The max age in years per bin, listed in ascending order. Use a large value for the last bin, to collect all remaining individuals |
None
|
must_have_ip_key_value
|
str
|
a "Key:Value" pair that the individual must have in order to be included. Empty string means don't look at IPs (individual properties) |
''
|
must_have_intervention
|
str
|
the name of the an intervention that the person must have in order to be included. Empty string means don't look at the interventions |
''
|
pretty_format
|
bool
|
if True(1), sets pretty JSON formatting, which includes carriage returns, line feeds, and spaces for easier readability. The default, 0 (false), saves space where everything is on one line. |
False
|
filename_suffix
|
str
|
augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports |
''
|
Returns:
| Type | Description |
|---|---|
Union[MalariaImmunityReport, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
add_malaria_patient_json_report(task, manifest, start_day=0, end_day=365000, node_ids=None, min_age_years=0, max_age_years=MAX_AGE_YEARS, must_have_ip_key_value='', must_have_intervention='', filename_suffix='')
Adds MalariaPatientJSONReport report to the simulation. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
start_day
|
int
|
the day of the simulation to starts collecting data for the report |
0
|
end_day
|
int
|
the day of the simulation to stop reporting data |
365000
|
node_ids
|
list
|
a list of nodes from which to collect data for the report |
None
|
min_age_years
|
float
|
minimum age in years of people to collect data on |
0
|
max_age_years
|
float
|
maximum age in years of people to collect data on |
MAX_AGE_YEARS
|
must_have_ip_key_value
|
str
|
a "Key:Value" pair that the individual must have in order to be included. Empty string means don't look at IPs (individual properties) |
''
|
must_have_intervention
|
str
|
the name of the intervention that the person must have in order to be included. Empty string means don't look at the interventions |
''
|
filename_suffix
|
str
|
augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports |
''
|
Returns:
| Type | Description |
|---|---|
Union[MalariaPatientJSONReport, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
add_malaria_summary_report(task, manifest, start_day=0, end_day=365000, node_ids=None, reporting_interval=365, must_have_ip_key_value='', must_have_intervention='', include_time_age_pfpr_bins=True, include_time_age_pfpr_infectious_bins=True, add_true_density=False, parasite_detection_threshold=0.0, gametocyte_detection_threshold=0.0, add_hrp2_prevalence=False, hrp2_detection_threshold=0.0, age_bins=None, infectiousness_bins=None, max_number_reports=100, parasitemia_bins=None, pretty_format=False, filename_suffix='')
Adds MalariaSummaryReport to the simulation. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
start_day
|
int
|
the day of the simulation to starts collecting data for the report |
0
|
end_day
|
int
|
the day of the simulation to stop reporting data |
365000
|
node_ids
|
list
|
a list of nodes from which to collect data for the report |
None
|
reporting_interval
|
float
|
Defines the cadence of the report by specifying how many time steps to collect data before writing to the file |
365
|
must_have_ip_key_value
|
str
|
a "Key:Value" pair that the individual must have in order to be included. Empty string means don't look at IPs (individual properties) |
''
|
must_have_intervention
|
str
|
the name of the an intervention that the person must have in order to be included. Empty string means don't look at the interventions |
''
|
include_time_age_pfpr_bins
|
bool
|
When set to true, the 'DataByTimeAndPfPRBinsAndAgeBins' element is included in the report. Default is true. You can save disk space by setting this to false. |
True
|
include_time_age_pfpr_infectious_bins
|
bool
|
When set to true, the 'DataByTimeAndInfectiousnessBinsAndPfPRBinsAndAgeBins' element is included in the report. Default is true. You can save disk space by setting this to false. |
True
|
add_true_density
|
bool
|
If set to true, four new channels will be added to the report that use true density instead of measured. These additional channels are: * 'PfPR_2to10-True', * 'PfPR by Age Bin-True', * 'Pf Gametocyte Prevalence by Age Bin-True', and * 'Mean Log Parasite Density by Age Bin-True'. The true densities will be compared to thresholds 'parasite_detection_threshold' and 'gametocyte_detection_threshold'. The Default is False. |
False
|
parasite_detection_threshold
|
float
|
Used when 'add_true_density' is true. The true parasite density is compared against this threshold. It impacts the: * 'PfPR_2to10-True', * 'PfPR by Age Bin-True', and * 'Mean Log Parasite Density by Age Bin-True' channels. Default is zero. |
0.0
|
gametocyte_detection_threshold
|
float
|
Used when 'add_true_density' is true. The true gametocyte density is compared against this threshold. It impacts the 'Pf Gametocyte Prevalence by Age Bin-True' channel. Default is zero. |
0.0
|
add_hrp2_prevalence
|
bool
|
If true, the 'PfPR_2to10-HRP2' and the 'PfPR by Age Bin-HRP2' channels will be added. These channels will use 'Detection_Threshold_True_HRP2' to determine if person's HRP2 level counts towards prevalence. |
False
|
hrp2_detection_threshold
|
float
|
Used when 'add_hrp2_prevalence' is true. If the true HRP2 value is greater than this threshold, the prevalence will be increased in the 'PfPR_2to10-HRP2' and the 'PfPR by Age Bin-HRP2' channels. |
0.0
|
age_bins
|
list
|
The max age in years per bin, listed in ascending order. Use a large value for the last bin, to collect all remaining individuals |
None
|
infectiousness_bins
|
list
|
infectiousness Bins to aggregate within for the report |
None
|
max_number_reports
|
int
|
the maximum number of report output files that will be produced for a given simulation |
100
|
parasitemia_bins
|
list
|
Parasitemia bins on which to aggregate. A value <= 0 in the first bin indicates that uninfected individuals are added to this bin. You must sort your input data from low to high. |
None
|
pretty_format
|
bool
|
if True(1) sets pretty JSON formatting, which includes carriage returns, line feeds, and spaces for easier readability. The default, 0 (false), saves space where everything is on one line. |
False
|
filename_suffix
|
str
|
augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports |
''
|
Returns:
| Type | Description |
|---|---|
Union[MalariaSummaryReport, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 | |
add_malaria_survey_analyzer(task, manifest, start_day=0, end_day=365000, node_ids=None, event_trigger_list=None, reporting_interval=1, max_number_reports=365000, ip_key_to_collect='', must_have_ip_key_value='', must_have_intervention='', pretty_format=0, filename_suffix='')
Adds MalariaSurveyJSONAnalyzer report to the simulation. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
start_day
|
int
|
the day of the simulation to start collecting data |
0
|
end_day
|
int
|
the day of simulation to stop collecting data |
365000
|
reporting_interval
|
float
|
defines the cadence of the report by specifying how many time steps to collect data before writing to the file |
1
|
event_trigger_list
|
list
|
list of individual events to include into the report |
None
|
max_number_reports
|
int
|
the maximum number of report output files that will be produced for a given simulation |
365000
|
node_ids
|
list
|
list of nodes for which to collect data |
None
|
ip_key_to_collect
|
str
|
name of the Individual Property Key whose value to collect. Empty string means collect values for all Individual Properties |
''
|
must_have_ip_key_value
|
str
|
a "Key:Value" pair that the individual must have in order to be included. Empty string means don't look at IPs (individual properties) |
''
|
must_have_intervention
|
str
|
the name of the an intervention that the person must have in order to be included. Empty string means don't look at the interventions |
''
|
pretty_format
|
int
|
if True(1), sets pretty JSON formatting, which includes carriage returns, line feeds, and spaces for easier readability. The default, 0 (false), saves space where everything is on one line. |
0
|
filename_suffix
|
str
|
augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports |
''
|
Returns:
| Type | Description |
|---|---|
Union[MalariaSurveyJSONAnalyzer, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
add_node_event_recorder(task, event_list=None, only_include_events_in_list=True, stats_by_node_properties=None, stats_by_individual_properties='')
Adds ReportEventRecorderNode report to the simulation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter |
required |
event_list
|
list
|
A list of node-level events to record or exclude, depending on value of only_include_node_events_in_list |
None
|
only_include_events_in_list
|
bool
|
If True, only record node-level events listed. if False, record ALL node-level events EXCEPT for the ones listed |
True
|
stats_by_node_properties
|
list
|
Specifies an array of (optional) node property keys, as defined in NodeProperties in the demographics file, to be added as additional columns to the ReportNodeEventRecorder.csv output report. An empty array equals no additional columns added. |
None
|
stats_by_individual_properties
|
str
|
Specifies an array of (optional) individual property keys, as defined in IndividualProperties in the demographics file, to be added to the ReportNodeEventRecorder.csv output report. An empty array equals no additional columns added |
''
|
Source code in emodpy_malaria/reporters/builtin.py
add_report_antibodies(task, manifest, start_day=0, end_day=365000, node_ids=None, min_age_years=0, max_age_years=MAX_AGE_YEARS, must_have_ip_key_value='', must_have_intervention='', filename_suffix='', reporting_interval=1, contain_capacity_data=False, infected_only=False)
Adds ReportAntibodies reporter.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
Task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
Schema path file |
required |
start_day
|
int
|
the day of the simulation to start collecting data |
0
|
end_day
|
int
|
the day of the simulation to stop collecting data |
365000
|
node_ids
|
list
|
List of nodes for which to collect data |
None
|
min_age_years
|
float
|
Minimum age in years of people to collect data on. |
0
|
max_age_years
|
float
|
Maximum age in years of people to collect data on. |
MAX_AGE_YEARS
|
must_have_ip_key_value
|
str
|
a "Key:Value" pair that the individual must have in order to be included. Empty string means don't look at IPs (individual properties). |
''
|
must_have_intervention
|
str
|
the name of the intervention that the person must have in order to be included. Empty string means don't look at the interventions. |
''
|
filename_suffix
|
str
|
Augments the filename of the report. If multiple reports of this class are being generated, this allows you to distinguish among them. |
''
|
reporting_interval
|
int
|
interval (in days) at which to report antibody data. |
1
|
contain_capacity_data
|
bool
|
If true, the data for each antibody is the capacity of the antibody, otherwise it's the current concentration. Changes default name of the report from ReportAntibodiesConcentration.csv to ReportAntibodiesCapacity.csv |
False
|
infected_only
|
bool
|
If true, only individuals who are currently infected will have their antibody data recorded. |
False
|
Returns:
| Type | Description |
|---|---|
Union[ReportAntibodies, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 | |
add_report_event_counter(task, manifest, start_day=0, end_day=365000, node_ids=None, event_trigger_list=None, min_age_years=0, max_age_years=MAX_AGE_YEARS, must_have_ip_key_value='', must_have_intervention='', filename_suffix='')
Adds ReportEventCounter report to the simulation. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
start_day
|
int
|
the day of the simulation to start counting events |
0
|
end_day
|
int
|
the day of simulation to stop collecting data |
365000
|
node_ids
|
list
|
list of nodes in which to count the events |
None
|
event_trigger_list
|
list
|
list of events which to count |
None
|
min_age_years
|
float
|
Minimum age in years of people to collect data on |
0
|
max_age_years
|
float
|
Maximum age in years of people to collect data on |
MAX_AGE_YEARS
|
must_have_ip_key_value
|
str
|
a "Key:Value" pair that the individual must have in order to be included. Empty string means don't look at IPs (individual properties) |
''
|
must_have_intervention
|
str
|
the name of the an intervention that the person must have in order to be included. Empty string means don't look at the interventions |
''
|
filename_suffix
|
str
|
augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports |
''
|
Returns:
| Type | Description |
|---|---|
Union[ReportEventCounter, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
add_report_fpg_new_infections(task, manifest, start_day=0, end_day=365000, node_ids=None, min_age_years=0, max_age_years=MAX_AGE_YEARS, must_have_ip_key_value='', must_have_intervention='', filename_suffix='', report_crossover_data_instead=False)
Adds ReportFpgNewInfections reporter.
The report will give one line for each new infection object that gets created. That line will provide information about the where the gametocytes came from to create the sporozoites that created the new infection. This can allow the user to track where infections come from. This includes the idea of parasites coming from other locations - i.e. importation.
This can only be used with the FPG model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
Task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
Schema path file |
required |
start_day
|
int
|
the day of the simulation to start collecting data |
0
|
end_day
|
int
|
the day of the simulation to stop collecting data |
365000
|
node_ids
|
list
|
List of nodes for which to collect data |
None
|
min_age_years
|
float
|
Minimum age in years of people to collect data on |
0
|
max_age_years
|
float
|
Maximum age in years of people to collect data on |
MAX_AGE_YEARS
|
must_have_ip_key_value
|
str
|
a "Key:Value" pair that the individual must have in order to be included. Empty string means don't look at IPs (individual properties) |
''
|
must_have_intervention
|
str
|
the name of the intervention that the person must have in order to be included. Empty string means don't look at the interventions |
''
|
filename_suffix
|
str
|
Augments the filename of the report. If multiple reports of this class are being generated, this allows you to distinguish among them. |
''
|
report_crossover_data_instead
|
bool
|
If True, instead of reporting new infections in detail, the report will contain basic new infection information, but with an array of genome crossover locations that created this genome. |
False
|
Returns:
| Type | Description |
|---|---|
Union[ReportFpgNewInfections, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 | |
add_report_fpg_output(task, manifest, start_day=0, end_day=365000, node_ids=None, min_age_years=0, max_age_years=MAX_AGE_YEARS, must_have_ip_key_value='', must_have_intervention='', include_genome_ids=False, minimum_parasite_density=1, sampling_period=1)
Adds ReportFpgOutputForObservationalModel reporter. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
Task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
Schema path file |
required |
start_day
|
int
|
the day of the simulation to start collecting data |
0
|
end_day
|
int
|
the day of the simulation to stop collecting data |
365000
|
node_ids
|
list
|
List of nodes for which to collect data |
None
|
min_age_years
|
float
|
Minimum age in years of people to collect data on |
0
|
max_age_years
|
float
|
Maximum age in years of people to collect data on |
MAX_AGE_YEARS
|
must_have_ip_key_value
|
str
|
a "Key:Value" pair that the individual must have in order to be included. Empty string means don't look at IPs (individual properties) |
''
|
must_have_intervention
|
str
|
the name of the an intervention that the person must have in order to be included. Empty string means don't look at the interventions |
''
|
include_genome_ids
|
bool
|
Add a column that has a list of Genome IDs (hashcode) for the person. |
False
|
minimum_parasite_density
|
float
|
The minimum density that the infection must have to be included in the list of infections. A value of zero implies include all infections. Number of asexual parasites per micro liter of blood. |
1
|
sampling_period
|
float
|
The number of days between sampling the population. This implies one should get data on days Start_Day, Start_Day+Sampling_Period, Start_Day+2*Sampling_Period, and so on. |
1
|
Returns:
| Type | Description |
|---|---|
Union[ReportFpgOutputForObservationalModel, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 | |
add_report_infection_stats_malaria(task, manifest, start_day=0, end_day=365000, reporting_interval=30, include_hepatocyte=True, hepatocyte_threshold=0, include_irbc=True, irbc_threshold=0, include_gametocyte=True, gametocyte_threshold=0)
Adds ReportInfectionStatsMalaria report to the simulation. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
start_day
|
int
|
the day of the simulation to start collecting data |
0
|
end_day
|
int
|
the day of the simulation to stop collecting data |
365000
|
reporting_interval
|
int
|
defines the cadence of the report by specifying how many time steps to collect data before writing to the file |
30
|
include_hepatocyte
|
bool
|
If set to True, then a column will be added to the report providing the count of the infected hepatocytes. Default is True. |
True
|
hepatocyte_threshold
|
int
|
If the column is included and the number of hepatocytes related to this infection are greater than or equal to this value, then the row of data will be included. Default is 0, so any/all counts of hepatocytes will be included. |
0
|
include_irbc
|
bool
|
If set to True, then a column will be added to the report with the number of Infected Red Blood Cells from this infection. Default is True. |
True
|
irbc_threshold
|
int
|
If the column is included and the number of IRBCs related to this infection are greater than or equal to this value, then the row of data will be included. Default is 0, so any/all counts of IRBCs will be included. |
0
|
include_gametocyte
|
bool
|
If set to True, then a column will be added to the report that contains the number of gametocytes (male & female) from this infection. Default is True. |
True
|
gametocyte_threshold
|
int
|
"If the column is included and the number of gametocytes related to this infection are greater than or equal to this value, then the row of data will be included. Default is 0, so any/all counts of gametocytes will be included. |
0
|
Returns:
| Type | Description |
|---|---|
Union[ReportInfectionStatsMalaria, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
add_report_intervention_pop_avg(task, manifest, start_day=0, end_day=365000, node_ids=None, min_age_years=0, max_age_years=MAX_AGE_YEARS, must_have_ip_key_value='', must_have_intervention='', filename_suffix='')
Adds ReportInterventionPopAvg reporter. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
Task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
Schema path file |
required |
start_day
|
int
|
the day of the simulation to start collecting data |
0
|
end_day
|
int
|
the day of the simulation to stop collecting data |
365000
|
node_ids
|
list
|
List of nodes for which to collect data |
None
|
min_age_years
|
float
|
Minimum age in years of people to collect data on |
0
|
max_age_years
|
float
|
Maximum age in years of people to collect data on |
MAX_AGE_YEARS
|
must_have_ip_key_value
|
str
|
a "Key:Value" pair that the individual must have in order to be included. Empty string means don't look at IPs (individual properties) |
''
|
must_have_intervention
|
str
|
the name of the an intervention that the person must have in order to be included. Empty string means don't look at the interventions |
''
|
filename_suffix
|
str
|
augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports |
''
|
Returns:
| Type | Description |
|---|---|
Union[ReportInterventionPopAvg, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
add_report_malaria_filtered(task, manifest, start_day=0, end_day=365000, node_ids=None, min_age_years=0, max_age_years=MAX_AGE_YEARS, must_have_ip_key_value='', must_have_intervention='', has_interventions=None, include_30day_avg_infection_duration=True, filename_suffix='')
Adds ReportMalariaFiltered report to the simulation. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
start_day
|
int
|
the day of the simulation to start collecting data |
0
|
end_day
|
int
|
the day of simulation to stop collecting data |
365000
|
node_ids
|
list
|
list of nodes for which to collect the data, None or [] collects all the nodes |
None
|
min_age_years
|
float
|
Minimum age in years of people to collect data on |
0
|
max_age_years
|
float
|
Maximum age in years of people to collect data on |
MAX_AGE_YEARS
|
must_have_ip_key_value
|
str
|
a "Key:Value" pair that the individual must have in order to be included. Empty string means don't look at IPs (individual properties) |
''
|
must_have_intervention
|
str
|
the name of the an intervention that the person must have in order to be included. Empty string means don't look at the interventions |
''
|
has_interventions
|
list
|
a list of intervention names, a channel is added to the report for each InterventionName
provided. The channel name will be Has_ |
None
|
include_30day_avg_infection_duration
|
bool
|
if True(1) the '30-Day Avg Infection Duration' channel is included in the report |
True
|
filename_suffix
|
str
|
augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports |
''
|
Returns:
| Type | Description |
|---|---|
Union[ReportVectorGenetics, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
add_report_malaria_filtered_intrahost(task, manifest, start_day=0, end_day=365000, node_ids=None, min_age_years=0, max_age_years=MAX_AGE_YEARS, must_have_ip_key_value='', must_have_intervention='', has_interventions=None, include_30day_avg_infection_duration=True, filename_suffix='')
Adds ReportMalariaFilteredIntraHost report to the simulation. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
start_day
|
int
|
the day of the simulation to start collecting data |
0
|
end_day
|
int
|
the day of simulation to stop collecting data |
365000
|
node_ids
|
list
|
list of nodes for which to collect the data, None or [] collects all the nodes |
None
|
min_age_years
|
float
|
Minimum age in years of people to collect data on |
0
|
max_age_years
|
float
|
Maximum age in years of people to collect data on |
MAX_AGE_YEARS
|
must_have_ip_key_value
|
str
|
a "Key:Value" pair that the individual must have in order to be included. Empty string means don't look at IPs (individual properties) |
''
|
must_have_intervention
|
str
|
the name of the an intervention that the person must have in order to be included. Empty string means don't look at the interventions |
''
|
has_interventions
|
list
|
a list of intervention names, a channel is added to the report for each InterventionName
provided. The channel name will be Has_ |
None
|
include_30day_avg_infection_duration
|
bool
|
if True(1) the '30-Day Avg Infection Duration' channel is included in the report |
True
|
filename_suffix
|
str
|
augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports |
''
|
Returns:
| Type | Description |
|---|---|
Union[ReportMalariaFilteredIntraHost, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
add_report_microsporidia(task, manifest)
Adds ReportMicrosporidia reporter. See class definition for description of the report. There are no special parameter that need to be configured to generate the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
Task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
Schema path file |
required |
Returns:
| Type | Description |
|---|---|
Union[ReportMicrosporidia, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
add_report_node_demographics(task, manifest, age_bins=None, ip_key_to_collect='', stratify_by_gender=True)
Adds ReportNodeDemographics report to the simulation. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
age_bins
|
list
|
the age bins (in years) to aggregate within and report. An empty array does not stratify by age. You must sort your input data from low to high. |
None
|
ip_key_to_collect
|
str
|
The name of the Individual Properties Key by which to stratify the report. An empty string does not stratify by Individual Properties |
''
|
stratify_by_gender
|
bool
|
if True(1), to stratify by gender. Set to False (0) to not stratify by gender. |
True
|
Returns:
| Type | Description |
|---|---|
Union[ReportNodeDemographics, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
add_report_node_demographics_malaria(task, manifest, age_bins=None, ip_key_to_collect='', stratify_by_gender=True, stratify_by_clinical_symptoms=False)
Adds ReportNodeDemographicsMalaria report to the simulation. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
age_bins
|
list
|
the age bins (in years) to aggregate within and report. An empty array does not stratify by age. You must sort your input data from low to high. |
None
|
ip_key_to_collect
|
str
|
The name of theIndividualProperties key by which to stratify the report. An empty string does not stratify by Individual Properties |
''
|
stratify_by_gender
|
bool
|
if True(1), to stratify by gender. Set to False (0) to not stratify by gender. |
True
|
stratify_by_clinical_symptoms
|
bool
|
if set to True(1), the data will have an extra stratification for people who have clinical symptoms and those that do not. Default is 0 or no extra stratification |
False
|
Returns: (Union[ReportNodeDemographicsMalaria, None]): if task is not set, returns the configured reporter, otherwise returns nothing
Source code in emodpy_malaria/reporters/builtin.py
add_report_node_demographics_malaria_genetics(task, manifest, barcodes=None, drug_resistant_strings=None, drug_resistant_and_hrp_statistic_type=DrugResistantAndHRPStatisticType.NUM_PEOPLE_WITH_RESISTANT_INFECTION, hrp_strings=None, age_bins=None, ip_key_to_collect='', stratify_by_gender=True, include_identity_by_xxx=False)
Adds ReportNodeDemographicsMalariaGenetics report to the simulation. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
barcodes
|
list
|
a list of barcode strings. The report contains the number of human infections with each barcode. Use '' for a wild card at a loci to include all values at that loci. For example, “AT” includes AAT, ACT, AGT, and ATT. The report contains a BarcodeOther column for barcodes that are not defined. Note: There is no validation that the barcode strings are valid barcodes for the scenario. |
None
|
drug_resistant_strings
|
list
|
a list of strings representing the set of drug resistant markers. A column will be created with the number of humans infections with that barcode. One can use '*' for a wild card. A 'BarcodeOther' column will be created for barcodes not define |
None
|
hrp_strings
|
list
|
A list of strings representing the set of HRP markers. A column will be created with the number of humans infections with that HRP string. One can use '*' for a wild card. A 'OtherHRP' column will be created for HRP strings not defined. |
None
|
drug_resistant_and_hrp_statistic_type
|
DrugResistantAndHRPStatisticType
|
indicates the statistic in the Drug Resistant & HRP columns: NUM_PEOPLE_WITH_RESISTANT_INFECTION = A person is counted if they have one infection with that drug resistant marker; NUM_INFECTIONS = The total number of infections with that marker. |
NUM_PEOPLE_WITH_RESISTANT_INFECTION
|
age_bins
|
list
|
the age bins (in years) to aggregate within and report. An empty array does not stratify by age. You must sort your input data from low to high. |
None
|
ip_key_to_collect
|
str
|
The name of theIndividualProperties key by which to stratify the report. An empty string does not stratify by Individual Properties |
''
|
stratify_by_gender
|
bool
|
if True(1), to stratify by gender. Set to False(0) to not stratify by gender. |
True
|
include_identity_by_xxx
|
bool
|
if True(1), include columns about the average Identity By State (IBS) and Identity By Descent (IBD) for all new infections with unique barcodes in the last year. |
False
|
Returns:
| Type | Description |
|---|---|
Union[ReportNodeDemographicsMalariaGenetics, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 | |
add_report_simulation_stats(task, manifest)
Adds ReportSimulationStats to collect data on the computational performance of the model (duration, memory, number of persisted interventions, etc).
There are no special parameter that need to be configured to generate the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
Returns:
| Type | Description |
|---|---|
Union[ReportSimulationStats, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
add_report_vector_genetics(task, manifest, start_day=0, end_day=365000, node_ids=None, species=None, gender='VECTOR_FEMALE', include_vector_state=True, include_death_state=False, stratify_by='GENOME', combine_similar_genomes=False, specific_genome_combinations_for_stratification=None, allele_combinations_for_stratification=None, alleles_for_stratification=None, filename_suffix='')
Adds ReportVectorGenetics to the simulation. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
start_day
|
int
|
the day of the simulation to start reporting data |
0
|
end_day
|
int
|
the day of the simulation to stop reporting data |
365000
|
node_ids
|
list
|
the list of nodes in which to collect data, empty or None means all nodes |
None
|
species
|
str
|
the species to include information on |
None
|
gender
|
str
|
gender of species to include information on. Default: "VECTOR_FEMALE", other options: "VECTOR_MALE", "VECTOR_BOTH_GENDERS" |
'VECTOR_FEMALE'
|
include_vector_state
|
bool
|
if True(1), adds the columns for vectors in the different states (i.e Eggs, Larva, etc) |
True
|
include_death_state
|
bool
|
if True(1), adds columns for the number of vectors that died in this state during this time step as well as the average age. It adds two columns for each of the following states: ADULT, INFECTED, INFECTIOUS, and MALE |
False
|
stratify_by
|
str
|
the way to stratify data. Default: "GENOME", other options: "SPECIFIC_GENOME", "ALLELE", "ALLELE_FREQ" |
'GENOME'
|
combine_similar_genomes
|
bool
|
if True(1), genomes are combined if for each locus (ignoring gender) the set of allele of the two genomes are the same (i.e. 1-0 is similar to 0-1). Depends on: "GENOME", "SPECIFIC_GENOME" specific_genome_combinations_for_stratification: if stratifying by "SPECIFIC_GENOME", then use these genomes to stratify by. Example:: |
False
|
specific_genome_combinations_for_stratification
|
list
|
ff stratifying by "SPECIFIC_GENOME", then use these genomes to stratify by. '*' = list all entries at that location, '?' = combine all entries at that location |
None
|
allele_combinations_for_stratification
|
list
|
if stratifying by "ALLELE", then also add these allele name combos to the stratification, Example:: |
None
|
alleles_for_stratification
|
list
|
For example:: [ "a0", "a1", "b0", "b1" ] |
None
|
filename_suffix
|
str
|
augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports |
''
|
Returns:
| Type | Description |
|---|---|
Union[ReportVectorGenetics, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | |
add_report_vector_migration(task, manifest, start_day=0, end_day=None, species_list=None, must_be_in_state=None, must_be_from_node=None, must_be_to_node=None, include_genome_data=False, filename_suffix='')
Adds ReportVectorMigration report to the simulation. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
start_day
|
int
|
the day of the simulation to start collecting data |
0
|
end_day
|
int
|
the day of the simulation to stop collecting data |
None
|
species_list
|
list[str]
|
a list of species to include information on, default of None or [] means "all species". |
None
|
must_be_in_state
|
list[VectorState]
|
A list of vector states for which you want to record the migration. Only STATE_MALE, STATE_ADULT, STATE_INFECTED, STATE_INFECTIOUS migrate. |
None
|
must_be_from_node
|
list[int]
|
A list of node IDs. A vector must be travelling FROM one of these nodes to be recorded into the report. Empty list means vectors traveling from any/all nodes will be recorded. |
None
|
must_be_to_node
|
list[int]
|
A list of node IDs. A vector must be travelling TO one of these nodes to be recorded into the report. Empty list means vectors traveling to any/all nodes will be recorded. |
None
|
include_genome_data
|
bool
|
If set to True, adds a Genome column for migrating vectors. Vectors with no custom alleles will still have their sex alleles listed. |
False
|
filename_suffix
|
str
|
Augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports. |
''
|
Returns:
| Type | Description |
|---|---|
Union[ReportVectorMigration, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 | |
add_report_vector_stats(task, manifest, species_list=None, stratify_by_species=False, include_death_state=False, include_wolbachia=False, include_gestation=False, include_microsporidia=False)
Adds ReportVectorStats report to the simulation. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
species_list
|
list
|
a list of species to include information on, default of None or [] means "all species" |
None
|
stratify_by_species
|
bool
|
if True(1), data will break out each the species for each node |
False
|
include_death_state
|
bool
|
if True(1), adds columns for the number of vectors that died in this state during this time step as well as the average age. It adds two columns for each of the following states: ADULT, INFECTED, INFECTIOUS, and MALE |
False
|
include_wolbachia
|
bool
|
if True(1), add a column for each type of Wolbachia |
False
|
include_gestation
|
bool
|
if True(1), adds columns for feeding and gestation |
False
|
include_microsporidia
|
bool
|
if True(1), adds columns for the number of vectors that have microsporidia in each state during this time step |
False
|
Returns: (Union[ReportVectorStats, None]): if task is not set, returns the configured reporter, otherwise returns nothing
Source code in emodpy_malaria/reporters/builtin.py
add_report_vector_stats_malaria_genetics(task, manifest, species_list=None, stratify_by_species=False, include_death_state=False, include_wolbachia=False, include_gestation=False, include_microsporidia=False, barcodes=None)
Adds ReportVectorStatsMalariaGenetics report to the simulation. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
species_list
|
list
|
a list of species to include information on, default of None or [] means "all species" |
None
|
stratify_by_species
|
bool
|
if True(1), data will break out each the species for each node |
False
|
include_death_state
|
bool
|
if True(1), adds columns for the number of vectors that died in this state during this time step as well as the average age. It adds two columns for each of the following states: ADULT, INFECTED, INFECTIOUS, and MALE |
False
|
include_wolbachia
|
bool
|
if True(1), add a column for each type of Wolbachia |
False
|
include_gestation
|
bool
|
if True(1), adds columns for feeding and gestation |
False
|
include_microsporidia
|
bool
|
if True(1), adds columns for the number of vectors that have microsporidia in each state during this time step |
False
|
barcodes
|
list
|
a list of barcode strings. The report contains the number of human infections with each barcode. Use '' for a wild card at a loci to include all values at that loci. For example, “AT” includes AAT, ACT, AGT, and ATT. The report contains a BarcodeOther column for barcodes that are not defined. Note: There is no validation that the barcode strings are valid barcodes for the scenario. |
None
|
Returns: (Union[ReportVectorStatsMalariaGenetics, None]): if task is not set, returns the configured reporter, otherwise returns nothing
Source code in emodpy_malaria/reporters/builtin.py
add_spatial_report_malaria_filtered(task, manifest, start_day=0, end_day=365000, reporting_interval=1, node_ids=None, min_age_years=0, max_age_years=MAX_AGE_YEARS, must_have_ip_key_value='', must_have_intervention='', spatial_output_channels=None, filename_suffix='')
Adds SpatialReportMalariaFiltered report to the simulation. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
start_day
|
int
|
the day of the simulation to start collecting data |
0
|
end_day
|
int
|
the day of simulation to stop collecting data |
365000
|
reporting_interval
|
int
|
defines the cadence of the report by specifying how many time steps to collect data before writing to the file. |
1
|
node_ids
|
list
|
list of nodes for which to collect the data, None or [] collects all the nodes |
None
|
min_age_years
|
float
|
Minimum age in years of people to collect data on |
0
|
max_age_years
|
float
|
Maximum age in years of people to collect data on |
MAX_AGE_YEARS
|
must_have_ip_key_value
|
str
|
a "Key:Value" pair that the individual must have in order to be included. Empty string means don't look at IPs (individual properties) |
''
|
must_have_intervention
|
str
|
the name of the an intervention that the person must have in order to be included. Empty string means don't look at the interventions |
''
|
spatial_output_channels
|
list
|
list of names of channels you want to have output for. Available channels are: "Adult_Vectors", "Air_Temperature", "Births", "Blood_Smear_Gametocyte_Prevalence", "Blood_Smear_Parasite_Prevalence", "Campaign_Cost", "Daily_Bites_Per_Human", "Daily_EIR", "Disease_Deaths", "Fever_Prevalence", "Human_Infectious_Reservoir", "Infected", "Infectious_Vectors", "Land_Temperature", "Mean_Parasitemia", "New_Clinical_Cases", "New_Infections", "New_Reported_Infections", "New_Severe_Cases", "PCR_Gametocyte_Prevalence", "PCR_Parasite_Prevalence", "PfHRP2_Prevalence", "Population", "Prevalence", "Rainfall", "Relative_Humidity", "True_Prevalence" Defaults: ["Blood_Smear_Parasite_Prevalence", "New_Clinical_Cases", "Population"] |
None
|
filename_suffix
|
str
|
augments the filename of the report. If multiple reports are being generated, this allows you to distinguish among the multiple reports |
''
|
Returns:
| Type | Description |
|---|---|
Union[SpatialReportMalariaFiltered, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
add_sql_report_malaria(task, manifest, start_day=0, end_day=365000, include_infection_table=True, include_health_table=True, include_drug_table=False, include_individual_properties=False)
Adds SqlReportMalaria report to the simulation. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
start_day
|
int
|
the day of the simulation to start collecting data |
0
|
end_day
|
int
|
the day of the simulation to stop collecting data |
365000
|
include_infection_table
|
bool
|
if True(1), include the table that provides data at each time step for each active infection |
True
|
include_health_table
|
bool
|
if True(1), include the table that provides data at each time step for a person's health |
True
|
include_drug_table
|
bool
|
if True(1), include the table that provides data at each time step for each drug used |
False
|
include_individual_properties
|
bool
|
if True(1), add columns to the Health table for each Property(key). The values in the columns are integers that are the primary key in a new IndividualProperties table that contains the strings. |
False
|
Returns:
| Type | Description |
|---|---|
Union[SqlReportMalaria, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
add_sql_report_malaria_genetics(task, manifest, start_day=0, end_day=365000, include_infection_table=True, include_health_table=True, include_drug_table=False, include_individual_properties=False)
Adds SqlReportMalariaGenetics report to the simulation. See class definition for description of the report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
start_day
|
int
|
the day of the simulation to start collecting data |
0
|
end_day
|
int
|
the day of the simulation to stop collecting data |
365000
|
include_infection_table
|
bool
|
if True(1), include the table that provides data at each time step for each active infection |
True
|
include_health_table
|
bool
|
if True(1), include the table that provides data at each time step for a person's health |
True
|
include_drug_table
|
bool
|
if True(1), include the table that provides data at each time step for each drug used |
False
|
include_individual_properties
|
bool
|
if True(1), add columns to the Health table for each Property(key). The values in the columns are integers that are the primary key in a new IndividualProperties table that contains the strings. |
False
|
Returns:
| Type | Description |
|---|---|
Union[SqlReportMalariaGenetics, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
add_vector_habitat_report(task, manifest)
Adds VectorHabitatReport report to the simulation. See class definition for description of the report. You do not need to configure any data parameters to generate this report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, if left as None, reporter is returned (used for unittests) |
required |
manifest
|
ModuleType
|
schema path file |
required |
Returns:
| Type | Description |
|---|---|
Union[VectorHabitatReport, None]
|
if task is not set, returns the configured reporter, otherwise returns nothing |
Source code in emodpy_malaria/reporters/builtin.py
add_visualizations(task)
Adds pointer files that create visualization for reports relevant to malaria.
Currently, "AllInsets", "BinnedReport", "MalariaInterventions", "MalariaSummaryReport"
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the pointer files as assets |
required |
Source code in emodpy_malaria/reporters/builtin.py
all_vectors_if_none(task)
Creates a list of all species names available in the tasks's config and returns
a list of all species defined for the simulation
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, which also contains the config file |
required |
Returns:
| Type | Description |
|---|---|
list
|
A list of all species' names defined in the config |
Source code in emodpy_malaria/reporters/builtin.py
check_vectors(task)
Checks that there are species defined for the simulation
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
task
|
EMODTask
|
task to which to add the reporter, which also contains the config file |
required |
Raises: ValueError: No Vector_Species_Params defined. You need to define at least one to use ReportVectorGenetics.