sim.regional: Simulate sequences and viral phylogenetic trees under the...

Description Usage Arguments Value References See Also Examples

Description

The Regional Transmission and Intervention Model captures individual-level HIV transmission dynamics in a regional population of ~80,000 invididuals, that is broadly similar to a site (cluster) of the HPTN071/PopART HIV prevention trial in South Africa (Hayes et al., 2014).

As of December 2015, this individual-level model is unpublished. The model builds on work of the HIV modelling consortium (Eaton et al., 2012) as well as an earlier compartmental model that was used to inform the design of the HPTN071/PopART trial (Cori et al., 2014). An extended version of this individual-level model will be used to help evaluate results from the HPTN071/PopART trial.

Please see for model details https://github.com/olli0601/PANGEA.HIV.sim

Usage

1
sim.regional(outdir, pipeline.args = sim.regional.args())

Arguments

outdir

Output directory. Must have write access. Directory name must not contain whitespace, brackets, etc

pipeline.args

Input arguments for the simulation, in form of a data.table, see sim.regional.args.

Value

File name of qsub or UNIX batch file.

References

Hayes R, Ayles H, Beyers N, Sabapathy K, Floyd S, et al. (2014) HPTN 071 (PopART): rationale and design of a cluster-randomised trial of the population impact of an HIV combination prevention intervention including universal testing and treatment - a study protocol for a cluster randomised trial. Trials 15: 57.

Eaton JW, Johnson LF, Salomon JA, Barnighausen T, Bendavid E, et al. (2012) HIV Treatment as Prevention: Systematic Comparison of Mathematical Models of the Potential Impact of Antiretroviral Therapy on HIV Incidence in South Africa. PLoS Med 9: e1001245.

Cori A, Ayles H, Beyers N, Schaap A, Floyd S, et al. (2014) HPTN 071 (PopART): a cluster-randomized trial of the population impact of an HIV combination prevention intervention including universal testing and treatment: mathematical model. PLoS One 9: e84511.

See Also

sim.regional.args

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#	re-name the following:
outdir			<- '/Users/Oliver/duke/2015_various'
## Not run: 
##--------------------------------------------------------------------------------------------------------
##	first example  
##--------------------------------------------------------------------------------------------------------
#	input arguments for the simulation that are varied across the PANGEA data sets
pipeline.args	<- sim.regional.args( 	seed=42,                    #random number seed for reproducibility
					yr.end=2020,				#end of simulation
					s.PREV.max.n=1600,          #number of sequences
					s.INTERVENTION.prop=0.5,    #proportion of sampled sequences after intervention start in 2015
					epi.acute='high',           #frequency of early infections (high or low)
					epi.intervention='fast',    #intervention scale-up (none, slow or high)
					epi.import=0.05 )			#proportion of transmissions from outside the regional population
cat(sim.regional(outdir, pipeline.args=pipeline.args))									
#	produce UNIX script to generate the simulation
cat(sim.regional(outdir, pipeline.args=pipeline.args))
#	now run this script from the command line
	
##--------------------------------------------------------------------------------------------------------
##	The sequence data sets of the PANGEA-HIV methods comparison exercise (Primary Objectives)  
##--------------------------------------------------------------------------------------------------------
pipeline.args	<- sim.regional.args( 	yr.start=1985, yr.end=2020, seed=42, 
					s.MODEL='Fixed2Prop', report.prop.recent=1.0, 
					s.PREV.max.n=1600, s.INTERVENTION.prop=0.5, s.INTERVENTION.start=2015, s.INTERVENTION.mul= NA, s.ARCHIVAL.n=50,
					epi.model='HPTN071', epi.acute=NA, epi.intervention= NA, epi.dt=1/48, epi.import=0.05, root.edge.fixed=0,
					v.N0tau=1, v.r=2.851904, v.T50=-2,
					wher.mu=log(0.00447743)-0.5^2/2, wher.sigma=0.5, bwerm.mu=log(0.002239075)-0.3^2/2, bwerm.sigma=0.3, er.gamma=4,
					dbg.GTRparam=0, dbg.rER=0, index.starttime.mode='fix1970', startseq.mode='one', seqtime.mode='AtDiag')								
pipeline.vary	<- data.table(	label= c('D','C','A','B'),																										
				epi.acute= c('low','low','high','high'),
				epi.intervention= c('fast','slow','fast','slow')
								)		
