Package: SEEPS 0.2.0

Michael Kupperman

SEEPS: Sequence evolution and epidemiological process simulator

A modular, modern simulation suite and toolkit for simulating transmission networks, phylogenies, and evolutionary pairwise distance matrices under different models and assumptions for viral/sequence evolution. While intially developed for HIV, SEEPS offers modular utilities for custom workflows for extension beyond HIV.

Authors:Michael Kupperman [aut, cre], Ruian Ke [aut], Erik Lundgren [aut]

SEEPS_0.2.0.tar.gz
SEEPS_0.2.0.zip(r-4.7-any)SEEPS_0.2.0.zip(r-4.6-any)SEEPS_0.2.0.zip(r-4.5-any)
SEEPS_0.2.0.tgz(r-4.6-any)SEEPS_0.2.0.tgz(r-4.5-any)
SEEPS_0.2.0.tar.gz(r-4.7-any)SEEPS_0.2.0.tar.gz(r-4.6-any)
SEEPS_0.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION
card.svg |card.png
SEEPS/json (API)

# Install 'SEEPS' in R:
install.packages('SEEPS', repos = c('https://molevolepid.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/molevolepid/seeps/issues

On CRAN:

Conda:

biological-sequencesepidemiologyevolutionhivsimulation-framework

4.08 score 4 stars 6 scripts 60 exports 15 dependencies

Last updated from:d987ce0223. Checks:7 WARNING, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develWARNING123
source / vignettesOK195
linux-releaseWARNING122
macos-releaseWARNING145
macos-oldrelWARNING202
windows-develWARNING78
windows-releaseWARNING95
windows-oldrelWARNING67
wasm-releaseOK90

Exports:add_root_to_newickassign_parental_factoryassign_random_factoryassign_random_with_inheritance_factorybiphasic_HIV_ratebuild_distance_matrix_from_dfclean_sample_structureclean_upconstant_dispersion_samplercontact_traced_uniform_idscontact_traced_uniform_restarts_idscontact_tracing_corecontact_tracing_enginedispersion_calculatorexponential_dispersion_samplerfasta_string_to_dataframegen_const_phasegen_exp_phasegen_transmission_history_balanced_treegen_transmission_history_exponential_constantgen_transmission_history_exponential_constant_classicgeneology_to_distance_matrixgeneology_to_distance_matrix_classicgeneology_to_phylogeny_bpbgenerate_rate_modelgenerate_sequencesget_biphasic_HIV_rateget_biphasic_HIV_rate_functionget_Kphasic_hiv_rate_functionget_p17_rate_modelget_V3_rate_modelinitializekeep_sampleslookup_sequence_by_namemulti_samplernegative_binomial_dispersion_samplernever_terminate_early_factoryphylogeny_to_newickpoisson_dispersion_samplerrandom_fixed_size_idsrandom_prop_idsrate_calculatorreduce_large_matrixreduce_transmission_historyreduce_transmission_history_bpbreduce_transmission_history_bpb2reduce_transmission_history_mtremove_samplesshow_available_regionsshow_available_sequencessimulate_all_paradigms_HIV_V3simulate_classic_HIVsimulate_modern_HIVsimulate_sequences_HIV_V3stepstochastify_transmission_historysufficient_data_data_factoryuniform_discovery_factoryvalidate_statewrap_parameters

Dependencies:apeclidigestgluelatticelifecyclemagrittrnlmephyclustRcpprlangrngtoolsstringistringrvctrs

Agent-based forward simulation API
Initialization | What's in a state | Running the simulation | Tricks for complex setups | Cleaning up the simulation

Last update: 2025-01-22
Started: 2025-01-22

Exporting Data
Sample data | Trees | Sequences (fasta) | Pairwise distance matrices | Tree-based distance matrix | Sequence-based distance matrix

Last update: 2025-01-22
Started: 2025-01-22

For Programmers
Simulator outputs. | Internal representations of trees

Last update: 2025-01-22
Started: 2025-01-22

Longitudinal sampling with SEEPS
Simulation | The simulation API | Removing individuals from the active population | A simple example | Reporting the entire history of the simulation

Last update: 2025-01-22
Started: 2025-01-22

Sampling Strategies
Independent random sampling | Proportional sampling | Exhaust a single cluster | High contact tracing | Low contact tracing | Multiple clusters

Last update: 2025-01-22
Started: 2025-01-22

SEEPS
Simulate a transmission network with gen_transmission_history_exponential_constant | Exponential growth / offspring generation rate | Maximum target population size | Minimum population | Length of the constant growth phase | Sample a collection of tips | Extract the subtree | Exporting | Newick string or ape tree | Pairwise distance matrix

Last update: 2025-01-22
Started: 2025-01-22

Readme and manuals

Help Manual

Help pageTopics
Add a root node to a newick tree string with distance 0 from the rootadd_root_to_newick
Simple biphasic rate function used in [Kupperman et al.]biphasic_HIV_rate
Build a distance matrix from a dataframe of sequences using apebuild_distance_matrix_from_df
Check that a rate model is mathematically validcheck_rate_model
Clean up the simulation state and return the relevant data.clean_up
Obtain a sample using a iterative contact tracing with a uniform discovery ratecontact_traced_uniform_ids
Obtain a sample using a iterative contact tracing with a uniform discovery rate If a minimum number is not found, the algorithm is restarted with a new initial detectioncontact_traced_uniform_restarts_ids
Core contact tracing algorithmcontact_tracing_core
Perform contact tracing on a simulated contact networkcontact_tracing_engine
Convert a fasta string output by seq-gen to a dataframefasta_string_to_dataframe
Simulate a fixed number of stepsgen_const_phase
Simulate an exponential growth.gen_exp_phase
Generate a transmission history for a given number of individuals under a optimally balanced treegen_transmission_history_balanced_tree
Generate transmission history for full populationgen_transmission_history_exponential_constant
Reduce a geneology to a pairwise distance matrix.geneology_to_distance_matrix
Reduce a geneology to a pairwise distance matrix.geneology_to_distance_matrix_classic
Generate a phylogeny from a transmission history using BioPhyBreak's coalescent simulatorgeneology_to_phylogeny_bpb
Generate a rate model from provided paramtersgenerate_rate_model
Generate sequences from a phylogeny using Seq-Gen through phyclustgenerate_sequences
Biphasic rate function factoryget_biphasic_HIV_rate
Factory function to generate biphasic rate functionsget_biphasic_HIV_rate_function
Kphasic HIV rate function factory Provide a list of relative importance (multiples over a "base" rate) forget_Kphasic_hiv_rate_function
Rate model for gag p17 estimated from the Swedish transmission chainget_p17_rate_model
Rate model for pol estimated from the Swedish transmission chainget_pol_rate_model
Rate model for env V3 estimated from the Swedish transmission chainget_V3_rate_model
Utility function for initializing the simulationinitialize
Keep a set of samples in the simulationkeep_samples
Obtain a sequence from the builtin reference sequences using coordinateslookup_sequence_by_index
Obtain a sequence from the builtin reference sequences using an name and annotated regionlookup_sequence_by_name
Factory function to never terminate contact tracing until all known nodes have been tracednever_terminate_early_factory
Convert a phylogeny array to a newick treephylogeny_to_newick
Sample a fixed number of of individuals randomly from the population.random_fixed_size_ids
Sample a proportion of the active individualsrandom_prop_ids
Reduce a large matrix by randomly sampling a cluster of closely related individualsreduce_large_matrix
Reduce simulation output to transmission history for a subset.reduce_transmission_history
Reduce simulation output to transmission history for a subset to include within host diversity.reduce_transmission_history_bpb
Reduce simulation output to transmission history for a subset.reduce_transmission_history_mt
Remove samples from the simulationremove_samples
Show the list of available regions for a provided reference sequenceshow_available_regions
Show the list of available reference sequencesshow_available_sequences
Sample distance matrices for all three major simulation paradigms: the transmission history, the phylogeny, and derived from simulated sequences (TN93)simulate_all_paradigms_HIV_V3
Classic HIV simulator for population level simulations.simulate_classic_HIV
Modern HIV simulatorsimulate_modern_HIV
Modern HIV epidemic sequences simulatorsimulate_sequences_HIV_V3
Perform a single step of the simulationstep
Sample evolutionary distances to an integer number of mutations per branchstochastify_transmission_history
Factory function for a detection to check termination condition based on A sufficient amount of individuals Terminate when we have found a `minimum_size` number of active individualssufficient_data_data_factory
A factory function to discover connections with uniform probabilityuniform_discovery_factory
Utility function to check that a state is (computationally) validvalidate_state