Management about FASTA and VCF files.
Project description
# pymugen
This module allows to manage data about genomic sequences, specificaly getting sequences from a FASTA file.
The module’s other functionality is the ability to get sequences with a mutation from a VCF file and transform it to another representation.
## Installation
Install pymugen with python
`pip3 install pymugen`
## Usage/Examples
Fasta example
from pymugen.fasta import FastaReader
fasta = FastaReader("fasta.fa")
chromosome = fasta['chr1']
sequence = chromosome.sequence(10, 5, 5)
sequence[1]
>>> A
sequence[:]
>>> CATGCATGCAT
str(sequence)
>>> C-A-T-G-C,A,T-G-C-A-T
chromosome[5: 16]
>>> CATGCATGCAT
VCF example
from pymugen.transformers import ExtendedTransformer
from pymugen.fasta import FastaReader
vcf = ExtendedTransformer("vcf.vcf", "fasta.fa")
fasta = FastaReader("fasta.fa")
chromosome = fasta['chr1']
sequence = chromosome.sequence(10, 5, 5)
mutated = vcf.method(sequence, "CGT")
str(mutated)
>>> 'A|w-q-r-e-w,s-d-f,v-c-x-z-v'
mutated[:]
>>> 'wqrewsdfvcxzv'
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
pymugen-1.0.tar.gz
(1.7 kB
view details)
File details
Details for the file pymugen-1.0.tar.gz.
File metadata
- Download URL: pymugen-1.0.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.5.0.1 requests/2.25.1 requests-toolbelt/0.8.0 tqdm/4.56.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcc3da7dcab5b703ab6c150fe36ef991b96494020ac155b1d1afdff72025f94b
|
|
| MD5 |
2f1de928de0109887f2fbab4acc52569
|
|
| BLAKE2b-256 |
cc34a3520eefdf17735912b4c6f83e6a6762c345e31ad0fda56eba74f75d662d
|