Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8....

42
Chromosome reduplication in the Gusev et al model of tumorigenesis Trevor Graham 25th April 2004 CoMPLEX MRes Essay 3 Supervisors: Dr Karen Page and Professor Ian Tomlinson 1

Transcript of Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8....

Page 1: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

Chromosome reduplication in the Gusev et al model of

tumorigenesis

Trevor Graham

25th April 2004

CoMPLEX MRes Essay 3

Supervisors: Dr Karen Page and Professor Ian Tomlinson

1

Page 2: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

Contents

1 Abstract 4

2 Introduction 4

3 Chromosomal instability 5

3.1 Effect of CIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3.2 The origins of CIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

4 Gusev Model 9

4.1 Model algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

4.1.1 Main algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

4.1.2 Division process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

4.2 Data collected from model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

4.3 Gusev et al.’s results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

4.3.1 Proportion of surviving clones . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

4.3.2 Cell growth . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

4.3.3 Chromosome frequency distribution . . . . . . . . . . . . . . . . . . . . . . . 13

4.4 Implementing the Gusev model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

5 Results 16

5.1 Population size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

5.2 Chromosome reduplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

5.2.1 Reduplication Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

5.2.2 Proportion of viable clones . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

2

Page 3: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

5.2.3 Chromosome distributions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

5.2.4 Biological relevance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20

6 Conclusions and Further Work 20

7 References 21

8 Appendix 22

8.1 C code for Gusev model with reduplication . . . . . . . . . . . . . . . . . . . . . . . 22

3

Page 4: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

1 Abstract

Chromosomal instability (CIN) is common in colorectal tumour cells. CIN appears to be both acause and consequence of tumourigenesis. In this essay the biological basis of CIN is discussed.The Gusev et al. model of chromosome segregation errors [6] is reviewed, its biological and clinicalrelevance is discussed, and a number of the results produced by Gusev et al. are reproduced.Discrepancies between the pliody of cells in the model compared to biological data is used tomotivate the introduction of chromosome reduplication into the model. Preliminary results showthat reduplication increases the proportion of viable clones for a given segregation error rate.Reduplication appears to have negligible effect on the chromosome distribution of a clone after 25generations.

2 Introduction

In multi-cellular organisms, somatic cells are tightly regulated. Cells are committed to collabora-tion, and self-sacrifice to protect the lineage of the germ cells is the norm. Cancer occurs whenthis tightly controlled cellular community is disrupted. A cell may develop a genetic mutation thatconfers a selective advantage over its neighbours, allowing it to grow at its neighbours’ expense.Uncontrolled growth leads to the development of a tumour. Cancer occurs when a benign tumourdevelops the capacity to invade surrounding tissues. The spread of cancer cells is called metastatis.

The genetic mutations that underlie the onset cancer are an inevitable consequence of the inherenterror rate in DNA replication[1]. However, the risk of developing cancer is greatly increased byexposure to environmental factors such as smoke inhalation [11], exposure to genetically damagingviruses such as hepatitis or lifestyle related risk factors like diet. There are specific ‘cancer genes’that predispose individuals to cancer. For example, women carrying a mutated version BRCA1 andBRCA2 genes have an increased risk of developing breast cancer. However, only about 5% of breastcancer cases are due to defects in these genes[3]. The importance of exposure to environmentalfactors is clearly illustrated by findings that cancer rates amongst immigrants converge to the localcancer rate[16].

Since the basis of cancer is uncontrolled growth of cells, one might naively assume that a singlemutation that increases the mitotic rate of a cell would be sufficient to cause cancer. This is not thecase; cells must accumulate a series of mutations before they become cancerous. The collection ofmutations are required to allow the cell to escape a number of control mechanisms imposed by themulti-cellular environment. In their influential paper, Hanahan and Weinberg desribe five principletraits that characterise cancer cells: self-sufficiency of growth signals, immunity to anti-growthsignals, evasion of apoptosis (cell death), limitless replicative potential, sustained angiogenesis(encouraging the growth of new blood vessels) and metastatis [8]. The mutation rate in healthycells is low, so the necessity that cells accumulate a number of mutations before they becomecancerous means that cancer most common at older ages [1].

The two most important mechanisms that cause mutations in tumour cells are termed micro-satellite instability (MIN) and chromosomal instability (CIN). MIN refers to genetic instability at

4

Page 5: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

the nucleotide sequence level [9]. CIN refers to more dramatic DNA alterations where sectionsof chromosomes or even entire chromosomes are duplicated or lost during cell division, but wheremutations at the nucleotide scale are rare. CIN cancers result in highly aneuploid cancer cells,where the karyotype can differ substantially from cell to cell. In contrast, MIN cells usually remaindiploid.

CIN is particularly common in colorectal cancer; Rajagopalan et al. claim that approximately85% of colorectal cancer cases exhibit CIN, with the remaining 15% characterised by MIN [18].CIN appears to be the dominant mechanism for tumorigenesis in most sporadically occurring solidtumours. Many researchers consider CIN and MIN to be effectively equivalent mechanisms foracquiring mutations [9].

In this essay the Gusev et al. model [6] of the effect of chromosomal instability on the karyotypeof a cell’s progeny is explored. In the Gusev model, chromosomal instability is represented by theprobability of mis-segregation of chromosomes between the two daughter cells during mitosis. Here,the dynamics of the model are examined and the effect of introducing chromosome reduplication isinvestigated.

Hanahan and Weinberg argue that as knowledge of molecular biology improves, understanding theprecise effect of particular genetic mutations is more feasible, improving the likelihood of successfullytreating cancers [8]. The motivation for modelling chromosome segregation errors is identical;understanding the dynamics of the segregation errors could allow measurements of the karyotypeof cancerous cells to be used to predict the stage and genetic basis of the cancer. These predictionscould be valuable when treating the cancer. For example, research by Reid et al. in human tumourcells found that the degree of aneuploidy increases with the malignancy of cells [19], suggestingthat measurements of the state of aneuploidy in a cell could be used to predict the length of timecell and surrounding tissue has been cancerous.

3 Chromosomal instability

3.1 Effect of CIN

The primary effect of CIN is to increase the genetic mutation rate. Particularly important mutationevents are loss of heterozygosity (LOH) events where both copies of a particular allele in a diploidorganism are lost. CIN can cause LOH by chromosomal loss or damage, or by the loss of onechromosome of a heterozygous diploid pair, and the subsequent reduplication of the remainingchromosome. A LOH event is often associated with a modification of a cellular function. Forexample, McEvoy et al. studied the effect of LOH events in the major histo-compatibility complex(MHC) in acute lymphoblastic leukemia1 (ALL) cells [12]. The MHC encodes human leukocyteantigens (HLAs). The protein products of these antigens bind to beta-2-microglubin polypetidesand the resulting protein complex is crucial in forming the presenting antigen complex for T-lymphocytes. McEvoy et al. found that mutations in the MHC and associated genes were oftendue to LOH events caused by the loss of and reduplication of a copy of chromosome 6. Mutations

1Acute lymphoblastic leukemia is cancer of immature white blood cells.

5

Page 6: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

in the MHC and associated genomic regions are thought to bestow a growth advantage on themutated cell, since the mutations reduce the expression level of the HLAs on the cell and hencereduce the immune system’s response to mutated (and potentially cancerous) cells.

It is important to note that aneuploidy and CIN are distinct phenomenon. CIN refers to a stateof genetically instability within a cell, whereas aneuploidy is merely a description of the frequencyof chromosomes in the cell. Aneuploidy can arise from a single division error; for example thekaryotype of a cell could be altered by an exogenous agent that disrupted the formation of themitotic spindle during cell division.

3.2 The origins of CIN

CIN may arise from genetic errors that impair a cell’s ability to successfully undergo mitosis.Mitosis is a complex and delicate exercise in cellular mechanics. At prophase, a centrosome (asmall region of cytoplasm adjacent to the nucleus that correlates microtubule formation) formson either side of the nuclear envelope. At this point the chromosomes have been duplicated andhave condensed in the nuclear envelope. Each duplicated chromosome pair has developed twomicrotubule attachment sites called kinetochores (see figure (3.1)). Each centrosome contains apole (centriole) that microtubules grow from. During metaphase microtubules grow at randomfrom each pole. In normal mitosis, the kinetochores from a pair of sister chromatids are capturedby microtubules from a opposite poles. The microtubules then retract, pulling the chromosomepair apart. Cytokinesis divides the cell in two, with a single centrosome and the correct numberchromosomes in each half of the dividing cell. (For a complete description of mitosis see Alberts etal. [1])

centrosome

microtubule

kinetochorechromatid

pair

Remains of

nuclear envelope

Figure 3.1: Metaphase: two centrosomes have formed of either side of the now broken down nuclearenvelope and the duplicated chromsomes are alligned with one kinetochore facing each centrosome.

