GithubHelp home page GithubHelp logo

rjzupkoii / psu-cidd-malaria-simulation Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 3.0 50.55 MB

Spatial individual-based model of malaria with a focus on drug resistance evolution.

Home Page: http://mol.ax

CMake 0.95% Shell 0.28% C++ 97.21% PLpgSQL 0.21% TeX 1.33% C 0.01%
malaria public-health spatial-modelling individual-based-modelling agent-based-modeling

psu-cidd-malaria-simulation's Introduction

PSU-CIDD-Malaria-Simulation

Penn State - Center for Infectious Disease Dynamics (CIDD) - Boni Lab


Overview

This repository contains the working codebase for the Spatial Malaria Simulation (MaSim) under development by the Boni Lab at Penn State. The codebase was originally forked from maciekboni/PSU-CIDD-Malaria-Simulation and was detached in perpetration of future development.

A comprehensive technical manual (PDF) for the simulation can be found in the manual directory which includes comprehensive directions for working with the simulation; however, a basic reference is provided in the Wiki. Stable code specific to publications are maintained in repositories under the Boni Lab on GitHub.

The simulation has been tested to run on Windows 10, Windows Subsystem for Linux (Ubuntu), and Red Hat 7.9. The majority of development is performed on under Linux so building and running under Windows may be impacted. While basic simulations are possible on desktop computing environments, regional and national scale simulations require advanced computing environments with access to 64 GB of RAM or more. Sample configuration files can be found under documentation/input/, and examination of simple.yml or spatial.yml is recommended after working with the demonstration configuration in documentation/demo/.

After cloning the repository to your local computer, the config.sh script can be run via sudo to install dependencies for building and creation of the build script at build\build.sh.

Command Line Arguments

The following commands are available from the simulation:

-c / --config     Configuration file, variant flag 
-h / --help       Display this help menu
-i / --input      Configuration file, preferred flag
-j                The job number for this replicate
-l / --load       Load genotypes to the database and exit
-o                The path for output files, default is the current directory
-r                The reporter type to use, multiple supported when comma delimited
-s                The study number to associate with the configuration

--dump            Dump the movement matrix as calculated
--im              Record individual movement detail
--lg              List the possible genotypes and their internal id values
--lr              List the possible data reporters
--mc              Record the movement between cells, cannot run with --md
--md              Record the movement between districts, cannot run with --mc

--v=[int]         Sets the verbosity of the logging, default zero

Use of either the -c or -i switch with an appropriate YAML file is required. When the -r switch is not supplied the simulation defaults to the DbReporter; however, with the -r switch the reporters listed using the --lr switch can be used instead.

psu-cidd-malaria-simulation's People

Contributors

merlinvn avatar rjzupkoii avatar thezhewenli avatar thutran avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

psu-cidd-malaria-simulation's Issues

Add variation of drug cycling strategy that is synchronized with the calendar

While documenting the the CyclingStrategy class it was observed there is a comment that "cycling_time should be match with calendar day." As implemented the class is strictly based upon elapsed days which can result it moving out of sync with the calendar as a result of leap years. Updating the class to support alternative calendar spans (i.e., months or years) would allow the system to stay synchronized. Alternatively, a leap-year aware version could be added to the codebase.

Remove legacy means of allocating `location_db`

While the simulation is moving the direction of using raster files to allocate the environment, there is still some legacy references to defining the environment in the YAML file via the location_db concept. These should be removed in favor of only using the raster_db concept. This will also allow the YAML setting to be renamed in the future if need be.

Remove legacy code related to older way of counting the number of treatment failures

In older iterations of the simulation the treatment failure concept could refer to a therapy failing (i.e., ) or an individual failing to seek treatment. In the latest version of the simulation the concepts are clearly separated, but some legacy code remains in the simulation that is being called. This should be removed to eliminate a nominal amount of CPU and memory overhead associated with the bookkeeping and calculations.

The deprecated function ModelDataCollector::record_1_TF is a good starting place to trace the code to be removed.

Refactor the `GenotypeCarriersReporter` to support reporting multiple alleles

The GenotypeCarriersReporter was originally written to report on carriers of 580Y or 561H. However, with the expansion of artemisinin resistant genotypes, it may be necessary to update the reporter to perform an arbitrary count of carriers. This will likely require the addition of a new database table along additional entries in the YAML configuration files.

Simulation crashes with due to NaN or -Inf being inserted into database

Simulations running the Ugandan configuration crashed at day 1830 with stack traces similar to the following:

