pbashyal-nmdp / py-gfe

Python package for creating GFE notation from annotated sequences

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

py-gfe

image

image

Documentation Status

Updates

Python Boilerplate contains all the boilerplate you need to create a Python package.

Docker

docker pull nmdpbioinformatics/py-gfe
docker run -it --rm -v $PWD:/opt nmdpbioinformatics/py-gfe seq2gfe \
    -f /opt/your_fastafile.fasta -l HLA-A

Example

>>> from Bio import SeqIO
>>> from BioSQL import BioSeqDatabase
>>> from seqann.sequence_annotation import BioSeqAnn
>>> import pygfe
>>> seq_file = 'test_dq.fasta'
>>> gfe = pygfe.pyGFE()
>>> server = BioSeqDatabase.open_database(driver="pymysql", user="root",
...                                       passwd="", host="localhost",
...                                      db="bioseqdb")
>>> seqann = BioSeqAnn(server=server)
>>> seq_rec = list(SeqIO.parse(seq_file, 'fasta'))[0]
>>> annotation = seqann.annotate(seq_rec, "HLA-DQB1")
>>> gfe = gfe.get_gfe(annotation, "HLA-DQB1")
>>> print(gfe)
HLA-DQB1w0-4-0-141-0-12-0-4-0-0-0-0-0

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

About

Python package for creating GFE notation from annotated sequences

License:GNU General Public License v3.0


Languages

Language:Python 98.2%Language:Makefile 1.6%Language:Dockerfile 0.2%