Skip to main content

A point mutation analyzing tool for nucleotide sequence

Project description

Latest PyPI version Latest Travis CI build status

A point mutation analyzing tool for nucleotide sequence

Installation

Install through pip:

pip install bio-pm

Or manually (assuming all required modules are installed on your system):

python ./setup.py install

Requirements

  • Python >= 3

  • biopython

Examples

Analyze point mutation status using pm.analyze(seq, stdseq, translate=True)

>>> import pm
>>>
>>> seq_with_gap = 'ATGGGCG-C'
>>> pm.analyze(seq_with_gap, stdseq)
<pm.status.NA object with: gaps=1, nt_pm=1, aa_pm=0, stdseq='ATGGGCGC'>
>>>

Quickly compare between pm.status objects

p.status objects with same stdseqs have their internal order. That is Y > Conserved > PM > NA.

>>> import pm
>>>
>>> stdseq = "ATGGGCGCT"
>>> seq_without_pm = 'ATGGGCGCT'
>>> seq_conserved = "ATGGGCGCC"
>>> seq_with_pm = 'ATGGGCGAT'
>>> status_Y = pm.analyze(seq_without_pm, stdseq)
>>> status_Conserved = pm.analyze(seq_conserved, stdseq)
>>> status_PM = pm.analyze(seq_with_pm, stdseq)
>>>
>>> status_Y > status_Conserved > status_PM
True
>>>

Help generate HGVS-like mutation format

Codes continues from Quickly compare the point mutation status objects

>>> from pm.pattern import mutant_to_str
>>>
>>> status_PM.pattern
<pm.pattern.TranslatedPattern object at 0x2b03c9cfdc18>
>>>
>>> for nt_pm, aa_pm in status_PM.pattern.list():
...     print(mutant_to_str(*nt_pm) + '|' + mutant_to_str(*aa_pm))
...
8C>A|3A>D

Licence

MIT licensed. See the bundled LICENSE file for more details.

Authors

bio-pm was written by Ekeyme Mo.

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

bio-pm-0.1.0.tar.gz (14.6 kB view details)

Uploaded Source

File details

Details for the file bio-pm-0.1.0.tar.gz.

File metadata

  • Download URL: bio-pm-0.1.0.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for bio-pm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4b07299c2488d9fe619061bcb8915ca04384b630fbbfcde6b88878b16515815b
MD5 7ebb78bd9c4706fe47f2e746a84ab157
BLAKE2b-256 1c21c9715eed3d493a6b29d64c021ba2c8137d4594144bcd6c23b197d7476c4a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page