Bioconvert

Bioconvert is a collaborative project to facilitate the interconversion of life science data from one format to another.

https://badge.fury.io/py/bioconvert.svg https://img.shields.io/pypi/pyversions/bioconvert.svg https://secure.travis-ci.org/biokit/bioconvert.png https://coveralls.io/repos/github/biokit/bioconvert/badge.svg?branch=master Documentation Status https://badges.gitter.im/biokit/bioconvert.svg https://img.shields.io/github/issues/biokit/bioconvert.svg
contributions:Please join the team to contribute: https://github.com/biokit/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 convertion 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 convertions; 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 79 formats, 129 direct conversions (much more are possible calling bioconvert several times).

In June 2018, we had 66 formats, 120 direct conversions (much more are possible 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 on bioconda or Sequana.

Usage

From the command line, you can convert a fastq to fasta 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
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()