Chromosome segregation does not always happen without mishap and cellular mechanisms haveevolved to help ensure successful chromosome segregation [15]. One such error checking mechanismuses microtubules’ property of being stbale only when under tension. A chromatid is unlikelyto be successfully dragged towards a pole unless the microtubule is under tension due to thesister chromatid having been captured by a microtubule from the other pole. Furthermore, cell-cycle checkpoints are controlled by microtubule tension as the checkpoint is delayed until sufficient

6

Page 7: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

microtubule tension is detected. Tension is thought to change the conformation of a phosphorylationsite at the kinetochore and the pole. Mutations can disrupt the checkpoint and lead to abnormalchromosome segregation. A more detailed discussion of checkpoint mutations is provided below.

To test whether CIN cells have disrupted cell division checkpoints, Cahill et al. treated a numberof MIN and CIN cancer lines with the microtubule disrupting agents nocodazole and colcemid [2].They found that treatment caused wild-type and MIN cells to prematurely exit mitosis, whereasCIN cells completed mitosis suggesting their mitotic checkpoint had been disabled.

The fact that CIN results from underlying genetic mutations rather being a consequence of ane-uploidy is well established. For example, Lengauer et al. performed a series of transfection ex-periments to establish that the CIN has a genetic basis and that the CIN phenotype is dominant[10]. They found that near diploid MIN cell lines maintained their karyotype when an extra copyof chromosome 3 was introduced. Furthermore, fusing the nuclei of two cells from the same near-diploid MIN cell line resulted in cells with a stable karyotype, whereas the progeny of fused CINcells were aneuploid. Lengauer et al. were also able to fuse MIN and CIN lines that had sufferedcompatible knockouts of tumour-suppressor genes2. The resulting hybrid cells were chromosomallyunstable, showing the dominance of the CIN phenotype.

Recent research has been concerned with establishing the specific genetic mutations required tofacilitate CIN. Advantages in biochemistry have allowed chromosomal changes to be analysed ingreater detail than previously possible [13]. Florescent in-situ hybridisation (FISH) refers to atechnique in which florescent tags are used to identify specific regions of a chromosome. Comparativegenomic hybridisation (CGH) uses FISH tecnhniques to compare genetic imbalances between twosections of DNA, and so can be used for example to compare DNA from a tumour cell withDNA from a wild-type cell. Spectral karyotyping (SKY) uses a combinatorial fluorescent taglabelling scheme to produce coloured images of a karyotype that can be used to identify cytogeneticabnormalities. Furthermore, the sequencing of the human and mouse genomes and the subsequentdevelopment of comparative ontology maps has allowed detailed animal models to be used to studyhuman cancers.

In their recent paper Jallepalli and Nicklas review the genetic basis and consequences of checkpointdisruption in causing CIN [9]. The review focuses on the importance of MAD and BUB geneswhich code for proteins that detect the microtubule tension dependent phosphorylation state ofthe kinetochore. MAD and BUB instigate a cell’s return to S-phase after microtubule disruption.MAD and BUB inhibit APC/C (anaphase promoting complex/cyclosome), that is responsible forthe degradation of securin proteins. Securins bind to seperatins to form a cohesin protein complexthat binds sister chromatids together. Securins prime seperatins for degredation, so the APCcatalysed decay of securins allows sister chromatids to seperate. Selective inhibition of APC byMAD and BUB is dependent on the phosphorylation state of the kinetochores therefore provides anerror checking mechanism for balanced chromosome segregation. Inhibition of APC is thought to becaused by conformational changes from the direct binding of MAD and BUB to APC. Jallepalli andNicklas cite experiments that show heterozygous mutations in MAD2 cause chromosome segregationerrors due to premature securin degredation, whereas heterozygous mutations in securin resultin sister chromatids failing to separate. Both mutations cause aneuploidy in the daughter cells,illustrating the fragility of the chromosome segregation process.

2Cells derived from fusing cell lines with incompatible tumour suppressor mutations were not viable.

7

Page 8: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

The relative importance of BUB mutations is illustrated by transfection experiments by Cahill etal. [2]. Cahill et al. found a heterozygous BUB1 muation in 2 out of 19 colorectal cancer linesthey analysed. Introducing either of the heterozygous mutations into MIN cell lines resulted inaneuploid daughter cells, showing the dominance of the mutant BUB1 phenotype.

APC also effects the wnt signalling cascade. APC degrades the cytoplasmic protein β-catenin. β-catenin accumulates in the nucleus where it displaces the inhibitory Groucho protein from the TCF4transcription complex, to form the β-catenin-TCF4 complex (CRT). This induces the transcriptionof wnt genes which in turn activate the c-myc gene that leads to cell growth and proliferation(see for example Alberts et al. [1]). Morin et al. investigated the effect of APC mutations onCRT signalling inhibition [14]. Using transfection experiments they found that the level of CRTexpression varied with the specific APC mutation, and some cell lines with complete APC stillhad CRT expression levels that were much greater than the wild-type cells. Examining the celllines with intact APC revealed mutations in β-catenin, specifically at the GSK-3β phosphorylationsite. These experiments illustrate the need for a holistic approach to reveal the genetic basis oftumorigenesis; knowledge of cell circuitry is required to understand the precise effect of particulargenetic mutations.

Fodde et al. investigated the C-terminal function of APC. The C-terminal binds the EB1 proteinthat is responsible for associating APC with the growing ends of cytoplasmic and spindle micro-tubulues and also with centrosomes [4]. Fodde et al. compared the phenotypic effect of C-terminalmutations and β-catenin mutations using two lines of mouse embryonic stem cells. These cell linescarry specific mutations at the C-terminal, or the domain functional in the wnt signalling cas-cade. Both cells lines were aneuploid, but only exhibited CIN when transfected with DNA whichover-expressed the Bcl-2 gene that appears to prevent apoptosis. This illustrates accumulation ofmutations required to develop CIN: mutations exist to allow aneuploidy to develop, but cell check-points prevent these cells from propagating. The cell line with the mutated C-terminus disruptedthe localisation of EB1 at the kinetochores suggesting that C-terminus mutations in APC effectthe rate of successful kinetochore capture.

Fodde et al. notes that CIN does not follow directly from APC mutations, especially becauseDID-1 cells have mutated APC but are diploid [4]. As Jallepalli and Nicklas conclude, mutatedAPC probably just provides a genetic buffer for CIN [9], and mutation of the mitotic checkpoint isrequired to instigate full chromosomal instability.

Other tumour suppressor genes are intimately involved in the onset of CIN. For example, Fukasawaet al. investigated the role of the tumour suppressor gene p53 in abnormal centrosome formation[5]. Immuno-staining on mouse embryonic fibroblasts was used to identify centrosomes. Of thep53 deficient cells studied, approximately 30% of the cells showed irregular centrosome number andapproximately 50% had an abnormal number of spindle poles.

In summary CIN has an established genetic basis associated with the disruption of chromosomesegregation and cellular checkpoints. Current research is concerned with ascertaining the precisenature of the genetic alterations associated with CIN; the scope of possible mutation may be broad.The CIN phenotype appears to be dominant.

Hanahan and Weinberg describe the fantastic possibilities for advances in cancer treatment sug-

8

Page 9: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

gested by current research [8]. With holistic knowledge of the biochemical ‘cell circuitry’, cancertreatments could be targeted to combat specific genetic mutations. Furthermore, the genetic insta-bility required for the onset of CIN and eventually cancerous cells could in itself be the Achilles’ heelof cancer. Jallepalli and Nicklas suggest that exposing cancerous tissue to mutagenic agents suchas UV light or γ-radiation might increase the mutation rate to a level intolerable to cells that havereduced mutation protection mechanisms [9]. Alternatively as Cahill et al. suggest, reactivatingcell checkpoints by an exogenous agent could trigger apoptosis in highly mutated cells [2].

4 Gusev Model

The Gusev model simulates the dynamics of simple chromosome segregation errors; only numericalchromosome segregation errors considered3. As explained above, it is hoped that knowledge ofthe dynamics of the changes in a cell’s chromosome complement due to segregation errors willfacilitate predictions about the length of time a tumour has been growing and allow estimates ofthe malignancy and genetic basis of the tumour. This information could be useful when treatingthe tumour.

In the Gusev model, cells are represented as discrete entities with a specified chromosome com-plement. Each cell has a fixed lifetime determined from a lifetime distribution. At the end of thecell’s life it divides into two daughter cells. Each chromosome in the cell is duplicated and thenthe chromosomes are distributed between the daughter cells. At division, each newly duplicatedchromatid pair is considered in turn; chromosome segregation errors (when both sisters of the chro-matid pair are delivered to one daughter cell) occur with probability pse (0 6 pse 6 1). The modelspecifies boundary conditions on the chromosome content of viable cells. If after cell division thechromosome content of a daughter cell violates a boundary condition then the daughter cell will diewithout undergoing cell division. Simulations begin with a single cell and statistics are collectedabout all the daughter cells in the clone.

