cinsim
R package for simulating chromosomal instability in silico
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.6%) to scientific vocabulary
Repository
R package for simulating chromosomal instability in silico
Basic Info
- Host: GitHub
- Owner: Kaam-umcg
- License: gpl-3.0
- Language: R
- Default Branch: main
- Homepage: https://eriba.umcg.nl/groups/genomic-instability-in-development-and-disease/
- Size: 321 KB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 7
- Releases: 0
Metadata Files
README.md
Documentation is incomplete! (WIP)
CINsim
Installation
To install, use devtools::install_github("Kaam-umcg/CINsim"). Alternatively, download the repository into a folder, and install directly within the console.
CINsim wrapper function
The main wrapper function in this package is Cinsim(), which can take many (optional) parameters as input. They are outlined below.
Main parameters
karyotypesa matrix with karyotypes (cells in rows, chromosomes in columns) actings as the founder population. If none is given, by default, then a founder population of 1 diploid mouse cell is used (default = NULL).euploid_refsets the euploid chromosome copy number, most importantly used to calculate aneuploidy score (default = 2).gthe maximum number of generations (cycles) the simulation should run before it stops (default = 12)max_num_cellsthe maximum number of cells allowed (extrapolated from downsampled population) before the simulation stops (default = 2e+09).pMissegsets the per chromatid probability of mis-segregation per mitosis (default = 0.0025).pMissegGa vector of generation/cycle numbers during which mis-segregation occurs. This parameter can be used to introduce periods of mis-segregation rather than continuous CIN (default = NULL).pWGDsets the probability of whole genome doubling (WGD) per cells (bypasses mitosis/mis-segregations) (default = 0).pDivisionsets the baseline probability of division. Set to a value less than 1 for asynchronous cell division (default = 1).copy_num_boundariessets the range (minimum and maximum) of viable copy numbers; karyotypes with copy numbers outside this range will die (default = 1-8).qModsa vector of length 3 to modify the internally calculate values of pDivision, pMisseg, and pSurvival respectively.
Selection parameters
The following parameters relate to modes and strength of karyotype selection:
* selection_mode can be any of three possible modes: "cn_based", "rel_copy", or "davoli". Default is NULL which yields no selection.
"cn_based" is the main mode of selection used in our study, relying on a copy number matrix that defines the relative fitness of chromosome copy number states (see below @ selection_metric).
"rel_copy" defines fitness on the degree of copy number deviation from the population median ploidy. Greater deviation from the modal ploidy will result in greater decreases in fitness.
"davoli" is based on the TSG-OG chromosome dosage scores to simulate the balance of tumour suppressor genes and oncogenes as a metric for oncogenicity of chromosomes (based on Davoli et al., 2013).
selection_metricdefines the selection metric used for the respective selection mode, such as a copy number matrix for the"cn_based"mode.coefa list of length three with karyotype fitness coefficients (default = NULL). These coeffecients can be calculated using themake_cinsim_coefficientsfunction (see below for more details).
Optional/additional parameters
The remaining parameters have not been explored in the main study, but could be of interest to users:
fit_missegdetermines whether fitness proportionally affects the rate of mis-segregation. More fit cells will mis-segregate less often (default = FALSE).fit_divisiondetermines whether fitness proportionally affects the rate of division. More fit cells will divide more often (default = FALSE).chrom_weightsa vector defining the weights of individual chromosomes, if you would like specific chromosomes to contribute more the fitness metric than others (default = FALSE).max_monosomythe maximum number of monosomic chromosomes allowed before a cell dies (default = NULL).min_euploidthe minimum number of chromosomes that must remain euploid before a cell dies (default = NULL).
Systemic parameters
The following parameters are not related to biological concepts but technical aspects of the simulation.
down_samplethe maximum simulated population size (agents) before the population is down-sampled (default = 50.000).down_sample_fracthe fraction of the population that is randomly selected for the next generation if down-sampling occurs (default = 0.25).collect_fitness_scoresa boolean whether fitness scores are collected over time. This is a time-consuming process and can slow down the simulation rate significantly at larger scales (default = FALSE).
Setting up a simulation (without karyotype-based selection).
To run a simple simulation, just call the "Cinsim()" function to create an object in which to store the results, and specify the parameters of interest. In this example we run a simulation with a fair amount of CIN for 25 cycles and no selection:
sim_res <- Cinsim(pMisseg = 0.0025, g = 25, selection_mode = NULL)
Depending on your computer's processing power, it may take a few seconds or minutes to complete the simulation. A message is displayed to communicate the current stage of the simulation run, including the amount of time it took to complete a step. To quickly inspect the resulting karyotype landscape call the "cnvHeatmap()" function on the results object:
cnvHeatmap(sim_res)
By default this function will sample 1,000 cells from the population to display. More cells can be displayed if desired at the expense of time and memory. We found that 1,000 cells are usually enough to get a good sense of the karytoypes. For a general summary of the copy number frequencies by chromosome at the end of the simulation, use the "plot_cn()" function on the results:
plot_cn(sim_res)
Alternatively, the copy number frequencies can be shown over time for each chromosome separately:
plot_cn(sim_res, final_g = FALSE)
Owner
- Name: AT van Kaam
- Login: Kaam-umcg
- Kind: user
- Location: Groningen
- Company: UMCG
- Repositories: 1
- Profile: https://github.com/Kaam-umcg
PhD student @ ERIBA
Citation (CITATION.cff)
# --------------------------------------------
# CITATION file created with {cffr} R package
# See also: https://docs.ropensci.org/cffr/
# --------------------------------------------
cff-version: 1.2.0
message: 'To cite package "CINsim" in publications use:'
type: software
license: Artistic-2.0
title: 'CINsim: Chromosomal Instability Simulator'
version: 1.0.0
abstract: Simulation of chromosomal instability in an evolutionary setting.
authors:
- family-names: Kaam
given-names: Alex
name-particle: van
email: a.t.van.kaam@umcg.nl
- family-names: Bakker
given-names: Bjorn
email: bjornbakker1989@gmail.com
contact:
- family-names: Kaam
given-names: Alex
name-particle: van
email: a.t.van.kaam@umcg.nl
references:
- type: software
title: ggplot2
abstract: 'ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics'
notes: Imports
url: https://ggplot2.tidyverse.org
repository: https://CRAN.R-project.org/package=ggplot2
authors:
- family-names: Wickham
given-names: Hadley
email: hadley@posit.co
orcid: https://orcid.org/0000-0003-4757-117X
- family-names: Chang
given-names: Winston
orcid: https://orcid.org/0000-0002-1576-2126
- family-names: Henry
given-names: Lionel
- family-names: Pedersen
given-names: Thomas Lin
email: thomas.pedersen@posit.co
orcid: https://orcid.org/0000-0002-5147-4711
- family-names: Takahashi
given-names: Kohske
- family-names: Wilke
given-names: Claus
orcid: https://orcid.org/0000-0002-7470-9261
- family-names: Woo
given-names: Kara
orcid: https://orcid.org/0000-0002-5125-4188
- family-names: Yutani
given-names: Hiroaki
orcid: https://orcid.org/0000-0002-3385-7233
- family-names: Dunnington
given-names: Dewey
orcid: https://orcid.org/0000-0002-9415-4582
- family-names: Brand
given-names: Teun
name-particle: van den
orcid: https://orcid.org/0000-0002-9335-7468
year: '2025'
doi: 10.32614/CRAN.package.ggplot2
- type: software
title: tidyverse
abstract: 'tidyverse: Easily Install and Load the ''Tidyverse'''
notes: Imports
url: https://tidyverse.tidyverse.org
repository: https://CRAN.R-project.org/package=tidyverse
authors:
- family-names: Wickham
given-names: Hadley
email: hadley@rstudio.com
year: '2025'
doi: 10.32614/CRAN.package.tidyverse
- type: software
title: doParallel
abstract: 'doParallel: Foreach Parallel Adaptor for the ''parallel'' Package'
notes: Imports
url: https://github.com/RevolutionAnalytics/doparallel
repository: https://CRAN.R-project.org/package=doParallel
authors:
- family-names: Corporation
given-names: Microsoft
- family-names: Weston
given-names: Steve
year: '2025'
doi: 10.32614/CRAN.package.doParallel
- type: software
title: foreach
abstract: 'foreach: Provides Foreach Looping Construct'
notes: Imports
url: https://github.com/RevolutionAnalytics/foreach
repository: https://CRAN.R-project.org/package=foreach
authors:
- name: Microsoft
- family-names: Weston
given-names: Steve
year: '2025'
doi: 10.32614/CRAN.package.foreach
- type: software
title: parallel
abstract: 'R: A Language and Environment for Statistical Computing'
notes: Imports
authors:
- name: R Core Team
institution:
name: R Foundation for Statistical Computing
address: Vienna, Austria
year: '2025'
- type: software
title: Hmisc
abstract: 'Hmisc: Harrell Miscellaneous'
notes: Imports
url: https://hbiostat.org/R/Hmisc/
repository: https://CRAN.R-project.org/package=Hmisc
authors:
- family-names: Harrell Jr
given-names: Frank E
email: fh@fharrell.com
orcid: https://orcid.org/0000-0002-8271-5493
year: '2025'
doi: 10.32614/CRAN.package.Hmisc
- type: software
title: RColorBrewer
abstract: 'RColorBrewer: ColorBrewer Palettes'
notes: Imports
repository: https://CRAN.R-project.org/package=RColorBrewer
authors:
- family-names: Neuwirth
given-names: Erich
email: erich.neuwirth@univie.ac.at
year: '2025'
doi: 10.32614/CRAN.package.RColorBrewer
- type: software
title: doSNOW
abstract: 'doSNOW: Foreach Parallel Adaptor for the ''snow'' Package'
notes: Imports
repository: https://CRAN.R-project.org/package=doSNOW
authors:
- family-names: Corporation
given-names: Microsoft
- family-names: Weston
given-names: Stephen
year: '2025'
doi: 10.32614/CRAN.package.doSNOW
- type: software
title: dplyr
abstract: 'dplyr: A Grammar of Data Manipulation'
notes: Imports
url: https://dplyr.tidyverse.org
repository: https://CRAN.R-project.org/package=dplyr
authors:
- family-names: Wickham
given-names: Hadley
email: hadley@posit.co
orcid: https://orcid.org/0000-0003-4757-117X
- family-names: François
given-names: Romain
orcid: https://orcid.org/0000-0002-2444-4226
- family-names: Henry
given-names: Lionel
- family-names: Müller
given-names: Kirill
orcid: https://orcid.org/0000-0002-1416-3412
- family-names: Vaughan
given-names: Davis
email: davis@posit.co
orcid: https://orcid.org/0000-0003-4777-038X
year: '2025'
doi: 10.32614/CRAN.package.dplyr
- type: software
title: ggbeeswarm
abstract: 'ggbeeswarm: Categorical Scatter (Violin Point) Plots'
notes: Imports
url: https://github.com/eclarke/ggbeeswarm
repository: https://CRAN.R-project.org/package=ggbeeswarm
authors:
- family-names: Clarke
given-names: Erik
email: erikclarke@gmail.com
- family-names: Sherrill-Mix
given-names: Scott
email: sherrillmix@gmail.com
- family-names: Dawson
given-names: Charlotte
email: csdaw@outlook.com
year: '2025'
doi: 10.32614/CRAN.package.ggbeeswarm
- type: software
title: patchwork
abstract: 'patchwork: The Composer of Plots'
notes: Imports
url: https://patchwork.data-imaginist.com
repository: https://CRAN.R-project.org/package=patchwork
authors:
- family-names: Pedersen
given-names: Thomas Lin
email: thomasp85@gmail.com
orcid: https://orcid.org/0000-0002-5147-4711
year: '2025'
doi: 10.32614/CRAN.package.patchwork
- type: software
title: reshape2
abstract: 'reshape2: Flexibly Reshape Data: A Reboot of the Reshape Package'
notes: Imports
url: https://github.com/hadley/reshape
repository: https://CRAN.R-project.org/package=reshape2
authors:
- family-names: Wickham
given-names: Hadley
email: h.wickham@gmail.com
year: '2025'
doi: 10.32614/CRAN.package.reshape2
- type: software
title: tibble
abstract: 'tibble: Simple Data Frames'
notes: Imports
url: https://tibble.tidyverse.org/
repository: https://CRAN.R-project.org/package=tibble
authors:
- family-names: Müller
given-names: Kirill
email: kirill@cynkra.com
orcid: https://orcid.org/0000-0002-1416-3412
- family-names: Wickham
given-names: Hadley
email: hadley@rstudio.com
year: '2025'
doi: 10.32614/CRAN.package.tibble
- type: software
title: tidyr
abstract: 'tidyr: Tidy Messy Data'
notes: Imports
url: https://tidyr.tidyverse.org
repository: https://CRAN.R-project.org/package=tidyr
authors:
- family-names: Wickham
given-names: Hadley
email: hadley@posit.co
- family-names: Vaughan
given-names: Davis
email: davis@posit.co
- family-names: Girlich
given-names: Maximilian
year: '2025'
doi: 10.32614/CRAN.package.tidyr
GitHub Events
Total
- Push event: 1
- Public event: 1
- Create event: 2
Last Year
- Push event: 1
- Public event: 1
- Create event: 2
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 9
- Total pull requests: 0
- Average time to close issues: 10 days
- Average time to close pull requests: N/A
- Total issue authors: 1
- Total pull request authors: 0
- Average comments per issue: 0.56
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 9
- Pull requests: 0
- Average time to close issues: 10 days
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 0.56
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- Kaam-umcg (9)
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- Hmisc * imports
- RColorBrewer * imports
- doParallel * imports
- doSNOW * imports
- dplyr * imports
- foreach * imports
- ggbeeswarm * imports
- ggplot2 * imports
- parallel * imports
- patchwork * imports
- reshape2 * imports
- tibble * imports
- tidyr * imports
- tidyverse * imports