Skip to main content

Python library that parses GFF, Fasta files into python classes

Project description

===================
bioinfo_tools 0.1.3
===================

# Installation

```bash
pip install bioinfo_tools
```

# Parsers

*HEADS UP!* These parsers are still under development and usage is not consistent from one parser to another.

## Fasta parser

```python
from bioinfo_tools.parsers.fasta import FastaParser

fasta_parser = FastaParser()

# by default, sequence IDs are separated by the firstly found '|' or ':'
for seqid, sequence in fasta_parser.read("/path/to/file.fasta"):
print(seqid, sequence)

# you may specify a specific separator for your sequence ID (e.g white space):
for seqid, sequence in fasta_parser.read("/path/to/file.fasta", id_separator=" "):
print(seqid, sequence)
```

## GFF parser

```python
from bioinfo_tools.parsers.gff import Gff3

gff_parser = Gff3()
with open("/path/to/file.gff") as fh:
for gene in gff_parser.read(fh):
print(gene)
```

## OBO parser

```python
from bioinfo_tools.parsers.obo import OboParser

obo_parser = OboParser()
go_terms = obo_parser.read("http://geneontology.org/ontology/go-basic.obo")

for go_term in go_terms.values():
print(go_term)

# you may also get the GO term parents via the parser
parents = obo_parser.get_parents(go_term)
```

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

bioinfo_tools-0.1.3.tar.gz (10.2 kB view details)

Uploaded Source

File details

Details for the file bioinfo_tools-0.1.3.tar.gz.

File metadata

File hashes

Hashes for bioinfo_tools-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7769e530ddc53f815261c28f0db1ff00b531e1a78c1ad0dd875170f56ed1ab5a
MD5 f1665c5f8cc556cbba83d65eeb8dbca5
BLAKE2b-256 fc26a07722da999f7cd813c4f01a73405bacf31b9ca7f7a2de64ee688602ebea

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