Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/avdata99/life.py
Just playing with bioinformatics
https://github.com/avdata99/life.py
Last synced: 24 days ago
JSON representation
Just playing with bioinformatics
- Host: GitHub
- URL: https://github.com/avdata99/life.py
- Owner: avdata99
- License: gpl-3.0
- Created: 2023-10-03T01:45:08.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-09T22:03:34.000Z (7 months ago)
- Last Synced: 2024-04-10T04:57:31.711Z (7 months ago)
- Language: Python
- Size: 90.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# life.py
Learning Genetics with Python
## Installation
```bash
pip install lifepy
```## Usage
### Nucleotide
```python
from life import Nucleotidenuc_a = Nucleotide('A')
nuc_t = Nucleotide('T')nucs = nuc_a + nuc_t
type(nucs)print(nucs)
AT
```### Gene
```python
from life import Gene
sequence = (
"ggtaagtcctctagtacaaacacccccaatattgtgatataattaaaattatattcatat"
"tctgttgccagaaaaaacacttttaggctatattagagccatcttctttgaagcgttgtc"
"ggtaagtgctctagtacaaacacccccaatattgtgatataattaaaattatattcatat"
"tctgttgccagattttacacttttaggctatattagagccatcttctttgaagcgttgtc"
"tatgcatcgatcgacgactg"
)
g = Gene(sequence)
g.description = 'Some sample description'
# save will discover your desired format
g.save('test.fasta')
"""
>Some sample description
GGTAAGTCCTCTAGTACAAACACCCCCAATATTGTGATATAATTAAAATTATATTCATATTCTGTTGCCAGAAAAAACAC
TTTTAGGCTATATTAGAGCCATCTTCTTTGAAGCGTTGTCGGTAAGTGCTCTAGTACAAACACCCCCAATATTGTGATAT
AATTAAAATTATATTCATATTCTGTTGCCAGATTTTACACTTTTAGGCTATATTAGAGCCATCTTCTTTGAAGCGTTGTC
TATGCATCGATCGACGACTG
"""
g.save('test.110.fasta', max_line_length=110)
"""
>Some sample description
GGTAAGTCCTCTAGTACAAACACCCCCAATATTGTGATATAATTAAAATTATATTCATATTCTGTTGCCAGAAAAAACACTTTTAGGCTATATTAGAGCCATCTTCTTTG
AAGCGTTGTCGGTAAGTGCTCTAGTACAAACACCCCCAATATTGTGATATAATTAAAATTATATTCATATTCTGTTGCCAGATTTTACACTTTTAGGCTATATTAGAGCC
ATCTTCTTTGAAGCGTTGTCTATGCATCGATCGACGACTG
"""
g.save('test.life')
# Binary custom content
```