Giter Site home page Giter Site logo

dated-mutation-spectra's Introduction

Requirements

We need to install with Python versions >=3.7,<3.11.

Install requirements as

pip install -r requirements.txt

Getting data

TODO: write a script to get, organize, and format data. Or at least point to where it all can be downloaded from. They are all public and well-known resources.

All data is stored in the data directory, including

  • Reference genomes
  • GEVA Atlas allele ages
  • tsdate-inferred trees
  • Relate-inferred allele ages
  • Thousand Genomes Project VCFs and samples file

Running analyses

Computing and visualizing the spectrum history

To parse data, we run

python process_{dataset}.py [optional] -c {chrom}

which creates a set of dataframes with mutation types in each chromosome. This can take a while...

These can be binned into time-bins using

python bin_variant_ages.py -d {dataset} [optional] -m {max_age} -s -f {max_frequency}

where the -s flag is used if we want to include singletons. If singletons should be excluded, omit the -s flag.

These can then be plotted using plot_spectra_history.py, which takes the same arguments as bin_variant_ages.py.

Fitting a model for age- and sex-dependent mutation rates

From the Iceland trio data (Jonnson et al, 2017), fit a linear model for the mutation spectrum that depends on the ages of each parent, using

python xyz.py

The output is stored as a XXX, which can be used as YYY.

Inferring generation time history

Using the mutation spectra binned by allele age, and the regression of de novo mutation profiles on parental age and sex, fit the sex-specific generation time history, as

python xyz.py -d {dataset}

dated-mutation-spectra's People

Contributors

apragsdale avatar molpopgen avatar wang-rj avatar

Watchers

 avatar  avatar

Forkers

wang-rj

dated-mutation-spectra's Issues

Error bars on bar plots

Fig 3 (mut spectra among shared and unique, and among young variants vs pedigree study) should have error bars. Are they actually that different?

Singletons

\item However, they did not test (or at least did not show a test of)

Ah-hah. The results from GEVA don't include singletons. From their supplement (S3 Text):

We used GEVA to estimate the age of all variants on Chromosomes 1-22 (biallelic SNPs,
except singletons and variants at alternate allele frequency >99%) in data from two human
genome resources...

That's not the case with Relate and tsdate, which do include reported ages for singletons.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.