The schematic overview of CNETML. Samples may be taken from a patient at different locations and times during surveillance and get sequenced (with sWGS) and analysed to generate copy numbers (CNs). Given the CNPs and/or sampling times of all the patient samples, CNETML aims to infer a sample tree in which tips correspond to observed CNPs in samples and internal nodes correspond to ancestral CNPs. From the root, which represents the last unaltered common ancestor with normal copy number state (LUCA), there is a branch of length zero (dashed line), which leads to a tip representing the normal CNP to get a binary tree. LUCA is connected to the most recent common ancestor (MRCA) of the patient samples. We added an additional node before LUCA to show the CNP at the birth time, which was used to constrain the age of LUCA in inference. The state transition diagram of the Markov chain shows the duplication (red arrow) and deletion (blue arrow) of haplotype-specific copy number, with the maximum total copy number being 3 and the value in each oval representing a possible combination of copy number for haplotype A and B, denoted by c_A/c_B . The Markov model allows the computation of tree likelihood by taking the product over all sites along the genome. The CNPs of internal nodes (including MRCA) are unknown and inferred with ancestral reconstruction algorithms. Samples taken at different time points ( T_0 , T_1 , and T_2 ) are denoted by different colours