We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example:
### Non-freq-dep-fitness rT <- data.frame(parent = c("Root", rep("TP53", 2)), child = c("TP53", "MDM2", "ATM"), s = 0.5, sh = c(-Inf, 0, 0), typeDep = "MN") epvecx <- c("TP53:MDM2" = -0.4) FitEff <- allFitnessEffects(rT = rT, epistasis = epvecx) set.seed(1) ex3 <- oncoSimulIndiv( FitEff, model = "McFLD", mu = 1e-4, sampleEvery = 0.01, initSize = 5000, finalTime = 100, onlyCancer = FALSE ) ### Turning the first example into something you can intervene #### What are the fitnesses? (allgf <- evalAllGenotypes(FitEff, addwt = TRUE)) #### Write as freq-dep-fitess rTfdf <- allgf rTfdf[, 2] <- as.character(rTfdf[, 2]) colnames(rTfdf)[2] <- "Fitness" ## Add a dummy expression so fdf works rTfdf[1, 2] <- "1 + 0 * n_" rTF <- allFitnessEffects(genotFitness = rTfdf, frequencyDependentFitness = TRUE, frequencyType = "abs") ## Of course, much slower than the non-fdf, but identical set.seed(1) ex3F <- oncoSimulIndiv( rTF, model = "McFLD", mu = 1e-4, sampleEvery = 0.01, initSize = 5000, finalTime = 100, onlyCancer = FALSE ) par(mfrow = c(2, 1)) plot(ex3, show = "genotypes") plot(ex3F, show = "genotypes") #### Create intervention ## To make effects more visible, a stronger effect ix <- list( list(ID = "i1", Trigger = "T > 10", WhatHappens = "n_TP53_ATM = n_TP53_ATM*0.5", Periodicity = 1, Repetitions = Inf ) ) ixF <- createInterventions(ix, rTF) set.seed(1) ex3ixF <- oncoSimulIndiv( rTF, model = "McFLD", mu = 1e-4, sampleEvery = 0.01, initSize = 5000, finalTime = 100, onlyCancer = FALSE, interventions = ixF) par(mfrow = c(2, 1)) plot(ex3F, show = "genotypes") plot(ex3ixF, show = "genotypes")
(This is example is an answer to a question from Sara Verde Camacho, student of PRSTR, 2024-25)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Example:
(This is example is an answer to a question from Sara Verde Camacho, student of PRSTR, 2024-25)
The text was updated successfully, but these errors were encountered: