Fasta file parser.
Project description
Usage:
>>> import nebfa >>> rec = nebfa.parse(open("./test/data/basic.fa")).next() >>> rec.id ('gi', '0120123123') >>> rec.desc 'Some stuff' >>> rec.sequence 'ACGT' >>> rec.hash '2108994E17F6CCA9FF2352ADA92B6511DB076034'# Alternatively, parse_file avoids the need for a call to open. >>> for rec in nebfa.parse_file(“./test/data/multi.fa”): … print rec.id (‘gi’, ‘0120123123’) (‘ref’, ‘YP_234234.2’)
Records also have a meta attribute that has two keys for identifiers and descriptions. You will need to consult that member when you have Ctl-A separated deflines. If you have a better syntax suggestion please send a note along.
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
nebfa-0.0.2.tar.gz
(9.4 kB
view details)
File details
Details for the file nebfa-0.0.2.tar.gz
.
File metadata
- Download URL: nebfa-0.0.2.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3738b8174d895ca1f4dbde7e1e765bd6b743a0d2b8ea91c9bbca393333bb101a |
|
MD5 | cd0b6f5ada169b74c1dd073956419d81 |
|
BLAKE2b-256 | 17e3802f5c46c8ef8eb63ebb214760c20906afd629e571f8f6d5fd74d4442924 |