SkillAgentSearch skills...

Bioconvert

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

Install / Use

/learn @bioconvert/Bioconvert

README

Bioconvert ##########

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

.. image:: https://badge.fury.io/py/bioconvert.svg :target: https://pypi.python.org/pypi/bioconvert

.. image:: https://github.com/bioconvert/bioconvert/actions/workflows/main.yml/badge.svg?branch=main :target: https://github.com/bioconvert/bioconvert/actions/workflows/main.yml

.. image:: https://coveralls.io/repos/github/bioconvert/bioconvert/badge.svg?branch=main :target: https://coveralls.io/github/bioconvert/bioconvert?branch=main

.. image:: http://readthedocs.org/projects/bioconvert/badge/?version=main :target: http://bioconvert.readthedocs.org/en/main/?badge=main :alt: Documentation Status

.. image:: https://img.shields.io/github/issues/bioconvert/bioconvert.svg :target: https://github.com/bioconvert/bioconvert/issues

.. image:: https://anaconda.org/bioconda/bioconvert/badges/platforms.svg :target: https://anaconda.org/bioconda/bioconvert/badges/platforms.svg

.. image:: https://anaconda.org/bioconda/bioconvert/badges/version.svg :target: https://anaconda.org/bioconda/bioconvert

.. image:: https://anaconda.org/bioconda/bioconvert/badges/downloads.svg :target: https://github.com/bioconvert/bioconvert/releases

.. image:: https://zenodo.org/badge/106598809.svg :target: https://zenodo.org/badge/latestdoi/106598809

.. image:: https://static.pepy.tech/personalized-badge/bioconvert?period=month&units=international_system&left_color=black&right_color=blue&left_text=Downloads/months :target: https://pepy.tech/project/bioconvert

.. image:: https://raw.githubusercontent.com/bioconvert/bioconvert/main/doc/_static/logo_300x200.png :target: https://raw.githubusercontent.com/bioconvert/bioconvert/main/doc/_static/logo_300x200.png

:contributions: Want to add a converter ? Please join https://github.com/bioconvert/bioconvert/issues/1 :How to cite: Caro et al, BioConvert: a comprehensive format converter for life sciences (2023) NAR Genomics and Bioinformatics (5),3. https://doi.org/10.1093/nargab/lqad074 :On line website: https://bioconvert.pasteur.cloud/

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 Jan 2023, we had 50 formats, 100 direct conversions available.

.. image:: https://raw.githubusercontent.com/bioconvert/bioconvert/main/doc/conversion.png :width: 80%

Installation ###############

BioConvert is developed in Python. Please use conda or any Python environment manager to install BioConvert using the pip command::

pip install bioconvert

50% of the conversions should work out of the box. However, many conversions require external tools. This is why we recommend to use a conda environment. In particular, most external tools are available on the bioconda channel. For instance if you want to convert a SAM file to a BAM file you would need to install samtools as follow::

conda install -c bioconda samtools

Since bioconvert is available on bioconda <https://bioconda.github.io>_ on solution that installs BioConvert and all its dependencies is to use conda/mamba::

conda create --name bioconvert mamba
conda activate bioconvert
mamba install bioconvert
bioconvert --help

See the Installation section for more details and alternative solutions (docker, singularity).

Quick Start ############## There are many conversions available. Type::

bioconvert --help 

to get a list of valid method of conversions. Taking the example of a conversion from a FastQ file into a FastA file, you could do the conversion as follows::

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

The default method of conversion is used but you may use another one. Checkout the available methods with::

bioconvert fastq2fasta --show-methods

For more help about a conversion, just type::

bioconvert fastq2fasta --help

and more generally::

bioconvert --help

You may also call BioConvert from a Python shell::

# import a converter
from bioconvert.fastq2fasta import FASTQ2FASTA

# Instantiate with infile/outfile names
convert = FASTQ2FASTA(infile, outfile)

# the conversion itself:
convert()

Available Converters #######################

.. list-table:: Conversion table :widths: 20 40 40 :header-rows: 1

* - Converters
  - CI testing
  - Default method
* - `abi2fasta <https://bioconvert.readthedocs.io/en/main/ref_converters.html#module-bioconvert.abi2fasta>`_
  - .. image:: https://github.com/bioconvert/bioconvert/actions/workflows/abi2fasta.yml/badge.svg
        :target: https://github.com/bioconvert/bioconvert/actions/workflows/abi2fasta.yml
  - `BIOPYTHON <https://bioconvert.readthedocs.io/en/main/bibliography.html>`_
* - `abi2fastq <https://bioconvert.readthedocs.io/en/main/ref_converters.html#module-bioconvert.abi2fastq>`_
  - .. image:: https://github.com/bioconvert/bioconvert/actions/workflows/abi2fastq.yml/badge.svg
        :target: https://github.com/bioconvert/bioconvert/actions/workflows/abi2fastq.yml
  - `BIOPYTHON <https://bioconvert.readthedocs.io/en/main/bibliography.html>`_
