Skip to main content

bio: making bioinformatics fun again

bio - command-line utilities to make bioinformatics explorations more enjoyable.

bio is a bioinformatics toy to play with.

Like LEGO pieces that match one another bio aims to provide you with commands that naturally fit together and let you express your intent with short, explicit and simple commands. It is a project in an exploratory phase, we'd welcome input and suggestions on what it should grow up into.

What does this software do?

If you've ever done bioinformatics, you know how even seemingly straightforward tasks require multiple steps, arcane incantations, and various other preparations that slow down progress.

Even well-defined, supposedly simple tasks can take a seemingly inordinate number of complicated steps. The bio package is meant to solve that tedium.

Usage examples

# Fetch genbank data
bio fetch NC_045512 MN996532 > genomes.gb

# Convert the first then bases of the genomes to FASTA.
bio fasta genomes.gb --end 10

# Align the coding sequences for the S protein
bio fasta genomes.gb --gene S --protein | bio align | head

# Print the GFF record that corresponds to the coding sequence for gene S
bio gff genomes.gb --gene S 

# Show the descendants of taxid 117565
bio taxon 117565 | head

# Show the lineage of a taxonomic rank.
bio taxon 117565 --lineage | head

# Get metadata on a viral sample
bio meta 11138 -H | head

# Define a sequence ontology terms
bio explain exon

# Define a gene ontology terms
bio explain food vacuole

Documentation

Detailed documentation is maintained at

Quick install

bio works on Linux and Mac computers and on Windows when using the Linux Subsystem.

As a rule, all Python based command line utilities should be installed via pipx to avoid conflicts with other Python packages:

pipx install bio 

Alternatively, if you can also use pip to install:

pip install bio 

See more details in the documentation.

bio is stream oriented

bio supports stream oriented programming where the output of one task may be chained into the second. Take the example above but now start with a file acc.txt that contains just the accession numbers:

NC_045512
MN996532

we can run bio to generate a VCF file with the variants of the S nucleotides forming the S protein like so:

cat acc.txt | bio fetch | bio fasta --gene S | bio align --vcf | head

to print:

##fileformat=VCFv4.2
##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
##FILTER=<ID=PASS,Description="All filters passed">
##INFO=<ID=TYPE,Number=1,Type=String,Description="Type of the variant">
##contig=<ID=YP_009724390.1,length=3822,assembly=YP_009724390.1>
#CHROM  POS     ID      REF     ALT     QUAL    FILTER  INFO    FORMAT  QHR63300.2
YP_009724390.1  33      33C/T   C       T       .       PASS    TYPE=SNP        GT      1
YP_009724390.1  54      54T/A   T       A       .       PASS    TYPE=SNP        GT      1
YP_009724390.1  60      60C/T   C       T       .       PASS    TYPE=SNP        GT      1
YP_009724390.1  69      69A/G   A       G       .       PASS    TYPE=SNP        GT      1

Who is bio designed for?

The software was written to teach bioinformatics and is the companion software to the Biostar Handbook textbook. The targeted audience comprises:

  • Students learning about bioinformatics.
  • Bioinformatics educators who need a platform to demonstrate bioinformatics concepts.
  • Scientists working with large numbers of similar genomes (bacterial/viral strains).
  • Scientists who need to investigate and understand the precise details of a genomic region closely.

The ideas and motivations fueling bio have been developed while educating the many cohorts of students who used the handbook in the classroom. bio is an opinionated take on how bioinformatics, particularly data representation and access, should be simplified and streamlined.

Development

We use the uv package system to manage the software:

uv venv

# Run the software
uv run bio

# Run the tests.
uv run bio test

Tests are automatically built from a shell script that mimics real-life usage scenarios.

Generating documentation

To generate the docs, you will need the bookdown package:

conda install r-bookdown r-servr

To run the docs in a browse:

make 

then visit http://localhost:8000

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bio-1.8.4.tar.gz (8.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bio-1.8.4-py3-none-any.whl (321.4 kB view details)

Uploaded Python 3

File details

Details for the file bio-1.8.4.tar.gz.

File metadata

  • Download URL: bio-1.8.4.tar.gz
  • Upload date:
  • Size: 8.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for bio-1.8.4.tar.gz
Algorithm Hash digest
SHA256 c4fd59d535b1591d3a35e3fc190004dfe86565699dfd71e9e565b7df41a86fe1
MD5 360640625785518da616fd901b11b63a
BLAKE2b-256 da2cc431937a4aca06398ba0007087ff944fa989fb001297467fe0035e6d5ff4

See more details on using hashes here.

File details

Details for the file bio-1.8.4-py3-none-any.whl.

File metadata

  • Download URL: bio-1.8.4-py3-none-any.whl
  • Upload date:
  • Size: 321.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for bio-1.8.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2a7a75bfca59a91d23e4154c29f9d73d2b2fbf61a908ace19c403e7647ff30c5
MD5 85a38b7593a7d1bb9031aef3b64a4490
BLAKE2b-256 59d85fc0d734888b7fb767fa6382f2e4b4ef951fdb9e2b68cc453ebd7cdfdf11

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.8.4 This release

2 files

1.8.3

2 files

1.8.1

2 files

1.8.0

2 files

1.7.1

2 files

1.6.2

1 file

1.6.1

1 file

1.6.0

1 file

1.5.9

1 file

1.5.8

1 file

1.5.7

1 file

1.5.6

1 file

1.5.5

1 file

1.5.4

1 file

1.5.3

1 file

1.5.2

1 file

1.5.1

1 file

1.5.0

1 file

1.4.0

1 file

1.3.9

1 file

1.3.8

1 file

1.3.7

1 file

1.3.6

1 file

1.3.5

1 file

1.3.4

1 file

1.3.3

1 file

1.3.2

1 file

1.2.0

1 file

1.0.2

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page