Software

tskit-dev projects

tskit
image/svg+xml Documentation tskit-dev/tskit

Population-scale genomics

ts = tskit.load("example.trees")
afs = ts.allele_frequency_spectrum()
See more
msprime
image/svg+xml Documentation Publication tskit-dev/msprime

Simulate genealogical trees and genomic sequence data using population genetic models

ts = msprime.sim_ancestry(
    samples=10, 
    recombination_rate=1e-4, 
    sequence_length=1e6
)
ts = msprime.sim_mutations(ts, rate=1e-6)
See more
tsinfer
image/svg+xml Documentation Publication tskit-dev/tsinfer

Infer a tree sequence from genetic variation data.

sample_data = tsinfer.load(
    "phased_sequence_data.samples"
)
ts = tsinfer.infer(sample_data)
See more
tsdate
image/svg+xml Documentation Publication tskit-dev/tsdate

Infer the age of ancestral nodes in a tree sequence.

dated_ts = tsdate.date(inferred_ts, mutation_rate=1e-8)
See more
pyslim
image/svg+xml Documentation tskit-dev/pyslim

Tools for dealing with tree sequences coming to and from SLiM.

rts = pyslim.recapitate(
    ts, 
    ancestral_Ne=10000
)
See more
tsbrowse
image/svg+xml Documentation tskit-dev/tsbrowse

Utilities for evaluating inferred tree sequences

python -m tsbrowse preprocess example.trees
python -m tsbrowse serve example.tsbrowse
See more
tskit-rust
image/svg+xml Documentation tskit-dev/tskit-rust

Rust bindings for the tskit library

let treeseq = tskit::TreeSequence::load(
  &treefile
).unwrap();
let mut tree_iterator = 
  treeseq.tree_iterator(
    tskit::TreeFlags::default()
  ).unwrap();
while let Some(tree) = 
  tree_iterator.next() {
    ...
  }
See more
tstrait
image/svg+xml Documentation Publication tskit-dev/tstrait

Quantitative trait simulation for ARGs

model = tstrait.trait_model(
  distribution="normal", mean=0, var=1
)
sim_result = tstrait.sim_phenotype(
    ts=ts, num_causal=100, model=model,
    h2=0.3, random_seed=1
)
See more
tszip
image/svg+xml Documentation tskit-dev/tszip

Gzip-like compression for tskit tree sequences

$ tszip 1kg_chr20.trees
$ tsunzip 1kg_chr20.trees.tsz  
See more

Ecosystem projects

SLiM SLiM
image/svg+xml Website image/svg+xml Documentation Publication MesserLab/SLiM

SLiM is a genetically explicit forward simulation software package for population genetics and evolutionary biology. It is highly flexible, with a built-in scripting language, and has a cross-platform graphical modeling environment called SLiMgui.

initialize() {
    initializeTreeSeq();
    initializeMutationRate(1e-8);
    initializeMutationType(
        "m1", 0.5, "e", 0.001
    );
    initializeRecombinationRate(1e-8);
}
1 early() { sim.addSubpop("p1", 500); }
2000 late() { 
    sim.treeSeqOutput("out.trees");
}
See more
fwdpy11
image/svg+xml Documentation molpopgen/fwdpy11

Forward-time simulation in Python using fwdpp

pop = fwdpy11.DiploidPopulation(
  100, 1000.0
)
p = {
  "nregions": [],
  "rates": (0.0, 1e-3, None),
  "prune_selected": False,
  "demography": 
    fwdpy11.DiscreteDemography(),
  "simlen": 10 * pop.N + 200,
  ...
}
params = fwdpy11.ModelParams(**p)
fwdpy11.evolvets(rng, pop, params)
See more
stdpopsim
image/svg+xml Documentation Publication popsim-consortium/stdpopsim

A library of standard population genetic models

  species = stdpopsim.get_species(
      "HomSap"
  )
  model = species.get_demographic_model(
      "OutOfAfrica_3G09"
  )
  contig = species.get_contig("chr22")
  samples = {
      "YRI": 5,
      "CHB": 5,
      "CEU": 0
  }
  engine = stdpopsim.get_engine(
      "msprime"
  )
  ts = engine.simulate(
      model, contig, samples
  )
See more
tspop
image/svg+xml Documentation Publication gtsambos/tspop

pop_ancestry = tspop.get_pop_ancestry(ts, census_time=100.01)
print(pop_ancestry)
See more
To add a project here, please open an issue on the website GitHub repository.