DESCRIPTION ----------- Model to simulate the spread of Mycobacterium avium subsp. paratuberculosis (Map) within and between herds via trade mouvements between dairy herds. Control measures can be applied : - trade mouvements rewiring to foster exchanges between herds of the same status (according to within-herd prevalence) (w option) - hygiene, by decreasing calf exposure to bacterial environment (e option) - early culling of high shedders (k option) Model is mecanistic (infection dynamics) and data-driven (movements and demography), stochastic, discret-time and individual-based. INPUTS ------ Data FRANCE: BDNI (french database of cattle livestock) extraction from 2005 to 2013 (separator is a tabulation) - BirthFemaleEvents_withId.csv: number of births per herd per week (time step) line: 1 per herd column: 470 -> herd id, then a number per week (52 weeks x 9 years + 1 week) - CullingRates_withId.csv: death and culling rates per herd per year line: 1 per herd column: 82 -> herd id, (death rate at birth, death rate age=0-1 weeks, death rate age=2-8 weeks, death rate age=9-129, culling rate per parity x5) x 9 years - Headcounts_withId.csv: females number per herd per age group the 1st day of the simulation (2005/01/01) line: 1 per herd column: 136 -> herd id, then females number per "week" age (from 1 week old to 130 weeks old), then females number per parity (x5) - Network_withId_and_breedType_coderace.csv: trade movements between dairy herds line: 1 per female column: 6 -> source herd id, destination herd id, time step, age, breed (L for dairy or M for mixte), breed code Infection initialization in herds is based on simulation outputs from a within-herd model - selectedInitScenarioForPrev_1to90.csv: animal number per health state per age group according to within-herd prevalence line: 45001 -> header, then 500 possibilities x 90 prevalences (from 1 to 90) column: 692 -> animal proportion per health state (S or R, T, L, Im, Ih), then animal proportion per health per age group (5 health states x (130 weeks+5 parities) age groups), then bacteria in 12 different environments (not used) Data IRELAND: AIM (irish database of cattle livestock) extraction from 2009 to 2018 (separator is a tabulation) - BirthFemaleEvents_drm_withId_IR.csv: number of births per herd per week (time step) line: 1 per herd column: 522 -> herd id, then a number per week (52 weeks x 10 years + 1 week) - CullingRatesSeason_male_withId_IR.csv: death and culling rates per herd per year line: 1 per herd column: 361 -> herd id, (death rate at birth, death rate age=0-1 weeks, death rate age=2-8 weeks, death rate age=9-129, culling rate per parity x5) x 4 seasons x 10 years - Headcounts_male_withId_IR.csv: number per herd per age group the 1st day of the simulation (2009/01/01) line: 1 per herd column: 110 -> herd id, then number per "week" age (from 1 week old to 104 weeks old), then number per parity (x5) - Network_male_withId_IR.csv: trade movements between dairy herds line: 1 per animal column: 5 -> source herd id, destination herd id, time step, age, breed (L for dairy or X for mixed), year in which move occured - selectedInitScenarioForPrev_1to90_IR.csv: animal number per health state per age group according to within-herd prevalence line: 45001 -> header, then 500 possibilities x 90 prevalences (from 1 to 90) column: 562 -> animal proportion per health state (S or R, T, L, Im, Ih), then animal proportion per health per age group (5 health states x (104 weeks+5 parities) age groups), then bacteria in 12 different environments (not used) - Milk_yield_per_week_after_calving_IR.csv: weekly milk yield per week after calving line: 1 column: 52 -> milk yield in kg per week after calving OUTPUTS ------- 1 file per run per output: - "twoYearsOldPerHerdPerStep": number of females over 2 years old per herd per time step - "infected2YOPerHerdPerStep": number of infected females over 2 years old per herd per time step - "IhPerHerdPerStep": number of Ih per herd per time step - "positiveIhPerHerdPerStep": number of detected Ih per herd per time step - "persistencePerHerdPerStep": persistence (0 or 1) per herd per time step - "statesPerHerdPerStep": herd status (0, 1, 2,...for A, B, C,...) per herd per update (per time step or per year if 'a' option) - "statusPerHerdPerStep": herd status (0 or 1 for AAA or others) per herd per update (can be used only if 'q' option, which is usually used with 'a' option, so per year) - "newMoves": 1 line per movement done -> source, destination, time step, age, female health state, source status, destination status, rewiring type REQUIREMENTS ------------ C++ compiler: g++ (tested version: 7.2.0) => sudo apt install g++ Warning: standard library C++11 is required tclap (version 1.2.1): sudo apt install libtclap-dev INSTALL ------- mkdir results cd src For French model: make For Irish model: make irish CHECK (need to install libunittest++-dev) ------- cd src make test make cleantest LAUNCH ------ cd src ./spreadPTB -h EXAMPLE for 100 runs, 10 years, no rewiring, low calf exposure and estimated initial conditions: ./spreadPTB -r 100 -e 0.35 -p 0.969 => time ~7h40 (1 CPU on server, 1 run ~4min30), RAM ~5G, outputs ~10G (8 files per run, ~12M per file)