A more formal algorithm description is provided in the next section.

4.1 Model algorithm

4.1.1 Main algorithm

1. Define pse, K (number of chromosome types), the chromosome boundary conditions (maxi-mum and minimum acceptable frequency of chromosomes of a particular type) and the viableand non-viable cell life-time distributions.

2. Initalise the first cell with a given chromosome distribution and randomly assign a lifetimefrom the viable lifetime distribution.

3. For each time-step:3Chromosome rearrangements are neglected.

9

Page 10: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

(a) Choose the first cell and check if it is viable.• If cell is viable and it is time for the cell to divide, then the cell divides according

to the cell division process defined below.• If cell is not viable and it is time for the cell to die, then the cell is removed from

the system.(b) Repeat step 3a for the next cell that existed at the beginning of the current time-step,

until all cells that existed at the beginning of the current time-step have been processed.

4. Increment the time and repeat step 3.

5. The simulation ends after a pre-defined number of time-steps, or when all the cells in thesystem have died.

4.1.2 Division process

1. Choose the first chromosome type.

2. Segregation for each chromosome of the particular chromosome type is computed:

(a) A random number r ∈ [0, 1] is chosen.• If r < 1

2pse then the first daughter cell receives two copies of the chromosome.• If 1

2pse6r < pse then the second daughter cell receives two copies of the chromosome.• If pse6r no segregation errors occur and both cells receive one copy of the chromo-

some.(b) Step 2a is repeated for each chromosome of the particular type.

3. Step 2 is repeated for each chromosome type.

4. Check if each daughter cell is viable and assign each cell a lifetime from the appropriatelifetime distribution.

4.2 Data collected from model

Two types of data are collected from the model; population size (number of viable and non-viable cells), and the information about the chromosome distribution in a given clone. Data isrecorded at each time step. The chromosome distribution information collected consists of frequencydistributions of each chromosome type, the mean, standard deviation and modal frequency for eachchromosome type, and the same frequency and average data for the aggregate chromosome contentof each cell.

4.3 Gusev et al.’s results

Gusev et al. typically computed the model using diploid initial cells, and required that viable cellshad at least one chromosome of each type [6]. The mean lifetime of viable cells was 12 time-steps

10

Page 11: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

and 4 time-steps for non-viable cells. The model was found to be invariant to the mean life-timeand the distribution of life-times. A distribution of lifetimes was used to provide clones that containcells from a mixture of generations at each time step.

4.3.1 Proportion of surviving clones

Initially Gusev et al. examined the fraction of surviving clones for: a given pse, number of chromo-some types and initial chromosome distribution. For each pse the model wold be simulated a largenumber of times. The fraction of surviving clones for each pse was computed as:

s =S1

S0 + S1(4.1)

where S0 is the number of non-viable clones (number of simulations that ended due to all cellsdying) and S1 is the number of viable clones.

The fraction of suriving clones is dependent on pse. Gusev et al. were able to define two criticalpse values: p1 such that for pse6p1 all clones were viable, and p0 such that for p0 < pse all clonesdied out. For p1 < pse6p0 the proportion of surviving clones decreases with increasing pse. (Seefigure (4.1))

The fraction of surviving clones was dependent on the initial chromosome distribution. Largervalues of p0 and p1 were found when the initial cell contained higher frequencies of chromosomesof each chromosome type.

