Skip to main content

Methods for selective sweep inference

Project description

Statistical inference using IBD segments

License: CC0-1.0

isweep is a Python package and a series of automated workflows to study natural selection with identity-by-descent (IBD) segments. The Python package simulates IBD segments around a locus and estimates selection coefficients. The automated workflows perform selection scans, selection coefficient estimation, IBD case-control mapping, haplotype phasing, and local ancestry inference. Scripts in the workflows can be run individually in scripts/, with argparse documentation and inputs.

These methods are suitable for analyses for recent genetic/evolution events. For example,

  • By recent, we mean within the last 500 generations.
  • By strong, we mean selection coefficient s >= 0.015 (1.5%).
  • Scan may have moderate power for s >= 0.01 (1%).

Please review the Readthedocs for detailed support, including which relevant publications to cite if you use this software.

Please file an Issue on GitHub for troubleshooting.

Contact sethtem@umich.edu for support specific to your analysis, e.g., analyses of non-human genetic data.

The input data is:

  • Whole genome sequences
    • Probably at least > 500 diploids
    • Phased vcf data 0|1 of recombining chromosomes
    • Tab-separated genetic map (bp ---> cM)
      • Without headers!
      • Columns are chromosome, rsID, cM, bp
  • Access to cluster computing

workflow/phasing-ancestry provides support for phasing and selecting an ancestry cohort.

Primary pipelines:

The main workflows, workflow/scan-selection and workflow/model-selection do:

  1. Scan genome for extreme IBD rates
  2. Detect anomalously large IBD clusters
  3. Rank alleles based on evidence for selection
  4. Compute a cluster agglomeration measure
  5. Estimate frequency, location of unknown sweeping allele
  6. Estimate a selection coefficient (w/ CIs)

In general, you run workflows with

nohup snakemake -s Snakefile-*.smk -c1 --cluster "sbatch [options]" [options] --jobs XX --configfile *.yaml &

You modify the relevant YAML files, which define the method parameters. You should run the pipelines in the mamba activate isweep environment.

Step 1 may be standalone, depending on the analysis. (You may not care to model putative sweeps (Steps 2-6), which also requires demographic Ne estimation.)

Installation

To install the dependencies and our package:

  1. Clone the repository
git clone https://github.com/sdtemple/isweep.git 
  1. Get the Python package
mamba env create -f isweep-environment.yml
  1. Download some Java software.
bash get-software.sh 

You can test the workflows with our small Zenodo repository.

Picture of selection scan

The flow chart below shows the steps ("rules") in the selection scan pipeline.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

isweep-1.0.3.tar.gz (342.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

isweep-1.0.3-py3-none-any.whl (29.4 kB view details)

Uploaded Python 3

File details

Details for the file isweep-1.0.3.tar.gz.

File metadata

  • Download URL: isweep-1.0.3.tar.gz
  • Upload date:
  • Size: 342.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.10

File hashes

Hashes for isweep-1.0.3.tar.gz
Algorithm Hash digest
SHA256 fde5f510f64db3b4c57d89ad0de3f2b50023acff833addd65e6ce8bbb34b444d
MD5 b3c8c3d8acf36321cd4feaaa1b3ff294
BLAKE2b-256 adbd3314cfdc9bdf8c8dba2c1ad25b33a626738f2c80cf98bc48e2c6c8cf2b7a

See more details on using hashes here.

File details

Details for the file isweep-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: isweep-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 29.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.10

File hashes

Hashes for isweep-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2143190fbd1ad5bebdec20de30074cd6d54286dc478d295b76d4433209c8ed97
MD5 00b749c488e5188e3aae0899c9310a10
BLAKE2b-256 658f007ca8c44c8225fe3239da275e76935a19dcda1b5dfcbf6fe69afc0afc3a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page