Skip to main content

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


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.1.tar.gz (4.4 kB view details)

Uploaded Source

File details

Details for the file nebfa-0.0.1.tar.gz.

File metadata

  • Download URL: nebfa-0.0.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for nebfa-0.0.1.tar.gz
Algorithm Hash digest
SHA256 fb7a4b7b2995317378c30883fec406b8e6f6f3cc38b1cdd6a3b54ef59a95fef1
MD5 428b3a169bad6dfb686ad3c942576df1
BLAKE2b-256 6bc883640d4f9ef665290ea347dc48ca6714b552b510f87eaf9c6a2815975faf

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