[INFO] 20:57:28 - Day: 1830
crit_err_terminate caught unhandled exception.
type: N4pqxx16undefined_columnE
what(): ERROR:  column "nan" does not exist
LINE 1: ...eatment) VALUES (13299570, 1, 21504, 3291, 2806, -nan, 31.64...
                                                             ^

crit_err_terminate backtrace returned 20 frames

[bt]: (0) ./MaSim(_Z18crit_err_terminatev+0x29) [0x48d449]
[bt]: (1) /lib64/libstdc++.so.6(+0x9653c) [0x15423c89553c]
[bt]: (2) /lib64/libstdc++.so.6(+0x96597) [0x15423c895597]
[bt]: (3) /lib64/libstdc++.so.6(+0x967f8) [0x15423c8957f8]
[bt]: (4) ./MaSim() [0x480496]
[bt]: (5) ./MaSim() [0x5a9278]
[bt]: (6) ./MaSim() [0x59fc04]
[bt]: (7) ./MaSim() [0x5a0427]
[bt]: (8) ./MaSim() [0x5a04b6]
[bt]: (9) ./MaSim(_ZN4pqxx16transaction_base11direct_execESt17basic_string_viewIcSt11char_traitsIcEE+0x32) [0x5b6022]
[bt]: (10) ./MaSim(_ZN4pqxx16transaction_base4execESt17basic_string_viewIcSt11char_traitsIcEERKNSt7__cxx1112basic_stringIcS3_SaIcEEE+0x70) [0x5b67e0]
[bt]: (11) ./MaSim(_ZN10DbReporter17do_monthly_reportEv+0x243) [0x5713b3]
[bt]: (12) ./MaSim(_ZN10DbReporter14monthly_reportEv+0x33) [0x571573]
[bt]: (13) ./MaSim(_ZN5Model14monthly_updateEv+0x2d) [0x4fb95d]
[bt]: (14) ./MaSim(_ZNK9Scheduler15begin_time_stepEv+0x219) [0x555929]
[bt]: (15) ./MaSim(_ZN9Scheduler3runEv+0x260) [0x556940]
[bt]: (16) ./MaSim(_ZN5Model3runEv+0xf7) [0x4fd917]
[bt]: (17) ./MaSim(main+0x3ac) [0x48676c]
[bt]: (18) /lib64/libc.so.6(__libc_start_main+0xe5) [0x15423bed9d85]
[bt]: (19) ./MaSim(_start+0x2e) [0x48c8ae]


signal 6 (Aborted), address is 0x35357d002939b8 from 0x15423beedaff
crit_err_hdlr backtrace returned 24 frames

[bt]: (1) /lib64/libc.so.6(gsignal+0x10f) [0x15423beedaff]
[bt]: (2) /lib64/libc.so.6(gsignal+0x10f) [0x15423beedaff]
[bt]: (3) /lib64/libc.so.6(abort+0x127) [0x15423bec0ea5]
[bt]: (4) ./MaSim() [0x48d56c]
[bt]: (5) /lib64/libstdc++.so.6(+0x9653c) [0x15423c89553c]
[bt]: (6) /lib64/libstdc++.so.6(+0x96597) [0x15423c895597]
[bt]: (7) /lib64/libstdc++.so.6(+0x967f8) [0x15423c8957f8]
[bt]: (8) ./MaSim() [0x480496]
[bt]: (9) ./MaSim() [0x5a9278]
[bt]: (10) ./MaSim() [0x59fc04]
[bt]: (11) ./MaSim() [0x5a0427]
[bt]: (12) ./MaSim() [0x5a04b6]
[bt]: (13) ./MaSim(_ZN4pqxx16transaction_base11direct_execESt17basic_string_viewIcSt11char_traitsIcEE+0x32) [0x5b6022]
[bt]: (14) ./MaSim(_ZN4pqxx16transaction_base4execESt17basic_string_viewIcSt11char_traitsIcEERKNSt7__cxx1112basic_stringIcS3_SaIcEEE+0x70) [0x5b67e0]
[bt]: (15) ./MaSim(_ZN10DbReporter17do_monthly_reportEv+0x243) [0x5713b3]
[bt]: (16) ./MaSim(_ZN10DbReporter14monthly_reportEv+0x33) [0x571573]
[bt]: (17) ./MaSim(_ZN5Model14monthly_updateEv+0x2d) [0x4fb95d]
[bt]: (18) ./MaSim(_ZNK9Scheduler15begin_time_stepEv+0x219) [0x555929]
[bt]: (19) ./MaSim(_ZN9Scheduler3runEv+0x260) [0x556940]
[bt]: (20) ./MaSim(_ZN5Model3runEv+0xf7) [0x4fd917]
[bt]: (21) ./MaSim(main+0x3ac) [0x48676c]
[bt]: (22) /lib64/libc.so.6(__libc_start_main+0xe5) [0x15423bed9d85]
[bt]: (23) ./MaSim(_start+0x2e) [0x48c8ae]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.