Skip to content

luisvalesilva/snpr

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

SNPr

Introduce point mutations (SNPs) in FASTA at specified frequency.

Running SNPr

  1. Clone the repo and go inside

  2. Install all required packages from Pipfile

$ pipenv install
  1. Activate the Pipenv shell
$ pipenv shell
  1. You are now ready to use snpr

Check out the help menu.

$ python snpr.py --help
Usage: snpr.py [OPTIONS] FASTA

  Given a FASTA file, introduce SNPs at the specified frequency.

Options:
  -f, --snp_freq FLOAT       Mutation (SNP) frequency. Default: 0.01 (1%)
  -r, --random_seed INTEGER  Seed for pseudo-random runs. Default: None
  --version                  Show the version and exit.
  --help                     Show this message and exit.

Example command to introduce 1% of SNPs in the supplied test FASTA files. Using the optional random seed argument makes the run pseudo-random, for reproducible output.

$ cat test.fa
>chrA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAA
>chrT
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT
TTTTTTTTTTTTTTTTTTTT
>chrC
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCC

$ python snpr.py -f 0.01 -r 111 test.fa
>chrA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAA
>chrT
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTATTTTTTTTTTTTTTTTTTTATTTTTTTTTTTTTTTTTTTTT
TTTTTTTTTTTTTTTTTTTT
>chrC
CCCCCCCCCCACCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCC

$ python snpr.py -f 0.01 -r 111 test_wrapped.fa
>chrA
AAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAA
>chrT
TTTTTTTTTTTTTTTTTTTTTTTTT
TTTTTTTTTTTTTATTTTTTTTTTT
TTTTTTTTATTTTTTTTTTTTTTTT
TTTTTTTTTTTTTTTTTTTTTTTTT
>chrC
CCCCCCCCCCACCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCCCCCCC

License

This project is licensed under the terms of the MIT license. See LICENSE file for details.

About

Introduce point mutations (SNPs) in FASTA at specified frequency

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages