GithubHelp home page GithubHelp logo

pierrepeterlongo / haplosim Goto Github PK

View Code? Open in Web Editor NEW

This project forked from madoui/haplosim

0.0 0.0 0.0 41 KB

Simulate haplotypes according to a random markovian chain along a binary evolutionnary tree and generate metagenomic illumina data from a random admixture of simulated haplotypes

Python 100.00%

haplosim's Introduction

haploSim

haploSim contains a couple of python scripts to

  1. simulate haplotypes according to a random markovian chain along a binary evolutionnary tree (simHaplo.py)
  2. generate metagenomic illumina data from a random admixture of simulated haplotypes (simMetaG.py)
  3. compute the pairwise (simHaplo.py) and global (simMetaG.py) nucleotide diversity (ฯ€)

Quick example on Coronavirus

This example simulates 16 haplotypes with default settings and generates illumina reads

python3 simHaplo.py -i wuhan-hu1.fasta -o CoronaHaplo -s 16
python3 simMetaG.py -i CoronaHaplo -o  Corona_1_reads -n 10

How to simulate haplotypes?

To simulate haplotypes, use the simHaplo.py script. Several parameters can be tuned as follow:

simHaplo.py -i inputFasta -o outputDir -k varFreq -r recombFreq -s strainsNumber -n haploNumber

   -i input directory that contains fasta file
   -o output directory
   -k variant frequency (default 0.01)
   -d variant frequency dispersion (default 0.001)
   -r recombination frequency (default 0.0001)
   -s number of initial strains to generate (default 16)
   -n number of haplotypes to generate (default 10)
   -m minimum abundance of a haplotype (default 10x)

How to simulate metagenomic reads from a haplotypes admixture?

Once the haplotypes have been created, use simMetaG to generate illumina reads on a random admixture of haplotypes. You need the wgsim program (part of samtools) in you $PATH. Several parameters can tuned as follow:

 simMetaG.py -i inputHaplo -o outputDir -n haploNumber

   -i input directory that contains haplotypes fasta files
   -o output directory
   -n minimum of haplotypes per species (default 5)
   -l read leangth (default 100)
   -m minimum abundance of an haplotype (default 10x)

haplosim's People

Contributors

madoui avatar pierrepeterlongo avatar

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.