The proportion of surviving clones was also dependent on the number of chromosome types (K).The value of p0 and p1 decreased as K increased (figure (4.2). The dependence of p1 on K can beexplained by considering the probability that a daughter cell will be non-viable due to recieving nochromosomes of a particular type. Consider a cell with a single chromosome type: the probabilitythat that cell will produce an non-viable daughter cell is: pseΩ where Ω is the probability that theparent cell contains only one chromosome. Since there is no interaction between chromosome types,the probability that non-viable daughter cell with K chromosome types is produced is thereforepseΩK.

Data about the proportion of survived clones has biological significance. Knowledge of the effect ofthe value of pse on the viability of a clone could be used to predict the possible therapeutic effectof increasing the inherent mutation rate in cancerous tissue.

4.3.2 Cell growth

Viable clones grow exponentially (at least initially). The growth rate is dependent on pse, growthis slower at higher values of pse. (figure (4.3)).

11

Page 12: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4

pse

Pro

po

rtio

n o

f via

ble

clo

nes

p0

p1

Figure 4.1: The proportion of surviving clones for a range of pse values. K=23, Kmax=8, uniformlydiploid initial cell. p1 ' 0.1 and p0 ' 0.15 Each point averaged over 100 runs. Data generated fromsimulations described below.

106 Y. GUSEV et al.

4 .4 . Clonal Survival De pe n ds on a Num be r o f Es s e n t ial Chrom os om e Type s

In orde r to test the role of our assumption about conditional cell death, we performed a series of simulation experiments in which alternative conditions of cell death were introduced. Different arrays of cjc (j = 1,. . . , 23) for a minimal permissible set of chromosomes were considered, with some cjs set to 0 (instead of 1 as in the basic model):

cjc = 1, forj=l,...,Kc, c.jfJ = 0, forj=Kc+l,...,K,

where Ks is an integer number of essential types of chromosomes, Kc E [l, K]; K is an integer number of all chromosome types, in our modeling K = 23.

By definition, if KO = K, w e have our basic model assumption in which all chromosome types are essential. For KO = 1, we have crc = 1; i.e., one chromosome type is essential. Loss of all chromosomes of only this type from a cell does cause cell death. For KO = 0, w e have a model in which the loss of all chromosomes is permitted; no conditional cell loss occurs in this model. The later assumption is not realistic and has been excluded from consideration.

For any Ko, w e ca n apply the same conditions to calculate the probability of cell death pd for a cell with a given set of chromosomes cj

0, if cj > COO, for all j = 1,2, . . . , K; Pd =

1, otherwise.

A series of simulations was completed under the same initial condition, a diploid initial cell. Statistics on the survival fraction of clones were collected for different values of KO E [l, K - 11. For each Ko value we obtained survival fractions s(p,,) which were qualitatively similar to those obtained under the assumptions of our basic model (Figure 5). However, the shape of the survival function was changed-the plateau and slope were extended significantly toward greater values of p,. For all KO < K, w e found that the fraction of surviving clones was greater than survival fraction for the basic model (Ko = K). Therefore, for the same initial conditions, a basic model generated survival fraction s(%J that represents the lower boundary of the possible survival curves. This result seems to provide another important quantitative characteristic of clonal growth in the presence of segregation errors.

I

0.9

0.9 Essent t a l Types of Chrom osom es, K 3

i 0 .7

t o 0 .6

f 0 .5

t 0 .4

i 0 .3

0 .2

0.1

0 0 0.1 0.2 0.3 0.4 0.5 0.6

Prababt l l t y of Ssgrsgat lan Error . p ,.

Figure 5. Fraction of survived clones, s(p-) obtained for different values of the number of essential typea of chromosomes, Kc : Ko = 23, Ko = 21, KO = 12. Figure 4.2: The proportion of surviving clones for a range of K values. The value of p1 appears

proportional to K. Initial cells were diploid. Image reproduced from Gusev et al. [6]

12

Page 13: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

0

5000000

10000000

15000000

20000000

25000000

30000000

35000000

0 50 100 150 200 250 300 350 400

Time

Nu

mb

er

of

via

ble

cells

pse=0.05pse=0.99

Figure 4.3: Number of viable cells against time. The growth rate is dependent on pse. Diploidinitial cell, K=1, Kmax=8. Note with a single chromosome type, setting pse=0.99 still produces aviable clone. Data generated from simulations described below.

4.3.3 Chromosome frequency distribution

The frequency distribution of chromosomes at each time step was examined. For small valuesof pse the average ploidy was approximately constant and the variance increased with time. Forlarger pse the mean ploidy increased with time and the modal chromosome frequency was normallydistributed.

Gusev et al. reported results about clones after 25 generations4 [7]. They compared the modalchromosome distribution for cells with twelve chromosome types to cells to biological data for thefrequency of chromosome distributions for twelve chromosome types of the HT29 colorectal cancerline after 25 generations [10]. Using χ2 tests and t-statistics, the value of pse corresponding tobiological data was estimated to lie between 0.005 and 0.01. The modal chromosome frequencydistribution for pse = 0.01 around 20 generations is shown in figure (4.4).

Computing the Gusev model for large numbers of generations is computationally difficult (this isexplained in more detail below). In order to study the Gusev model at long time scales, Gusev et al.developed a semi-analytic simplified version of their original model that represents the dynamicsof clones with a single chromosome type [7]. The simplified model is based on a Markov process.Using the simplified model, simulations upto '500 generations were computed.

4Due to heterogeneity of cell-lifetimes within a clone it is assumed that these results actually represents data froma clone after the model has been computed for the number of timesteps required for 25 mean lifetimes to have expired.Accordingly, throughout this essay a generation represents the mean life-time of a viable cell.

13

Page 14: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0 1 2 3 4 5 6 7 8

Modal chromsome frequency

Pro

po

rtio

nal o

f ce

lls

time=200time=220

Figure 4.4: Modal chromosome frequency distribution after 25 generations. K=12, pse=0.01,diploid initial cell. Data from a single run generated from simulations described below.

For small probabilities of segregation error (pse ' 0.001) the modal ploidy remained equal theintitial ploidy for the duration of the simulations (500 generations). For moderate segregation errors(pse ' 0.01) the modal ploidy tended to one, and standard deviation of chromosome frequency wassmall. For high (and biologically implausible) segregation error rates the modal frequency tendedto 1, but the mean error rate tended to approximately 3 and the standard deviation of chromosomedistribution was corresponding higher.

The distribution of chromosome frequencies was analysed after large numbers of generations. Themodal chromosome frequency was 1, with the frequency of cells with a larger number of chro-mosomes decreasing monotonically with chromosome frequency. Gusev et al. were motivated tointroduce an upper bound for the maximum number of chromsomes (Kmax) by the biologicallyunrealistic length of the ‘chromosome tails’ (the significant number of cells with a high frequency ofchromosomes). Tumour cells are rarely found with ploidy greater than eight. Simulations that in-cluded Kmax produced distributions of chromosome frequencies that were found to be independentof the ploidy of the initial cell and which had weak dependence on pse. (see figure (4.5))

Biological data indicates that CIN cells usually have a mean ploidy higher than 1. The data pro-duced by Lengauer et al. around 2-6 suggests the mean plody is between 2-6 [10]. This discrepancyfor biologically plausible values of pse motivated the introduction of chromosome reduplication intothe Gusev model. The effect of introducing reduplication is described below.

The semi-analytic model allows simulations to be computed for a large number of generations.However, I have concerns about the relevance of the semi-analytic model to simulations with morechromosome types. In the multi-chromosome type model, the probability of a daughter cell being

14

Page 15: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

Chromosomal Instability in Cancer

(a) Constant rate model, p = 0.1.

1267

InNId CondlNon,. Nin l :

-2

-4-l

-a-7

-_ 0 1 2 2 4 5 5 7 r

Ch-ma Numb

(a) Stable distribution of chromosome number (500 generations) for p = 0.1. Three sets of data are shown for Nlnl = 2,4,7.

(b) Constant rate model, N ini = 2. 0.4

1

I R ~mbrbilny of &gqa~~n Em, P :

i!Ov3

40.01

8-0.1

40.25

5 0.2

0.1

0 0 1 2 2 4 5 5 7 5

Chmmosonw Numbw

(b) Stable distribution of chromosome number (500 generations) for Nlni = 2. Data are shown for p = 0.01, 0.1,0.25.

Figure 8. Basic model of segregation errors (constant probability of segregation errors model). Stable distribution of chromosome numbers does not depend on initial con- ditions (number of chromosomes in the initiator cell, N lal) and has weak dependence on probability of segregation errors, p.

disagreement of some of our computa t iona l resu lt s with some of the exper imenta l da ta on the dist r ibu t ions of chromosome copies number .

a . Modal va lue for the dist r ibu t ions of a copy number for a single type of chromosome. In exper iments, especia lly with cell cu ltures, the mode of the chromosome number dist r ibu- t ions lies with in a range from one or six (with two, th ree, and four copies being more common, a lthough one copy is a lso seen often). The basic model demonst ra ted an asymp- tot ic dist r ibu t ion with maximum frequency a t smallest a llowable sta te, i.e.! with mode a t one chromosome copy per cell.

Figure 4.5: Modal chromosome frequency distribution after 500 generations for a range of pse valuescomputed using the analytic Gusev model. K=12, Kmax=8. Image reproduced from Gusev et al.[7].

created with a non-viable number of chromosomes is dependent on K (the number of chromosometypes). Further work is required to determine whether this K dependence prohibits the semi-analytic model being generalised to more than one chromosome type.

4.4 Implementing the Gusev model

Due to time-restrictions and concerns about the validity of the semi-analytic Gusev model appliedto more than one chromosome type, only the original Gusev model has been implemented here.

The model was implemented in ANSI standard C; the full C program listing is provided in theappendix (section (8.1)).

The program operates in the following way. Initially the programs creates a cell structure thatis used to store: the birth and death (divide) time of the cell, whether the cell is viable, and thenumber of chromosomes of each chromosome type. An array of cell structures is then allocated.The maximum size of the cell-array is limited by the physical memory of the computer the programwas computed on. Cell division is computed by moving through the cell array and identifying acell that is marked to divide at the current time step. One daughter cell of the division is stored inplace of the parent cell, and the second daughter cell is stored at the next empty cell location inthe cell array. When an non-viable cell dies, it is replaced by the cell at the end of the cell array.The overwriting of cells at division and death ensure that the cell-array is used to full capacity.Simulations end when all cells in the clone have died, the maximum number of time steps for thesimulation has been exceeded, or the cell-array has reached full capacity.

Pseudo-random numbers are generated using the long-return time (' 1018 iterates) generator ofL’Ecuyer with Bays-Durham shuffle [17]. Since the Gusev et al. model is invariant to the distri-

15

Page 16: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

bution of cell lifetimes (see below), for simplicity the cell lifetimes are assigned from a (truncated)uniform distribution. Viable cells are assigned a lifetime of mean 12 time-steps and non-viable cellsa mean lifetime of 4 time-steps.

Simulations are memory intensive. Viable cell populations appear to grow exponentially; theamount of RAM required to store the cell information effectively doubles with each generation.The model was computed on six Apple G4 computers, each with 512MB of RAM and one Ap-ple dual G5 computer with 1GB of RAM. More than 1500 hours of simulation were computed.Simulating a single chromosome type with pse ' 0.01, 512MB of RAM was sufficient to computeapproximately 25 generations of a particular clone (maximum number of cells 1.5× 107) and 1GBof RAM allowed the computation of approximately 27 generations of a clone (maximum number ofcells 3× 107).

The maximum number of cells for a typical simulation with 23 chromosome types was usually setat 106. These simulations took of the order of one minute to complete. Typically the computationended when all the cells in a clone were extinct or the cell-array was full. Computing number ofviable clones for a range of pse values is computationally expensive; to obtain suitable averageseach more than one hundred clones had to be computed for each value of pse.

5 Results

Simulations were always computed for diploid initial cells with Kmax=8. Restricted time limitedresearch to consider population growth and the effect of introducing reduplication into the model.

5.1 Population size

The semi-analytic Gusev model reaches a quasi-static state where the chromosome frequency dis-tribution is approximately constant. Computations were carried out to determine whether thepopulation size also becomes quasi-static. Results are inconclusive; memory limitations prohibitedthe simulation of clones beyond approximately 30 generations. Figure (4.3) above illustrates theinitial exponential growth of viable clones with one chromosome type.

The chromosome distribution during the exponential growth resembles the quasi-static distributionfound by the semi-analytic Gusev model (figure (5.1), and the mean, mode and standard deviationof the chromosome frequency in the clone appear to be close to their asymptotic values (figure (5.2).This suggests that the clonal growth remains exponential once the clone is established. This resultdoes not necessarily detract from the biological plausibility of the model since in vivo tumour cellshave exogenous growth limiting factors, such as resource competition.

16

Page 17: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

0

0.05

0.1

0.15

0.2

0.25

0.3

0 1 2 3 4 5 6 7 8

Modal chromosome frequency

Pro

po

rtio

n o

f ce

lls

Figure 5.1: Chromosome distribution after 200 and 250 generations. K=1, Kmax=8, pse=0.01.Data taken from a single run.

0

0.5

1

1.5

2

2.5

3

3.5

0 50 100 150 200 250

Time

meanstd devmode

Figure 5.2: Mean, mode and standard deviation of chromosome frequency against time. K=1,Kmax=8, pse=0.01. Data taken from a single run.

17

Page 18: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

5.2 Chromosome reduplication

Chromosome loss and subsequent reduplication is common in CIN cells. To explore the effect ofreduplication in the Gusev model, a new rule was introduced where cells with single chromosome ofa particular type could reduplicate a second chromosome of that type with probability (pr). Thismodel of chromsome reduplication preserves diploid cells. The modified model is described moreformally below.

5.2.1 Reduplication Algorithm

1. Compute the division process as in section (4.1.2) above. After completing chromosomesegregation for each chromosome type (step (2b)) the possibility of reduplication is considered.

2. Choose a daughter cell. If the daughter cell has only a single chromosome of the particulartype, then that chromosome is reduplicated with probability pr.

3. Repeat step (2) for the second daughter cell.

5.2.2 Proportion of viable clones

The proportion of viable clones for a range of values of pr was investigated. The p1 and p0 valuesincreased with increasing pr (see figure (5.3)).

0

0.2

0.4

0.6

0.8

1

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4

Pse

Pro

po

rtio

n o

f via

ble

clo

nes

pr=0.1vpr=0.3vpr=0.5vpr=0.7vpr=0.9v

Figure 5.3: Proportion of viable clones for a range of pr values. K=23, Kmax=8. Each pointaveraged over 120 runs.

18

Page 19: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

The reduplication model appears more sensitive to values of pse than pr. Increasing pr from 0.1 to0.9 only increases p0 (the value of pse that precludes the growth of a viable clone) by approximately0.1.

5.2.3 Chromosome distributions

Introducing reduplication appears to have little effect on the chromosome distributions of clonesafter approximately 25 generations. This is illustrated in figure (5.4). The distribution is shiftedslightly towards lower chromosome numbers when reduplication is introduced; this seems indicativeof the fact that reduplication increases the probability that cells with a single chromosome willsurvive.

0.00

0.05

0.10

0.15

0.20

0.25

0.30

0.35

0 1 2 3 4 5 6 7 8

Chromosome frequency

Pro

po

rtio

n o

f ce

lls

pr=0pr=0.5pr=0.9

Figure 5.4: The effect of reduplication on chromosome distributions at around 25 generations.pse=0.1, K=12, Kmax=8. Data from single runs.

Interestingly, the chromosome distribution illustrated in figure (5.4) does not resemble the chro-mosome distribution for a single chromosome type after 25 generations (see figure (5.1)). Thediscrepancy between the chromosome distribution in the two cases suggests that the Gusev modelmay have behaviour that is dependent on the number of chromosome types. Time limitationsprevented further analysis of the relationship between the single chromosome model and the multichromosome model. This is an interesting enquiry for future research.

19

Page 20: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

5.2.4 Biological relevance

A biologically plausible value of pr may be as low as 10−3 [20], although measuring pr in vitro isextremely difficult. At small values of pr the proportion of viable clones is very similar to the modelwithout reduplication. This model of reduplication may therefore have little biological significance.

6 Conclusions and Further Work

Viable clones were found to grow exponentially. Although simulations for large numbers of gener-ations were unfeasible, the chromosome distribution appeared quasi-static after approximately 25generations suggesting that clones continue to grow exponentially at larger numbers of generations.Introducing chromosome reduplication was found to increase the proportion of viable clones for agiven pse and have negligible effect on the chromosome frequency distribution. However, final con-clusions should be drawn from results that are averaged over large data sets. Biologically plausiblereduplication rates appear to make reduplication in the model insignificant.

The usefulness of the semi-analytic approach in simulating the Gusev model for large numbers ofgenerations is apparent from the difficulty encountered in this essay when assessing whether clonesreach a quasi-static population size. Further work should determine whether the semi-analyticmodel can be generalised to simulate more chromosome types, or whether results from the singlechromosome model can be confidently applied to clones with more than one chromosome type.Results in this essay suggest that the single and multi chromosome type models may have differentdynamics.

The semi-analytic Gusev model reaches a quasi-static state where the chromosome frequency distri-bution is approximately constant. This quasi-static state is independent of the initial chromosomedistribution and has weak dependence on pse. Computational limitations have precluded investi-gating whether a similar stable state exists when more than one chromosome type is considered.Performing this analysis requires a more sophisticated simulation of the Gusev model or the gen-eralisation of the semi-analytic model to more chromosome types. Understanding the dynamics ofthe chromosome distribution en-route to the (possible) quasi-static state could be useful in clinicalcircumstances: knowledge of the dynamics would allow measurements of the state of aneuploidy incancerous tissues to be used to predict the stage of the tumour progression.

Modifications of the Gusev model would be interesting to examine. Firstly, the effect of variablechromosome segregation error rates could be examined. As described above, the degree of aneu-ploidy in a tumour cell appears to increase with the malignancy of the tumour. A model that (forexample) computes the segregation error rate for each cell from the average ploidy of that cell couldtherefore have biological significance. Secondly, LOH events could be introduced into the model.LOH events are a common consequence of chromosomal loss and reduplication. Genes would beassigned to specific chromsomes, and the karyotype of daughter cells would be studied.

20

Page 21: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

7 References

References

[1] Alberts, Bray, Lewis, Raff, Roberts, and Watson. The Molecular Biology of the Cell. GarlandPublishing, 4th edition, 2002.

[2] Daniel P Cahill, Christoph Lengauer, Jian Yu, Gregory J Riggins, James K V Willson, San-ford D Markowitz, Kenneth W Kinzler, and Bert Vogelstein. Muations of mitotic checkpointgenes in human cancers. Nature, 392:300–303, 1998.

[3] Cancer Research UK. What causes cancer, 15 November 2001. http://www.cancerhelp.org.uk/help/default.asp?page=119

[4] Riccardo Fodde, Jeroen Kuipers, Carla Rosenberg, Ron Smits, Menno Kielman, Claudia Gas-par, Johan H van Es, Cor Breukel, Joop Wiegant, Rachel H Giles, and Hans Clevers. Mutationsin the apc tumour suppressor gene cause chromosomal instability. Nature Cell Biology, 3:433–438, 2001.

[5] Kenji Fukasawa, Taesaeng Choi, Ryoko Kuriyama, Shen Rulong, and George F Vande Woude.Abnormal centrosome amplification in the absence of p53. Science, 271:1744–1747, 1996.

[6] Y Gusev, V Kagansky, and W C Dooley. A stochastic model of chromosome segregation errorswith reference to cancer cells. Mathematical and Computer Modelling, 32:97–111, 2000.

[7] Y Gusev, V Kagansky, and W C Dooley. Long-term dynamics of chromosomal instability incancer: a transition probability model. Mathematical and Computer Modelling, 33:1253–1273,2001.

[8] Douglas Hanahan and Robert A Weinberg. The hallmarks of cancer. Cell, 100:57–70, 2000.

[9] Prasad V Jallepalli and Christoph Lengauer. Chromosome segregation and cancer: cuttingthrough the mystery. Nature Reviews, 1:109–117, 2001.

[10] C Lengauer, K W Kinzler, and B Vogelstein. Genetic instability in colorectal cancers. Nature,386:623–627, 1997.

[11] Katie Mantell. Call for action on pollution from cooking stoves, 26 November 2003. http://www.scidev.net/News/index.cfm?fuseaction=readnews&itemid=1117&language=1

[12] Christopher R E McEvoy, Alexander A Morley, and Frank A Firgaira. Evidence for wholechromosome 6 loss and duplication of remaining chromosome in acute lymphoblastic leukemia.Genes, Chromosomes and Cancer, 37:321–325, 2003.

[13] Nicole McNeil, Cristina Montagna, Michael J Difilippantonio, and Thomas Ried. Compara-tive cancer cytogenetics, 2003. http://www.infobiogen.fr/services/chromcancer/Deep/ComparCancerCytogenet.html

[14] Patrice J Morin, Andrew B Sparks, Vladimir Korinek, Nick Barber, Hans Clevers, Bert Vo-gelstein, and Kenneth W. Kinzler. Activation of b-catenin-tcf signalling in colon cancer bymutations in b-catenin or apc. Science, 275:1787–1790, 1997.

21

Page 22: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

[15] R Bruce Nicklas. How cells get the right chromosomes. Science, 275:632–637, 1997.

[16] Julian Peto. Cancer epidemiology in the last century and the next decade. Nature, 411:390–395,2001.

[17] William H. Press, Saul A. Teukolsky, William T. Vetterling, and Brian P. Flannery. Numericalrecipes in c: the art of scientific computing, 2002. http://www.library.cornell.edu/nr/bookcpdf/c7-1.pdf

[18] Harith Rajagopalan, Martin A Nowak, Bert Vogelstein, and Christoph Lengauer. The signifi-cance of unstable chromosomes in colorectal cancer. Nature Reviews, 3:695–701, 2003.

[19] Thomas Reid, Regina Knutzen, Rudiger Steinbeck, Harald Blegen, Evelin Schrock, KerstinHeselmeyer, Stanislas du Manoir, and Gert Auer. Comparative genomic hybridization revealsa specific pattern of chromosomal gains and losses during the genesis of colorectal tumors.Genes, Chromosomes and Cancer, 15:234–245, 1996.

[20] Tomlinson, Ian. Chromosome reduplication rates in colorectal cancer cells Personal commu-nication, 21 April 2004

8 Appendix

8.1 C code for Gusev model with reduplication

The following code is availiable online at: http://www.homepages.ucl.ac.uk/~ucbptag/essay3/gusev_reduplication.c

#include <stdio.h>#include <time.h>#include <string.h>#include <stdlib.h>

#define IM1 2147483563

#define IM2 2147483399#define AM (1.0/IM1)#define IMM1 (IM1-1)#define IA1 40014#define IA2 40692#define IQ1 53668#define IQ2 52774#define IR1 12211#define IR2 3791#define NTAB 32#define NDIV (1+IMM1/NTAB)#define EPS 1.2e-7

22

Page 23: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

#define RNMX (1.0-EPS)

#define DEPTH 2000000000

typedef struct

int birth_time;int death_time;int viable;int *chromosomes; cell;

char *get_time();char *fn_string_gen(char *ICfile);cell *assign_cell_v(int n,int m);void free_cell_v(cell *cell_v,int m);int*assign_int_v(int n);float *assign_float_v(int n);

int get_death_time(int viable,long *seed);void divide_cell(cell *celllist, int parent, int daughter, int pse, int K, int Kmax, long *seed, int t);void copy_cell(cell *celllist, int parent, int daughter, int K);int main_cycle(cell *celllist, int pse, int pr, int K, int Kmax, int cellsmax, int timemax, long *seed, char *cell_fn, char *chromo_fn, char *av_fn, char *mode_fn, int *chromo_v, int *chromo_mode, float *mean_v);void divide_cell_reduplicate(cell *celllist, int parent, int daughter, int pse, int K, int Kmax, int pr, long *seed, intt);

void print_cell_list(cell *celllist,int K, int ncells, int t);void print_statistics(cell *celllist, int K, int Kmax, int ncells, int t, char *cell_fn, char *chromo_fn, int *chromo_v);void print_statistics_with_averages(cell *celllist, int K, int Kmax, int ncells, int t, char *cell_fn, char *chromo_fn, char *av_fn, char *mode_fn, int *chromo_v, int *chromo_mode, float *mean_v);void log_viable(int fin, char *IC_name);

void test_cell_divide(cell *celllist, int K, int Kmax, int pse, long *seed);

long *seed_ran(void);float ran_gen(long *idum);int ran(int max,long *seed);

int main(intargc, char *argv[])

// Check have specified filenameif(argc < 2)

printf("Please

23

Page 24: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

specify an initialisation file\nusage: exe [filename]\n");exit(1);

printf("Gusev

CIN model\n");

// Seed random number generatorprintf("Seeding random number generat

or\n");long *seed;seed = seed_ran();

// Create unique filenameschar *fn_str[80],

log_fn[80],cell_fn[80],chromo_fn[80],av_fn[80],mode_fn[80],*date_time[80];*fn_str = fn_string_g

en(argv[1]);strcpy(log_fn,*fn_str);strcat(log_fn,".log");strcpy(cell_fn,*fn_str);

strcat(cell_fn,".cell");strcpy(chromo_fn,*fn_str);strcat(chromo_fn,".chromo");strcpy

(av_fn,*fn_str);strcat(av_fn,".av.csv");strcpy(mode_fn,*fn_str);strcat(mode_fn,".mode

.csv");printf("filenames:\n%s\n%s\n%s\n%s\n%s\n",log_fn,cell_fn,chromo_fn,av_fn,mode_fn);

// Create log file streamFILE *log_file;log_file = fopen(log_fn,"w");if (log_file

== NULL) printf("\nCan’t open log file %s\n",log_fn);exit(2);

// Logstart time

*date_time = get_time();fprintf(log_file,"Run started at %s\n\n",*date_time);

// Log filenamesfprintf(log_file,"filenames:\n%s\n%s\n%s\n%s\n%s\n\n",log_fn,cell_fn,chromo_f

n,av_fn,mode_fn);

// Read in ICsFILE *IC_file;IC_file = fopen(argv[1],"r");i

24

Page 25: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

f (IC_file == NULL) printf("\nCan’t open %s\n",argv[1]);exit(2);

float

pse_unscaled,pr_unscaled;int pse,K,Kmax,cellsmax,timemax,pr;fscanf(IC_file,"%f %d %d %d %d

%f\n",&pse_unscaled,&K,&Kmax,&cellsmax,&timemax,&pr_unscaled);pse = pse_unscaled*DEPTH;pr

= pr_unscaled*DEPTH;fprintf(log_file,"pse_unscaled: %e\npse scaled: %d\nK: %d\nKmax: %d\ncells

max: %d\ntimemax: %d\npr unscaled %f\npr scaled: %d\n",pse_unscaled,pse,K,Kmax,cellsmax,timemax,pr_unscaled,pr);

// Assign cell vectorcell *celllist;celllist = assign_cell_v(cellsma

x,K);fprintf(log_file,"Created cell vector with %d cells and %d chromosomes types per cell\n\n"

,cellsmax,K);

// Read in initial chromosome distributionint i;fprintf(log_file,"

Initial chromosome distribution:\n");for(i=0;i<K;i++)

fscanf(IC_file,"%d",&(celllist[0].chromosomes[i]));

fprintf(log_file,"%d ",celllist[0].chromosomes[i]);fprintf(l

og_file,"\n\n");

fclose(IC_file);

// Initialise first cellcelllist[0].birth_t

ime = 0;celllist[0].death_time = 1;celllist[0].viable = 1;

// Assign chromosome distribution vector for data handling

int *chromo_v,*chromo_mode;chromo_v = assign_int_v

(Kmax*K+2*K);chromo_mode = assign_int_v(Kmax+2);float *mean_v;mean_v = assign_float_v

(K);fprintf(log_file,"Created chromosome number handling vector with %d chromsome types and max

%d chromosomes per type\n",K,Kmax);

25

Page 26: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

int fin;fin = main_cycle(celllist,pse,pr,K,Kmax,cells

max,timemax,seed,cell_fn,chromo_fn,av_fn,mode_fn,chromo_v,chromo_mode,mean_v);

// Free memory

free_cell_v(celllist,cellsmax);fprintf(log_file,"Freed cell vector\n");free(*fn

_str);free(chromo_v);free(chromo_mode);free(mean_v);

// Log exit reasonif(f

in == 0)fprintf(log_file,"Exiting because max time reached\n");

else if (fin == 1)

fprintf(log_file,"Exiting because all cells died\n");else

fprintf(log_file,"Exitingbecause max number of cells reached\n");

log_viable(fin,argv[1]);

// Log end time*da

te_time = get_time();fprintf(log_file,"Run finished at %s\n",*date_time);

fclose(log_file);

free(*date_time);

return(0);

////////////////////////////////////////////////////////////////////////////////////////////////void log_viable(int fin, char *IC_name)

FILE *vi_file;if(!(vi_file = fopen("viable_log.txt","a")))

printf("Failed to open viable_log.txt\n");

exit(4);

int fin2 = 0;if(fin == 0 || fin == 2)

26

Page 27: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

fin2 = 1;

fprintf(vi_file,"%s %d %d\n",IC_name,fin,fin2);

fclose(vi_file);

////////////////////////////////////////////////////////////////////////////////////////////////void print_statistics_with_averages(cell *celllist, int K, int Kmax, int ncells, int t, char *cell_fn, char*chromo_fn, char *av_fn, char *mode_fn, int *chromo_v, int *chromo_mode, float *mean_v)

int i,j,nv=0,nu=0,cc,max;

// open cell fileFILE *cell_file;if(!(cell_file = fopen(cell_fn,"

a"))) printf("error opening cell statistics file %s\n",cell_fn);exit(4);

// open chromo fileFILE *chromo_file;if(!(chromo_file = fopen(chromo_fn,"a")))

printf("error opening chromo statistics file %s\n",chromo_fn);exit(4);

// open a

verages fileFILE *av_file;if(!(av_file = fopen(av_fn,"a")))

printf("error opening averages file %s\n",av_fn);

exit(4);// open averages fileFILE *mode_file;if(!(mode_file = fopen(mode_fn,"a")))

printf("error opening mode file %s\n",mode_fn);exit(4);

// zero chromo_vfor(i=0;i<K*Kmax+2*K;i++)

chromo_v[i]= 0;

// zero chromo_modefor(i=0;i<Kmax+2;i++)

chromo_mode[i] = 0;

27

Page 28: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

for(i=0;i<ncells;i++) // count viable cellsif(celllist[i].viable == 0

)nu++;

elsenv++;

// count chromo distributionmax

= 0;for(j=0;j<K;j++)

cc = celllist[i].chromosomes[j];// calculat

e cell’s model chromosome numberif (cc > max)

max = cc;//

record chromsome countif(cc > Kmax)

cc = K*Kmax + j;

elsecc = cc*K+j;

chromo_v[cc]++;if(max > Kmax)

chromo_mode[max+1]++;chromo_mode[max]++;

// write viable cell frequency information to file

fprintf(cell_file,"%d %d %d %d\n",t,nv,nu,nu+nv);fclose(cell_f

ile);

// write mode information to filefprintf(mode_file,"%d,",t);for(i=0;i<Kmax+

1;i++)fprintf(mode_file,"%d,",chromo_mode[i]);

fprintf(mode_file,"%d\n",chromo_mode[Kmax+1]);

fclose(mode_file);

// Calculate chromosome data averagesfprintf(av_file

,"%d,",t);// Calculate mean chromosome number by type and total meanint tmp,tmp2=0;

28

Page 29: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

float tmpf,tmpf2;for(j=0;j<K;j++)

tmp = 0;tmpf = 0.;for(i=1;i<=Km

ax;i++) tmp += chromo_v[i*K+j]*i;

tmp2 += tmp;tmpf = (float

) tmp/ (float) ncells;mean_v[j] = tmpf;fprintf(av_file,"%f,",tmpf);

tmpf

= (float) tmp2/ (float) ncells;fprintf(av_file,"%f,",tmpf);

// Calculate standard deviations

// Calculate for each chromosome typefor(j=0;j<K;j++)

tmpf2 = 0;for(

i=0;i<=Kmax;++i) tmpf2 += (i-mean_v[j])*(i-mean_v[j])*chromo_v[i*K+j];

tmpf2 /= ncells;fprintf(av_file,"%f,",tmpf2);

// Calculate total standard devi

ationfloat tmpf3;for(i=0;i<=Kmax;i++)

tmpf3 = (i-tmpf)*(i-tmpf);tmpf2 =

0;for(j=0;j<K;j++)

tmpf2 += chromo_v[i*K+j];tmpf2 += tmpf

3 * tmpf2;tmpf2 /= ncells;fprintf(av_file,"%f,",tmpf2);

// Calculate modal chromosome by type

for(j=0;j<K;j++) max = 0;for(i=0;i<=Kmax;i++)

29

Page 30: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

if(chromo_v[i*K+j] > max)max = i;

fprintf(av_file,"%d,",max

);

// Calculate modal chromosome freq across all cellsmax = 0;for(i=0;i<=Kmax;i

++) tmp = 0;for(j=0;j<K;j++)

tmp += chromo_v[i*K+j];if

(tmp > max)max = i;

fprintf(av_file,"%d\n",max);

// standard deviation of chromosome types

fclose(av_file);

// write chromosome distribution information to file

for(i=0;i<K*Kmax+2*K;i++) fprintf(chromo_file,"%d ",chromo_v[

i]);fprintf(chromo_file,"\n");fclose(chromo_file);

////////////////////////////////////////////////////////////////////////////////////////////////

void print_statistics(cell *celllist, int K, int Kmax, int ncells, int t, char *cell_fn, char *chromo_fn, int *chromo_v)

int i,j,nv=0,nu=0,cc;

// open cell fileFILE *cell_file;if(!(cell_file = fopen(cell_fn,"a"))

) printf("error opening cell statistics file %s\n",cell_fn);exit(4);

//

open chromo fileFILE *chromo_file;if(!(chromo_file = fopen(chromo_fn,"a")))

30

Page 31: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

printf("error opening chromo statistics file %s\n",cell_fn);

exit(4);

// zero chromo_v

for(i=0;i<K*Kmax+2*K;i++) chromo_v[i] = 0;

for(i=0;i<ncells;i++)

// count viable cellsif(celllist[i].viable == 0)

nu++;else

nv++;// count chromo distributionfor(j=0;j<K;j++)

cc = celllist[i].chromosomes[j];

if(cc > Kmax)cc = K*Kmax + j;

else

cc = cc*K+j;chromo_v[cc]++;

fprintf(cell_file,"%

d %d %d %d\n",t,nv,nu,nu+nv);fclose(cell_file);for(i=0;i<K*Kmax+2*K;i++)

fprintf(chromo_file,"%d ",chromo_v[i]);

fprintf(chromo_file,"\n");fclose(chromo_file);

////////////////////////////////////////////////////////////////////////////////////////////////

intmain_cycle(cell *celllist, int pse, int pr, int K, int Kmax, int cellsmax, int timemax, long *seed,char *cell_fn, char *chromo_fn, char *av_fn, char *mode_fn, int *chromo_v, int *chromo_mode, float *mean_v)

int t,i,ncells,oldncells,fin;fin = 0;ncells = 1;

print_statist

31

Page 32: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

ics_with_averages(celllist,K,Kmax,ncells,0,cell_fn,chromo_fn,av_fn,mode_fn,chromo_v,chromo_mode,mean_v);

for(t=1;t<=timemax;t++) // perform a time stepoldncells = ncell

s;i = 0;do

// move through cell listif(celllist[i].deat

h_time == t) // if time to dieif(celllist[i].viable == 1)

// cell viable -> dividedivide_cell_reduplicate(celllist,i,ncell

s,pse,K,Kmax,pr,seed,t);ncells++;

else

// cell not viable -> kill// copy last cell in list to current

positioncopy_cell(celllist,i,ncells-1,K);// check if copie

d cell was ’new’ or ’old’if(ncells<=oldncells)

// copied cell that existed at the beginning of this time-step

i--; // decrement iso copied cell is checked

oldncells--; // reduce oldncells, the number of cells to check, since effectively checking cell i twice!

nc

ells--; // record cell death

// check still haveviable cells

if(ncells == 0)fin = 1;

// check haven’t reached max number of cells

if(ncells == cellsmax)fin =

2;if(fin > 0)

break;i++;

32

Page 33: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

while(i<oldncells);

if(fin > 0)break;

print_statistics_with_averages(celllist,K,Kmax,ncells,t,cell_fn,chromo_fn,av_fn,mode_fn,chromo_v,chromo_mode,mean_v);

if(fin == 0)

printf("finished because timemax reached\n");else if (fin == 1)

printf("finished because all cells died\n");else

printf("finished because cellsmax reached\n");

return(fin);

////////////////////////////////////////////////////////////////////////////////////////////////

int get_death_time(int viable,long *seed) int dtime;if(via

ble == 0) dtime = ran(8,seed);

if(viable == 1)

dtime = ran(24,seed);

// cells must live for at least one time cycleif(dtime == 0)

dtime = 1;re

turn(dtime);

////////////////////////////////////////////////////////////////////////////////////////////////void test_cell_divide(cell *celllist, int K, int Kmax, int pse, long *seed)

int ncells = 1;

int t = 1;printf("first cell\n");print_cell_list(celllist,K,ncells,t);

++t;printf("after first division\n");divide_cell(celllist,0,1,pse,K,Kmax,seed,t);++nc

ells;

33

Page 34: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

print_cell_list(celllist,K,ncells,t);++t;printf("after second division (0->2)\n"

);divide_cell(celllist,0,2,pse,K,Kmax,seed,t);++ncells;print_cell_list(celllist,K,nce

lls,t);++t;printf("after second division (1->3)\n");divide_cell(celllist,1,3,pse,K,Km

ax,seed,t);++ncells;print_cell_list(celllist,K,ncells,t);

////////////////////////////////////////////////////////////////////////////////////////////////

void copy_cell(cell *celllist,int parent, int daughter, int K)

// the parent is overwritten by the daughter// copy birt

h and death times and viable attributecelllist[parent].birth_time = celllist[daughter].birth_ti

me;celllist[parent].death_time = celllist[daughter].death_time;celllist[parent].viable = c

elllist[daughter].viable;// copy chromosome configint i;for(i=0;i<K;i++)

celllist[parent].chromosomes[i] = celllist[daughter].chromosomes[i];

////////////////////////////////////////////////////////////////////////////////////////////////void divide_cell_reduplicate(cell *celllist, int parent, int daughter, int pse, int K, int Kmax, int pr, long *seed, int t)

int j,k,cc1,cc2,r,flag_viable1,flag_viable2;

flag_viable1 = flag_viable2 = 1;for(k=0;k<

K;k++) // Move through chromosomes typescc1 = cc2 = 0;for(j=1; j<=cellli

st[parent].chromosomes[k]; j++) // Test segregation error for each chromosome

r = ran(DEPTH,seed);

34

Page 35: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

if(r<= pse/2) // Segregation error to first d

aughter cellcc1 += 2;

else if (r <= pse)

// Segregation error to 2nd daughter cellcc2 += 2;

else

// Normal segregationcc1++;cc2++;

// Check chromosomal viabilityif((cc1 == 0) || (cc1 > Kmax))

flag_viable1 = 0;if((cc2 == 0) || (cc2 > Kmax))

flag_viable2 = 0;

// Check for reduplicationif(cc1 == 1)

// single chromsome of current type -> reduplicate

r = ran(DEPTH,seed);if(r<=pr)

// reduplication

cc1++;

if(cc2 == 1)

// single chromsome of current type -> reduplicater = ran(DEPTH,seed);

if(r<=pr) // reduplicationcc2++;

// Record number of chromosomescelllist[parent].chromosomes[k] = cc1;

celllist[daughter].chromosomes[k] = cc2;

35

Page 36: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

// Assign viabilityif(flag_viable1 == 0

)celllist[parent].viable = 0;

