Skip to main content

Tiny FASTA package, without dependencies, for processing biological sequence files.

Project description

PyPI package Travis CI build status (Linux) AppVeyor CI build status (Windows) Code Coverage Documentation Status

Python package for working with biological sequences from FASTA files.

Features

  • Easy to use: intuitive API for parsing, searching and writing FASTA files

  • Lightweight: no dependencies outside Python’s standard library

  • Cross-platform: Linux, Mac and Windows are all supported

  • Works with with Python 2.7, 3.2, 3.3, and 3.4

Quick Guide

To install the TinyFasta package:

sudo pip install tinyfasta

To parse a FASTA file:

>>> from tinyfasta import FastaParser
>>> for fasta_record in FastaParser("tests/data/dummy.fasta"):
...     if fasta_record.description.contains('seq1'):
...         print(fasta_record)
...
>seq1|contains 2x78 A's
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

To create a FASTA record:

>>> from tinyfasta import FastaRecord
>>> sequence = "C" * 100
>>> fasta_record = FastaRecord.create("My Sequence", sequence)
>>> print(fasta_record)
>My Sequence
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
CCCCCCCCCCCCCCCCCCCC

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

tinyfasta-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file tinyfasta-0.1.0.tar.gz.

File metadata

  • Download URL: tinyfasta-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for tinyfasta-0.1.0.tar.gz
Algorithm Hash digest
SHA256 91a21d094277a2fcbbe3f8083dcc3dbc8e841343cb8e30016ec76ae49ff2f22e
MD5 0ad05c623f0143096eb1cf55dbd4685b
BLAKE2b-256 732d46be92e98568ee479ec344026ae6581ad8e8617e73a13db1b5b093a84def

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page