This method adds a mutant specification to the mutation engine.
Arguments
- mutant_name
The mutant name.
- passenger_rates
The list of the passenger rates whose names are the epigenetic states of the species or a single rate, if the mutant does not have an epigenetic state.
- drivers
The list of the driver SNVs, indels, CNAs, and the whole genome doubling events (WGD) characterizing the mutant (optional).
Details
The users must use it to specify the name and the genomic characterisation (i.e., SNVs, indels, CNAs, and whole genome doubling events (WGD)) of all the simulated mutants together with the mutation rates of its species. The driver mutations are applied to the mutant progenitor's genome respecting the specification order.
Examples
# create a demonstrative mutation engine
m_engine <- MutationEngine(setup_code = "demo")
#>
[█---------------------------------------] 0% [00m:00s] Loading context index
[████████████████████████████████████████] 100% [00m:00s] Context index loaded
#>
[█---------------------------------------] 0% [00m:00s] Loading RS index
[███████████████-------------------------] 37% [00m:01s] Loading RS index
[██████████████████████████████----------] 74% [00m:02s] Loading RS index
[████████████████████████████████████████] 100% [00m:02s] RS index loaded
#>
[█---------------------------------------] 0% [00m:00s] Loading germline
[████████████████████████████████████████] 100% [00m:00s] Germline loaded
# add the mutant "A" characterized by two driver SNV on chromosome 22, two
# indels on the same chromosome, a whole genome doubling event, and finally
# two CNAs: an amplification and a deletion. The mutant has two epigenetic
# states and its species "A+" and "A-" have passenger SNV rates 1e-9 and
# 3e-8, respectively, and passenger CNA rates 0 and 1e-11, respectively.
m_engine$add_mutant("A", list("+" = c(SNV = 1e-9, indel = 1e-10),
"-" = c(SNV = 3e-8, CNA = 1e-11)),
drivers = list("DGCR8 P26L",
Mutation("22", 16085675, "GCCTCCCGA",
"G"),
"EP300 S2346del",
WGD,
CNA(type = "A", chr = "22",
chr_pos = 10303470,
len = 200000),
SNV("22", 23657587, "C"),
CNA("D", "22", 5010000, 200000)))
#>
[█---------------------------------------] 0% [00m:00s] Retrieving "A" SIDs
[█---------------------------------------] 0% [00m:00s] Found 22
[█---------------------------------------] 0% [00m:00s] Reading 22
[████████--------------------------------] 18% [00m:01s] Reading 22
[███████████████-------------------------] 36% [00m:02s] Reading 22
[██████████████████████------------------] 54% [00m:03s] Reading 22
[█████████████████████████████-----------] 72% [00m:04s] Reading 22
[█████████████████████████████████████---] 90% [00m:05s] Reading 22
[████████████████████████████████████████] 100% [00m:05s] "A"'s SIDs validated
m_engine
#> MutationEngine
#> Passenger rates
#> "A+": {SNV: 1e-09, indel: 1e-10}
#> "A-": {SNV: 3e-08, CNA: 1e-11}
#>
#> Driver mutations
#> "A":
#> DGCR8 P26L (chr22(20073563)[C>T]) on random allele
#> (chr22(16085675)[GCCTCCCGA>G]) on random allele
#> EP300 S2346del (chr22(41574750)[TTC>]) on random allele
#> Whole genome duplication
#> CNA("A",chr22(10303470), len: 200000)
#> (chr22(23657587)[G>C]) on random allele
#> CNA("D",chr22(5010000), len: 200000)
#>
#> Timed Exposure
#> SBS Timed Exposures
#>
#> indel Timed Exposures
#>