invisible(pipeline.vary[, {									
			set(pipeline.args, which( pipeline.args$stat=='epi.acute' ), 'v', as.character(epi.acute))
			set(pipeline.args, which( pipeline.args$stat=='epi.intervention' ), 'v', as.character(epi.intervention))												
			tmpdir			<- paste(outdir,'-Dataset',label,sep='')
			dir.create(tmpdir, showWarnings=FALSE)																														
			file			<- sim.regional(tmpdir, pipeline.args=pipeline.args)
			#system(file)	
			}])
##--------------------------------------------------------------------------------------------------------
##	The tree data sets of the PANGEA-HIV methods comparison exercise (Secondary Objectives)  
##--------------------------------------------------------------------------------------------------------
pipeline.args	<- sim.regional.args( 	yr.start=1985, yr.end=NA, seed=NA, s.MODEL='Fixed2Prop', report.prop.recent=1.0,
					s.PREV.max.n=NA, s.INTERVENTION.prop=NA, s.INTERVENTION.start=2015, s.INTERVENTION.mul= NA, s.ARCHIVAL.n=50,
					epi.model='HPTN071', epi.dt=1/48, epi.import=NA, root.edge.fixed=0,
					v.N0tau=1, v.r=2.851904, v.T50=-2,
					wher.mu=log(0.00447743)-0.5^2/2, wher.sigma=0.5, bwerm.mu=log(0.002239075)-0.3^2/2, bwerm.sigma=0.3, er.gamma=4,
					dbg.GTRparam=0, dbg.rER=0, index.starttime.mode='fix1970', startseq.mode='one', seqtime.mode='AtDiag')								
pipeline.vary	<- data.table(	label=					c('O',	 'F',	'T',	'S',	'Q',	'I', 	'G',	'J',	'K',	'R',	'N',	'M',	'L',	'P',	'E',	'H'),
				epi.acute=		c('low', 'high','low',	'low',	'low',	'low',	'low',	'high',	'high',	'low',	'low',	'high',	'high',	'high',	'high',	'high'),
				epi.intervention=	c('fast','fast','fast',	'fast',	'slow',	'fast',	'slow',	'fast',	'slow',	'slow',	'none',	'none',	'fast',	'fast',	'slow',	'slow'),
				yr.end=			c(2018,	 2018,  2020,  	2020,   2020,    2020, 	2020,	2020,	2020,	2020,	2020,	2020,	2020,	2020,	2020,	2020),
				epi.import=		c(0.05,  0.05,  0.05,   0.05,   0.05,    0.05,	0.05,	0.05,	0.05,	0.05,	0.05,	0.05,	0.05,	0.2,	0.2,	0.05),
				s.PREV.max.n=		c(1280,  1280,  1600,  	1600,   1600,    3200, 	3200,	3200,	3200,	1600,	1600,	1600,	1600,	1600,	1600,	1600),
				s.INTERVENTION.prop=	c(0.375, 0.375, 0.5,   	0.85,   0.85,    0.5,	0.5,	0.5,	0.5,	0.5,	0.5,	0.5,	0.5,	0.5,	0.5,	0.5),
				seed=                   c(17,    17,    5,     	13,     13,      11, 	11,		11,		11,		5,		5,		5,		5,		7,		7,		5))
invisible(pipeline.vary[, {	
			set(pipeline.args, which( pipeline.args$stat=='epi.acute' ), 'v', as.character(epi.acute))
			set(pipeline.args, which( pipeline.args$stat=='epi.intervention' ), 'v', as.character(epi.intervention))																	
			set(pipeline.args, which( pipeline.args$stat=='yr.end' ), 'v', as.character(yr.end))
			set(pipeline.args, which( pipeline.args$stat=='epi.import' ), 'v', as.character(epi.import))
			set(pipeline.args, which( pipeline.args$stat=='s.PREV.max.n' ), 'v', as.character(s.PREV.max.n))											
			set(pipeline.args, which( pipeline.args$stat=='s.INTERVENTION.prop' ), 'v', as.character(s.INTERVENTION.prop))
			set(pipeline.args, which( pipeline.args$stat=='s.seed' ), 'v', as.character(seed))
			tmpdir			<- paste(outdir,'-Dataset',label,sep='')
			dir.create(tmpdir, showWarnings=FALSE)																														
			file			<- sim.regional(tmpdir, pipeline.args=pipeline.args)
			#system(file)				
			}])

## End(Not run)

olli0601/PANGEA.HIV.sim documentation built on May 24, 2019, 12:52 p.m.