Bioconvert

Bioconvert is a collaborative project to facilitate the interconversion of life science data from one format to another. Bioconvert currently contains 44 formats and 95 conversions.

https://badge.fury.io/py/bioconvert.svg https://img.shields.io/pypi/pyversions/bioconvert.svg https://secure.travis-ci.org/bioconvert/bioconvert.png https://coveralls.io/repos/github/bioconvert/bioconvert/badge.svg?branch=master Documentation Status https://img.shields.io/github/issues/bioconvert/bioconvert.svg https://www.singularity-hub.org/static/img/hosted-singularity--hub-%23e32929.svg https://anaconda.org/bioconda/bioconvert/badges/platforms.svg https://anaconda.org/bioconda/bioconvert/badges/installer/conda.svg
contributions

Please join the team to contribute: https://github.com/bioconvert/bioconvert/issues/1

_images/conversion.png

Overview

Life science uses many different formats. They may be old, or with complex syntax and converting those formats may be a challenge. Bioconvert aims at providing a common tool / interface to convert life science data formats from one to another.

Many conversion tools already exist but they may be dispersed, focused on few specific formats, difficult to install, or not optimised. With Bioconvert, we plan to cover a wide spectrum of format conversions; we will re-use existing tools when possible and provide facilities to compare different conversion tools or methods via benchmarking. New implementations are provided when considered better than existing ones.

In Aug 2018, we had 43 formats, 79 direct conversions (129 different methods). More conversions are possible when calling bioconvert several times.

In June 2018, we had 66 direct conversions (120 different methods). More conversions are possible when calling bioconvert several times.

Installation

In order to install bioconvert, you can use pip:

pip install bioconvert

This command installs bioconvert and its Python dependencies. Note, however, that bioconvert may need extra non-Python dependencies as indicated in this requirements file.

Since Jan 2018 we also provide some versions on bioconda. If you already have bioconda setup on your system, just type:

conda install bioconvert

Or if you have never done so, please add those channels before hand (provided you have installed conda):

conda config --add channels r
conda config --add channels defaults
conda config --add channels conda-forge
conda config --add channels bioconda

Otherwise, please see the instructions in the Installation section where you can find information about our Singularity container as well.

Usage

From the command line, you can convert a FastQ file into a FastA file as follows (compressed or not):

bioconvert fastq2fasta input.fastq output.fasta
bioconvert fastq2fasta input.fq    output.fasta
bioconvert fastq2fasta input.fq.gz output.fasta.gz
bioconvert fastq2fasta input.fq.gz output.fasta.bz2

When there is no ambiguity, you can be implicit:

bioconvert input.fastq output.fasta

For help, just type:

bioconvert --help

From Python shell:

# import a converter
from bioconvert.fastq2fasta import Fastq2Fasta

# Instanciate with infile/outfile names
convert = Fastq2Fasta(infile, outfile)

# the conversion itself
convert()

Complete documentation including User and Developer Guides