elsecelllist[parent].viable = 1;

if(flag_viable2 == 0)

celllist[daughter].viable = 0;else

celllist[daughter].viable = 1;

// Assign birth timescelllist[parent].birth_time = celllist[daughter].birth_time = t;

if(celllist[parent].viable == 0) celllist[parent].death_time = t + get_death_time(0,seed

);else

celllist[parent].death_time = t + get_death_time(1,seed);if(c

elllist[daughter].viable == 0) celllist[daughter].death_time = t + get_death_time(0,seed);

else

celllist[daughter].death_time = t + get_death_time(1,seed);

////////////////////////////////////////////////////////////////////////////////////////////////void divide_cell(cell *celllist, int parent, int daughter, int pse, int K, int Kmax, long *seed, int t)

int j,k,cc1,cc2,r,flag_viable1,flag_viable2;

flag_viable1 = flag_viable2 = 1;for(k=0;k<K

;k++) // Move through chromosomes typescc1 = cc2 = 0;for(j=1; j<=celllis

t[parent].chromosomes[k]; j++) // Test segregation error for each chromosome

r = ran(DEPTH,seed);if(r<= pse/2)

36

Page 37: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

// Segregation error to first daughter cell

cc1 += 2;else if (r <= pse)

// Segregation error to 2nd daughter cellcc2 += 2;

