Skip to main content

Another SeqRecord class with methods: degenerate seqs, codon positions based on reading frames, etc.

Project description

tests

Travis-CI Build Status Requirements Status Coverage Status
Code issues

package

PyPI Package latest release PyPI Wheel Supported versions Supported implementations

Another SeqRecord class with methods: degenerate seqs, codon positions based on reading frames, etc.

Usage

By default it assumes a DNA sequence with ambiguous characters.

>>> from seqrecord_expanded import SeqRecordExpanded
>>> seq_record = SeqRecordExpanded('TCTGAATGGAAGACAAAGCGTCCA',
...                                voucher_code='CP100-09',
...                                taxonomy={'genus': 'Melitaea',
...                                          'species': 'phoebe',
...                                         },
...                                gene_code='EF1a',
...                                reading_frame=1,
...                                table=1,  # translation table
...                                )
>>> # Degenerate sequence standard genetic code
>>> seq_record.degenerate()
'TCNGARTGGAARACNAARMGNCCN'
>>>
>>> # Degenerate sequence S method
>>> seq_record.degenerate(method='S')
'AGYGARTGGAARACNAARMGNCCN'
>>>
>>> # Degenerate sequence Z method
>>> seq_record.degenerate(method='Z')
'TCNGARTGGAARACNAARMGNCCN'
>>>
>>> # Degenerate sequence SZ method
>>> seq_record.degenerate(method='SZ')
'NNNGARTGGAARACNAARMGNCCN'
>>>
>>> # get first codon positions
>>> seq_record.first_codon_position()
'TGTAAACC'
>>>
>>> # get second codon positions
>>> seq_record.second_codon_position()
'CAGACAGC'
>>>
>>> # get third codon positions
>>> seq_record.third_codon_position()
'TAGGAGTA'
>>>
>>> # get first and second positions
>>> seq_record.first_and_second_positions()
'TCGATGAAACAACGCC'
>>>
>>> # translate to aminoacid sequence
>>> seq_record.translate()
'SEWKTKRP'
>>> # translate to aminoacid sequence
>>> seq_record.translate(table=1)
'SEWKTKRP'

Installation

pip install seqrecord-expanded

Requirements

pip install -r requirements.txt

Compatibility

Supported Python versions: 2.6, 2.7, 3.3, 3.4, 3.5, 3.11, pypy.

Licence

BSD.

Authors

seqrecord-expanded was written by Carlos Peña.

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

seqrecord_expanded-0.2.13.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

seqrecord_expanded-0.2.13-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file seqrecord_expanded-0.2.13.tar.gz.

File metadata

  • Download URL: seqrecord_expanded-0.2.13.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.0

File hashes

Hashes for seqrecord_expanded-0.2.13.tar.gz
Algorithm Hash digest
SHA256 ac43d15755dbe7417e1d2d181ae2ad91d8499b62442a2e895bb369fe26439c0d
MD5 98dd47df5122efae161ac419e02904d6
BLAKE2b-256 c9929563440fbf92731547e43f6ba48af7695972d8b329a01ce7f13facb7e535

See more details on using hashes here.

File details

Details for the file seqrecord_expanded-0.2.13-py3-none-any.whl.

File metadata

File hashes

Hashes for seqrecord_expanded-0.2.13-py3-none-any.whl
Algorithm Hash digest
SHA256 89d61e38496402a107ee42caa13737c4cfc1f0c08a00b1b0c9c13024a5cad9dc
MD5 0ffdef8bf74bd251a5af0ace58d2c16b
BLAKE2b-256 344371d6264a2995c04e351b3b2623a1f7ce3b3ab50662102a794b67ce68238e

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