* - `abi2qual <https://bioconvert.readthedocs.io/en/main/ref_converters.html#module-bioconvert.abi2qual>`_
  - .. image:: https://github.com/bioconvert/bioconvert/actions/workflows/abi2qual.yml/badge.svg
        :target: https://github.com/bioconvert/bioconvert/actions/workflows/abi2qual.yml
  - `BIOPYTHON <https://bioconvert.readthedocs.io/en/main/bibliography.html>`_
* - `bam2bedgraph <https://bioconvert.readthedocs.io/en/main/ref_converters.html#module-bioconvert.bam2bedgraph>`_
  - .. image:: https://github.com/bioconvert/bioconvert/actions/workflows/bam2bedgraph.yml/badge.svg
        :target: https://github.com/bioconvert/bioconvert/actions/workflows/bam2bedgraph.yml
  - `BEDTOOLS <https://bioconvert.readthedocs.io/en/main/bibliography.html>`_
* - `bam2bigwig <https://bioconvert.readthedocs.io/en/main/ref_converters.html#module-bioconvert.bam2bigwig>`_
  - .. image:: https://github.com/bioconvert/bioconvert/actions/workflows/bam2bigwig.yml/badge.svg
        :target: https://github.com/bioconvert/bioconvert/actions/workflows/bam2bigwig.yml
  - `DEEPTOOLS <https://bioconvert.readthedocs.io/en/main/bibliography.html>`_
* - `bam2cov <https://bioconvert.readthedocs.io/en/main/ref_converters.html#module-bioconvert.bam2cov>`_
  - .. image:: https://github.com/bioconvert/bioconvert/actions/workflows/bam2cov.yml/badge.svg
        :target: https://github.com/bioconvert/bioconvert/actions/workflows/bam2cov.yml
  - `BEDTOOLS <https://bioconvert.readthedocs.io/en/main/bibliography.html>`_
* - `bam2cram <https://bioconvert.readthedocs.io/en/main/ref_converters.html#module-bioconvert.bam2cram>`_
  - .. image:: https://github.com/bioconvert/bioconvert/actions/workflows/bam2cram.yml/badge.svg
        :target: https://github.com/bioconvert/bioconvert/actions/workflows/bam2cram.yml
  - `SAMTOOLS <https://bioconvert.readthedocs.io/en/main/bibliography.html>`_
* - `bam2fasta <https://bioconvert.readthedocs.io/en/main/ref_converters.html#module-bioconvert.bam2fasta>`_
  - .. image:: https://github.com/bioconvert/bioconvert/actions/workflows/bam2fasta.yml/badge.svg
        :target: https://github.com/bioconvert/bioconvert/actions/workflows/bam2fasta.yml
  - `SAMTOOLS <https://bioconvert.readthedocs.io/en/main/bibliography.html>`_
* - `bam2fastq <https://bioconvert.readthedocs.io/en/main/ref_converters.html#module-bioconvert.bam2fastq>`_
  - .. image:: https://github.com/bioconvert/bioconvert/actions/workflows/bam2fastq.yml/badge.svg
        :target: https://github.com/bioconvert/bioconvert/actions/workflows/bam2fastq.yml
  - `SAMTOOLS <https://bioconvert.readthedocs.io/en/main/bibliography.html>`_
* - `bam2json <https://bioconvert.readthedocs.io/en/main/ref_converters.html#module-bioconvert.bam2json>`_
  - .. image:: https://github.com/bioconvert/bioconvert/actions/workflows/bam2json.yml/badge.svg
        :target: https://github.com/bioconvert/bioconvert/actions/workflows/bam2json.yml
  - `BAMTOOLS <https://bioconvert.readthedocs.io/en/main/bibliography.html>`_
* - `bam2sam <https://bioconvert.readthedocs.io/en/main/ref_converters.html#module-bioconvert.bam2sam>`_
  - .. image:: https://github.com/bioconvert/bioconvert/actions/workflows/bam2sam.yml/badge.svg
        :target: https://github.com/bioconvert/bioconvert/actions/workflows/bam2sam.yml
  - `SAMBAMBA <https://bioconvert.readthedocs.io/en/main/bibliography.html>`_
* - `bam2tsv <https://bioconvert.readthedocs.io/en/main/ref_converters.html#module-bioconvert.bam2tsv>`_
  - .. image:: https://github.com/bioconvert/bioconvert/actions/workflows/bam2tsv.yml/badge.svg
        :target: https://github.com/bioconvert/bioconvert/actions/workflows/bam2tsv.yml
  - `SAMTOOLS <https://bioconvert.readthedocs.io/en/main/bibliography.htm
View on GitHub
GitHub Stars390
CategoryDevelopment
Updated3d ago
Forks45

Languages

Python

Security Score

100/100

Audited on Mar 24, 2026

No findings