else

// Normal segregationcc1++;cc2++;

// Record number of chromosomescelllist[parent].chromosomes[k] = cc1;

celllist[daughter].chromosomes[k] = cc2;

// Check chromosomal viabilityif((cc

1 == 0) || (cc1 > Kmax))flag_viable1 = 0;

if((cc2 == 0) || (cc2 > Kmax))

flag_viable2 = 0;

// Assign viabilityif(flag_viable1 == 0)

celllist[parent].viable = 0;

elsecelllist[parent].viable = 1;

if(flag_viable2 == 0)ce

lllist[daughter].viable = 0;else

celllist[daughter].viable = 1;

// Assign birth times

celllist[parent].birth_time = celllist[daughter].birth_time = t;if(celllist[parent]

.viable == 0) celllist[parent].death_time = t + get_death_time(0,seed);

else

celllist[parent].death_time = t + get_death_time(1,seed);if(celllist[daughter].via

37

Page 38: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

ble == 0) celllist[daughter].death_time = t + get_death_time(0,seed);

else

celllist[daughter].death_time = t + get_death_time(1,seed);

////////////////////////////////////////////////////////////////////////////////////////////////

void print_cell_list(cell *celllist,int K, int ncells, int t)

int i,j;printf("viable\tbirth time\tdeath time\ttime %d

:\n",t);for(i=0;i<ncells;i++)

printf("%d %d %d chro: ",celllist[i].viable,celllist[i].birth_time,celllist[i].death_time);

for(j=0;j<K;j++) printf("%d ",celllist[i]

.chromosomes[j]);printf("\n");

printf("\n");

////////////////////////////////////////////////////////////////////////////////////////////////cell *assign_cell_v(int n,int m)

cell *cell_v;int i;// Assign memory for n cellscell_v = (cell *) malloc(

n*sizeof(cell));// Deal with malloc errorsif(!cell_v)

printf("memory allocationfailed when allocating cell array\n");

exit(3);

// Assign memory for m chromosomes per cell

for(i=0;i<n;i++) cell_v[i].chromosomes = (int *) malloc(m*sizeof(int));

if(!cell_v[i].chromosomes) printf("memory allocation failed when allo

cating chromosomes tails for cell array\n");exit(3);

38

Page 39: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

// Ret

urn pointerreturn(cell_v);

////////////////////////////////////////////////////////////////////////////////////////////////void free_cell_v(cell *cell_v,int n)

int i;for(i=0;i<n;++i

) free((cell_v[i].chromosomes));

free(cell_v);

////////////////////////////////////////////////////////////////////////////////////////////////float *assign_float_v(int n)

float *v;v = (float *) malloc(n*sizeof(float));if(!v)

printf("memory allocationfailed when allocating float array\n");

exit(3);return(v);

////////////////////////////////////////////////////////////////////////////////////////////////int *assign_int_v(intn)

int *v;v = (int *) malloc(n*sizeof(int));if(!v)

printf("memory allocation failed when allocating integer array\n");

exit(3);return(v);

////////////////////////////////////////////////////////////////////////////////////////////////char *fn_string_gen(char *ICfile)

time_t ltime;struct tm *stime;char *date_time_str,*fn_str;

// create str arraysdate_time_str = (char *) malloc(25*sizeof(char));fn_str = (char *) mal

39

Page 40: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

loc(80*sizeof(char));if(!date_time_str || !fn_str)

printf("memory allocation failed when filename char arrays\n");

exit(3);// include IC filenamestrcpy(fn_str,IC

file);strcat(fn_str,"_");// Assign time to ltimetime(&ltime);// Convert to tm st

