Another SeqRecord class with methods: degenerate seqs, codon positions based on reading frames, etc.
Project description
tests |
|
---|---|
package |
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, pypy.
Licence
BSD.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for seqrecord_expanded-0.2.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a3b3126c95f88e84a351abc2c5a58631d1603478859a37a1c38f289b4da1d80 |
|
MD5 | a559372c77a51bdd9d4b8104564a7355 |
|
BLAKE2b-256 | 9051d9eb491cfa25f623a1f1973c76f64ba75ebe49fa0fa946c40c08343c2d4b |
Close
Hashes for seqrecord_expanded-0.2.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 290ba8a2550b3f49239c11743912b088c404db30fbb49c1e124d894d504a3a52 |
|
MD5 | ef7108c7022a2880412dde3734adc188 |
|
BLAKE2b-256 | 26768a6642c05491608f9a6cd7d058135dbd3ded203866c394ade7be78a63f6c |