happer
Daniel Standage, 2018
https://github.com/bioforensics/happer
happer is a minimal Python library for generating complete haplotype sequences. Given a reference sequence and haplotype alleles annotated in BED format, happer will mutate the reference and produce sequences to match the specified haplotypes.
Installation
To install:
pip3 install happer
To make sure the package installed correctly:
pip3 install pytest
py.test --pyargs happer
happer requires Python version 3.
Usage
Reference sequences must be provided in Fasta format, and haplotype alleles must be specified in BED format as follows.
Alleles corresponding to different haplotypes at the locus are separated by a | character, so for example a diploid individual should have 2 |-separated alleles annotated at each locus, while a tetraploid would have 4 alleles.
In the example below, the CCGA alleles are phased and represent one haplotype, while the TATG alleles are phased and represent another haplotype.
#SeqID Start End Alleles
chr1 38827 38828 C|T
chr1 59288 59289 C|A
chr2 24771 24772 G|T
chr4 201191 201192 A|G
To invoke happer from the command line:
[standage@lappy ~]$ happer --out haploseqs.fasta refr.fasta alleles.bed
To invoke happer directly in Python:
>>> import happer
>>> seqfile = open('refr.fasta', 'r')
>>> alleles = open('alleles.bed', 'r')
>>> for label, haploseq in happer.mutate.mutate(seqfile, alleles):
... # do whatever you'd like with the sequences
Metadata
Release files for happer 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| happer-0.1.1.tar.gz | 23.9 kB | Without provenance | Details |
Release files / happer-0.1.1.tar.gz
| Download URL | happer-0.1.1.tar.gz |
|---|---|
| Size | 23.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95490f3e14f992f849813cd44ac08d7deacbe6cf794483b31a5a7507ac1e9561
|
|
BLAKE2b-256 checksum How to use checksums |
c9e77c8b98491c3a63bc4766e6656e9d1b4641daa2ccad7b04a638dd23896d6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7
|
Security for happer 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.