ructure called stimestime = localtime( &ltime );// Use stime structure to create date_time

_stringstrftime (date_time_str, 25, "%d%m%y_%H%M%S", stime);// Concat time & date and IC f

ilename to produce final stringstrcat(fn_str,date_time_str);

return(fn_str);///////////////////////////////////////////////////////////////////////////////////////////////char *get_time()

time_t ltime;struct tm *stime;char *date_time;

// Malloc char array for time

date_time = (char *) malloc(25*sizeof(char));if(!date_time)

printf("memory allocation failed when malloc get_time char array\n");

exit(3);// Assign time t

o ltimetime(&ltime);// Convert to tm structure called stimestime = localtime( &ltime

);// Use stime structure to create date_time_stringstrftime (date_time, 25, "%d-%m-%y %H:%

M:%S", stime);return(date_time);

///////////////////////////////////////////////////////////////////////////////////////////////int ran(int max,long *seed)

40

Page 41: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

int r;r = (int) (ran_gen(

seed)*max);return(r);

///////////////////////////////////////////////////////////////////////////////////////////////long *seed_ran(void)

// Seeds ran with the date and time combined.

// make seed pointerlong *idum;idum = (long *) malloc(sizeof(long));if(!idum)

printf("memory allocation failed when creating random number seed\n");exit(3);

// Get time and date and assign to seedint seed;seed = -time(NULL);// convert to l

ong and return*idum = (long) seed;return (idum);

///////////////////////////////////////////////////////////////////////////////////////////////

float ran_gen(long *idum) // From NR.com. modified to return integer values return time of ord

er 10^18int j;long k;static long idum2=123456789;static long iy=0;static lo

ng iv[NTAB];float temp;if (*idum <= 0)

// Initialize.if (-(*idum) < 1) *idum=1;// Be sure to prevent idum = 0.else *idum = -(*idum);idum2=(*idum);

for (j=NTAB+7;j>=0;j--) // Load the shuffle table (after 8 warm-ups).k=(*idum)/IQ1;*id

um=IA1*(*idum-k*IQ1)-k*IR1;if (*idum < 0) *idum += IM1;if (j < NTAB) iv[j]

41

Page 42: Chromosome reduplication in the Gusev et al model of …ucbptag/work/tg_essay3.pdf · 2004. 8. 11. · In this essay the Gusev et al. model [6] of the effect of chromosomal instability

= *idum;iy=iv[0];

// Start here when not initializing.k=(*idum)/IQ1;// Compute idum=(IA1*idum) % IM1 without overflows by Schrage’s method.*idum=IA1*(*idum-k*

IQ1)-k*IR1;if (*idum < 0) *idum += IM1;k=idum2/IQ2;// Compute idum2=(IA2*idum) % IM2 likewise.idum2=IA2*(idum2-k*IQ2)-k*IR2;if (idum2 <

0) idum2 += IM2;// Will be in the range 0..NTAB-1.j=iy/NDIV;// Here idum is shunned, idum and idum2 are combined to generate output.iy=iv[j]-idum2;iv[j] = *idum;if (iy < 1) iy += IMM1;if ((temp=AM*iy) > RNMX) return RNMX; // Because

users don’t expect endpoint values.else return temp;//return(iy);

///////////////////////////////////////////////////////////////////////////////////////////////

42