Skip to content

Commit 1b8672d

Browse files
committed
Added viral mutation parameters to reflect agents starting simulation with a common viral mutant present.
1 parent 614b793 commit 1b8672d

13 files changed

+2134
-3365
lines changed

AgentHistory.txt

+1,448-2,736
Large diffs are not rendered by default.

EvoNetC_Aim3.c

+49-5
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,10 @@ void PrintTrackedAgents()
187187
for (i=1; i<=N; i++) {
188188
if (Status[i] == 1) {
189189
if ((i >= TrackedAgentsGroup1start && i <= TrackedAgentsGroup1end) || (i >= TrackedAgentsGroup2start && i <= TrackedAgentsGroup2end)) {
190-
fprintf(AgentHistoryFile,"%ld\t%ld\t%ld\t%lf\t%d\t%lf\t%lf\t%ld\t%ld\t%ld\t%3.2lf\t%3.2lf\t%3.2e\t%d\t%2.1lf\t%2.1lf\t%2.1lf\t%2.1lf\t%ld\t%ld\t%ld",
190+
fprintf(AgentHistoryFile,"%ld\t%ld\t%ld\t%lf\t%d\t%lf\t%lf\t%ld\t%ld\t%ld\t%3.2lf\t%3.2lf\t%3.2e\t%d\t%2.1lf\t%2.1lf\t%2.1lf\t%2.1lf\t%ld\t%ld\t%ld\t%ld\t%ld\t%ld\t%ld\t%ld\t%ld",
191191
repl,time,i, SetPoint[i], Status[i], Time_Inf[i], s[i], Treated[i], tx_days[i], tx_days_aids[i], Age[i], ProbDropout[i], V[i],
192-
CD4[i],Drug[i][1],Drug[i][2],Drug[i][3],Drug[i][4], metab_type[i], Donors_Index[i], TransDR[i]);
192+
CD4[i],Drug[i][1],Drug[i][2],Drug[i][3],Drug[i][4], metab_type[i], Donors_Index[i], TransDR[i], AcqDR[i],
193+
mut_locus1[i], mut_locus2[i], mut_locus3[i], mut_locus4[i], mut_locus5[i]);
193194
for (i1=0;i1<=alleles[1];i1++) {
194195
for (i2=0;i2<=alleles[2];i2++) {
195196
for (i3=0;i3<=alleles[3];i3++) {
@@ -958,6 +959,29 @@ void AddInfecteds()
958959
UnderCare[i] = 0;
959960
}
960961

962+
//assign agents to have viral mutations at the beginning of the simulation
963+
if(genrand_real2() < prop_mut_locus1){ //locus position 1 is K65R
964+
mut_locus1[i] = 1;
965+
I_vec[i][1][0][0][0][0]=100000;
966+
967+
}
968+
if(genrand_real2() < prop_mut_locus2){ //locus position 2 is M184V
969+
mut_locus2[i] = 1;
970+
I_vec[i][0][1][0][0][0]=100000;
971+
}
972+
if(genrand_real2() < prop_mut_locus3){ //locus position 3 is K103N
973+
mut_locus3[i] = 1;
974+
I_vec[i][0][0][1][0][0]=100000;
975+
}
976+
if(genrand_real2() < prop_mut_locus4){ //locus position 4 is GenericTDF
977+
mut_locus4[i] = 1;
978+
I_vec[i][0][0][0][1][0]=100000;
979+
}
980+
if(genrand_real2() < prop_mut_locus5){ //locus position 5 is GenericEFV
981+
mut_locus5[i] = 1;
982+
I_vec[i][0][0][0][0][1]=100000;
983+
}
984+
961985
Time_Inf[i] = time;
962986
CD4time[i]=-Time_Inf[i] ; // What does this mean???
963987
TimeInAIDS[i]= 0;
@@ -969,7 +993,10 @@ void AddInfecteds()
969993
I_vec[i][0][0][0][0][0] = I[i];
970994
M_vec[i][0][0][0][0][0] = 0.0;
971995
L_vec[i][0][0][0][0][0] = 0.0;
972-
996+
997+
if(mut_locus3[i]==1){
998+
999+
}
9731000
Donors_V[i] = -1.0; // Flag absence of information with -1's or zeros.
9741001
Donors_ViralContribToLogSP0[i] = -1.0; // Flag absence of information with -1's or zeros
9751002
Donors_EnvirContribToLogSP0[i] = -1.0; // Flag absence of information with -1's or zeros
@@ -2311,7 +2338,24 @@ void UpdateViralLoadsAim3()
23112338
} while (Time < time_final);
23122339

23132340
// Done getting locus specific information. Update the old style "plain" V viral load array for agent i.
2314-
V[i] = V_total;
2341+
V[i] = V_total;
2342+
2343+
2344+
// Calculate the sum of the resistant mutants for triple, quadruple and quintuple mutants.
2345+
long triplus_mut_eq1;
2346+
long triplus_mut_eq2;
2347+
long triplus_mut_eq3;
2348+
long triplus_mut_tot;
2349+
2350+
triplus_mut_eq1 = I_vec[i][0][0][1][1][1] + I_vec[i][0][1][0][1][1] + I_vec[i][0][1][1][0][1] + I_vec[i][0][1][1][1][0];
2351+
triplus_mut_eq2 = triplus_mut_eq1 + I_vec[i][1][0][1][0][1] + I_vec[i][1][0][1][1][0] + I_vec[i][1][1][0][0][1] + I_vec[i][1][1][1][0][0];
2352+
triplus_mut_eq3 = triplus_mut_eq2+ I_vec[i][1][0][0][1][1] + I_vec[i][0][1][1][1][1] + I_vec[i][1][0][1][1][1] + I_vec[i][1][1][0][1][1];
2353+
triplus_mut_tot = triplus_mut_eq3 + I_vec[i][1][1][1][0][1] + I_vec[i][1][1][1][1][0] + I_vec[i][1][1][1][1][1];
2354+
2355+
//Use the sum of the 3+ mutant populations to assign acquired drug resistance
2356+
if(TransDR[i]==0 && triplus_mut_tot>0){
2357+
AcqDR[i]=1;
2358+
}
23152359

23162360
} // i loop
23172361
} // end of subroutine
@@ -3688,7 +3732,7 @@ void PrintHeaders()
36883732

36893733
if (repl == 1) {
36903734
if ( (TrackedAgentsGroup1end - TrackedAgentsGroup1start > 0) || ( TrackedAgentsGroup2end - TrackedAgentsGroup2start > 0) ) {
3691-
fprintf(AgentHistoryFile,"repl\ttime\tAgent\tSPVL\tStatus\ttInf\ts\ttx\ttx_d\ttx_dA\tAge\tPdrop\tV\tCD4\tD1\tD2\tD3\tD4\tMet\tDonor_Index\tTransmittedDR");
3735+
fprintf(AgentHistoryFile,"repl\ttime\tAgent\tSPVL\tStatus\ttInf\ts\ttx\ttx_d\ttx_dA\tAge\tPdrop\tV\tCD4\tD1\tD2\tD3\tD4\tMet\tDonor_Index\tTransDR_status\tAcqDR_status\tmut_at_loc1\tmut_at_loc2\tmut_at_loc3\tmut_at_loc4\tmut_at_loc5");
36923736
for (i1=0;i1<=alleles[1];i1++) {
36933737
for (i2=0;i2<=alleles[2];i2++) {
36943738
for (i3=0;i3<=alleles[3];i3++) {

GrandSummary.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
Strat u25 tx ActTx yearly_incr repl dAIDS HIV+ AllTx NotAllTx Untreated NotTargeted PerDaysTx susc_d new_infs cd4_1days cd4_2days cd4_3days cd4_4days cd4_5days tx_days D00 D01 D02 D03 D05 D07 D08 D10 D15 D20
2-
1 0 0.800 0.158 0.020 1 0 65 0 465 18 1.000000 49 19068 15 6881 2657 632 273 0 11768 0.703134 0.698943 0.694739 0.690521 0.682046 0.673517 0.669231 0.660617 0.638817 0.616615
2+
1 0 0.800 0.188 0.020 1 0 32 0 465 13 1.000000 20 9675 6 4144 1125 509 136 0 5766 0.365063 0.362565 0.360062 0.357553 0.352519 0.347461 0.344924 0.339830 0.326986 0.313972

HeaderEvoNetC_Aim3.h

+28-15
Original file line numberDiff line numberDiff line change
@@ -255,27 +255,40 @@ double reduced_linkage_low_risk = 1.0;
255255

256256
long TransDR[5001];// transmitted drug resistance status
257257
long AcqDR[5001];// acquired drug resistance status
258-
double fast_metab_prop=0.0;
259-
double inter_metab_prop=1.0;
260-
double slow_metab_prop=0.0;
261258

262259
long metab_type[5001]; //agent attribute, metabolizer type 1=intermediate, 2=slow, 3=fast
263260

264-
double fast_decay1_change=1.0; // value of decay change for drug1
265-
double inter_decay1_change=1.0; // value of decay change for drug1
266-
double slow_decay1_change=1.0; // value of decay change for drug1
261+
long mut_locus1[5001]; // Mutation at locus position 1, GenericTDF
262+
long mut_locus2[5001]; // Mutation at locus position 2, GenericEFV
263+
long mut_locus3[5001]; // Mutation at locus position 3, K103N
264+
long mut_locus4[5001]; // Mutation at locus position 4, M184V
265+
long mut_locus5[5001]; // Mutation at locus position 5, K65R
267266

268-
double fast_decay2_change=1.0; // value of decay change for drug2
269-
double inter_decay2_change=1.0; // value of decay change for drug2
270-
double slow_decay2_change=1.0; // value of decay change for drug2
267+
double fast_metab_prop=0.0; //Proportion of fast metabolizers in the population
268+
double inter_metab_prop=1.0; //Proportion of intermediate metabolizers in the population
269+
double slow_metab_prop=0.0; //Proportion of slow metabolizers in the population
271270

272-
double fast_decay3_change=1.0; // value of decay change for drug3
273-
double inter_decay3_change=1.0; // value of decay change for drug3
274-
double slow_decay3_change=1.0; // value of decay change for drug3
271+
long prop_mut_locus1; //Proportion of people with a mutant at locus position 1
272+
long prop_mut_locus2; //Proportion of people with a mutant at locus position 2
273+
long prop_mut_locus3; //Proportion of people with a mutant at locus position 3
274+
long prop_mut_locus4; //Proportion of people with a mutant at locus position 4
275+
long prop_mut_locus5; //Proportion of people with a mutant at locus position 5
275276

276-
double fast_decay4_change=1.0; // value of decay change for drug4
277-
double inter_decay4_change=1.0; // value of decay change for drug4
278-
double slow_decay4_change=1.0; // value of decay change for drug4
277+
double fast_decay1_change=1.0; // value of decay change w/ fast metabolizers for drug1
278+
double inter_decay1_change=1.0; // value of decay change w/ inter metabolizers for drug1
279+
double slow_decay1_change=1.0; // value of decay change w/ slow metabolizersfor drug1
280+
281+
double fast_decay2_change=1.0; // value of decay change w/ fast metabolizers for drug2
282+
double inter_decay2_change=1.0; // value of decay change w/ inter metabolizers for drug2
283+
double slow_decay2_change=1.0; // value of decay change w/ slow metabolizers for drug2
284+
285+
double fast_decay3_change=1.0; // value of decay change w/ fast metabolizers for drug3
286+
double inter_decay3_change=1.0; // value of decay change w/ inter metabolizers for drug3
287+
double slow_decay3_change=1.0; // value of decay change w/ slow metabolizers for drug3
288+
289+
double fast_decay4_change=1.0; // value of decay change w/ fast metabolizers for drug4
290+
double inter_decay4_change=1.0; // value of decay change w/ inter metabolizers for drug4
291+
double slow_decay4_change=1.0; // value of decay change w/ slow metabolizers for drug4
279292

280293
double cost1 = 0.01, cost2 = 0.01, cost3 = 0.02, cost4 = 0.01, cost5 = 0.0;
281294

0 commit comments

Comments
 (0)