Skip to main content

convert between bioinformatics formats

Project description

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://github.com/bioconvert/bioconvert/actions/workflows/main.yml/badge.svg?branch=master https://github.com/bioconvert/bioconvert/actions/workflows/main.yml/badge.svg?branch=refactoring https://coveralls.io/repos/github/bioconvert/bioconvert/badge.svg?branch=master Documentation Status https://img.shields.io/github/issues/bioconvert/bioconvert.svg https://anaconda.org/bioconda/bioconvert/badges/platforms.svg https://anaconda.org/bioconda/bioconvert/badges/installer/conda.svg
contributions:

Want to add a convertor ? Please join https://github.com/bioconvert/bioconvert/issues/1

issues:

Please use https://github.com/bioconvert/bioconvert/issues

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 March 2022, we had 48 formats, 98 direct conversions (125 different methods).

https://raw.githubusercontent.com/bioconvert/bioconvert/master/doc/conversion.png

Installation

In order to install bioconvert, you can use pip:

pip install bioconvert

We also provide releases on bioconda (http://bioconda.github.io/):

conda install bioconvert

and Singularity container are available. See http://bioconvert.readthedocs.io/en/master/user_guide.html#installation for details.

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
bioconvert fastq2fasta --help

From a Python shell:

# import a converter
from bioconvert.fastq2fasta import FASTQ2FASTA

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

# the conversion itself
convert()

Available Converters

Conversion table

Converters

CI testing

Benchmarking

abi2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/abi2fasta.yml/badge.svg?branch=master

abi2fastq

https://github.com/bioconvert/bioconvert/actions/workflows/abi2fastq.yml/badge.svg?branch=master

abi2qual

https://github.com/bioconvert/bioconvert/actions/workflows/abi2qual.yml/badge.svg?branch=master

bam2bedgraph

https://github.com/bioconvert/bioconvert/actions/workflows/bam2bedgraph.yml/badge.svg?branch=master

bam2bigwig

https://github.com/bioconvert/bioconvert/actions/workflows/bam2bigwig.yml/badge.svg?branch=master

bam2cov

https://github.com/bioconvert/bioconvert/actions/workflows/bam2cov.yml/badge.svg?branch=master

bam2cram

https://github.com/bioconvert/bioconvert/actions/workflows/bam2cram.yml/badge.svg?branch=master

bam2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/bam2fasta.yml/badge.svg?branch=master

bam2fastq

https://github.com/bioconvert/bioconvert/actions/workflows/bam2fastq.yml/badge.svg?branch=master

bam2json

https://github.com/bioconvert/bioconvert/actions/workflows/bam2json.yml/badge.svg?branch=master

bam2sam

https://github.com/bioconvert/bioconvert/actions/workflows/bam2sam.yml/badge.svg?branch=master

bam2tsv

https://github.com/bioconvert/bioconvert/actions/workflows/bam2tsv.yml/badge.svg?branch=master

bam2wiggle

https://github.com/bioconvert/bioconvert/actions/workflows/bam2wiggle.yml/badge.svg?branch=master

bcf2vcf

https://github.com/bioconvert/bioconvert/actions/workflows/bcf2vcf.yml/badge.svg?branch=master

bcf2wiggle

https://github.com/bioconvert/bioconvert/actions/workflows/bcf2wiggle.yml/badge.svg?branch=master

bed2wiggle

https://github.com/bioconvert/bioconvert/actions/workflows/bed2wiggle.yml/badge.svg?branch=master

bedgraph2bigwig

https://github.com/bioconvert/bioconvert/actions/workflows/bedgraph2bigwig.yml/badge.svg?branch=master

bedgraph2cov

https://github.com/bioconvert/bioconvert/actions/workflows/bedgraph2cov.yml/badge.svg?branch=master

bedgraph2wiggle

https://github.com/bioconvert/bioconvert/actions/workflows/bedgraph2wiggle.yml/badge.svg?branch=master

bigbed2bed

https://github.com/bioconvert/bioconvert/actions/workflows/bigbed2bed.yml/badge.svg?branch=master

bigbed2wiggle

https://github.com/bioconvert/bioconvert/actions/workflows/bigbed2wiggle.yml/badge.svg?branch=master

bigwig2bedgraph

https://github.com/bioconvert/bioconvert/actions/workflows/bigwig2bedgraph.yml/badge.svg?branch=master

bigwig2wiggle

https://github.com/bioconvert/bioconvert/actions/workflows/bigwig2wiggle.yml/badge.svg?branch=master

bplink2plink

https://github.com/bioconvert/bioconvert/actions/workflows/bplink2plink.yml/badge.svg?branch=master

bplink2vcf

https://github.com/bioconvert/bioconvert/actions/workflows/bplink2vcf.yml/badge.svg?branch=master

bz22gz

https://github.com/bioconvert/bioconvert/actions/workflows/bz22gz.yml/badge.svg?branch=master

clustal2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/clustal2fasta.yml/badge.svg?branch=master

clustal2nexus

https://github.com/bioconvert/bioconvert/actions/workflows/clustal2nexus.yml/badge.svg?branch=master

clustal2phylip

https://github.com/bioconvert/bioconvert/actions/workflows/clustal2phylip.yml/badge.svg?branch=master

clustal2stockholm

https://github.com/bioconvert/bioconvert/actions/workflows/clustal2stockholm.yml/badge.svg?branch=master

cram2bam

https://github.com/bioconvert/bioconvert/actions/workflows/cram2bam.yml/badge.svg?branch=master

cram2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/cram2fasta.yml/badge.svg?branch=master

cram2fastq

https://github.com/bioconvert/bioconvert/actions/workflows/cram2fastq.yml/badge.svg?branch=master

cram2sam

https://github.com/bioconvert/bioconvert/actions/workflows/cram2sam.yml/badge.svg?branch=master

csv2tsv

https://github.com/bioconvert/bioconvert/actions/workflows/csv2tsv.yml/badge.svg?branch=master

csv2xls

https://github.com/bioconvert/bioconvert/actions/workflows/csv2xls.yml/badge.svg?branch=master

dsrc2gz

https://github.com/bioconvert/bioconvert/actions/workflows/dsrc2gz.yml/badge.svg?branch=master

embl2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/embl2fasta.yml/badge.svg?branch=master

embl2genbank

https://github.com/bioconvert/bioconvert/actions/workflows/embl2genbank.yml/badge.svg?branch=master

fasta2clustal

https://github.com/bioconvert/bioconvert/actions/workflows/fasta2clustal.yml/badge.svg?branch=master

fasta2faa

https://github.com/bioconvert/bioconvert/actions/workflows/fasta2faa.yml/badge.svg?branch=master

fasta2fasta_agp

https://github.com/bioconvert/bioconvert/actions/workflows/fasta2fasta_agp.yml/badge.svg?branch=master

fasta2fastq

https://github.com/bioconvert/bioconvert/actions/workflows/fasta2fastq.yml/badge.svg?branch=master

fasta2genbank

https://github.com/bioconvert/bioconvert/actions/workflows/fasta2genbank.yml/badge.svg?branch=master

fasta2nexus

https://github.com/bioconvert/bioconvert/actions/workflows/fasta2nexus.yml/badge.svg?branch=master

fasta2phylip

https://github.com/bioconvert/bioconvert/actions/workflows/fasta2phylip.yml/badge.svg?branch=master

fasta2twobit

https://github.com/bioconvert/bioconvert/actions/workflows/fasta2twobit.yml/badge.svg?branch=master

fasta_qual2fastq

https://github.com/bioconvert/bioconvert/actions/workflows/fasta_qual2fastq.yml/badge.svg?branch=master

fastq2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/fastq2fasta.yml/badge.svg?branch=master

available

fastq2fasta_qual

https://github.com/bioconvert/bioconvert/actions/workflows/fastq2fasta_qual.yml/badge.svg?branch=master

fastq2qual

https://github.com/bioconvert/bioconvert/actions/workflows/fastq2qual.yml/badge.svg?branch=master

genbank2embl

https://github.com/bioconvert/bioconvert/actions/workflows/genbank2embl.yml/badge.svg?branch=master

genbank2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/genbank2fasta.yml/badge.svg?branch=master

genbank2gff3

https://github.com/bioconvert/bioconvert/actions/workflows/genbank2gff3.yml/badge.svg?branch=master

gfa2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/gfa2fasta.yml/badge.svg?branch=master

gff22gff3

https://github.com/bioconvert/bioconvert/actions/workflows/gff22gff3.yml/badge.svg?branch=master

gff32gff2

https://github.com/bioconvert/bioconvert/actions/workflows/gff32gff2.yml/badge.svg?branch=master

gz2bz2

https://github.com/bioconvert/bioconvert/actions/workflows/gz2bz2.yml/badge.svg?branch=master

gz2dsrc

https://github.com/bioconvert/bioconvert/actions/workflows/gz2dsrc.yml/badge.svg?branch=master

json2yaml

https://github.com/bioconvert/bioconvert/actions/workflows/json2yaml.yml/badge.svg?branch=master

maf2sam

https://github.com/bioconvert/bioconvert/actions/workflows/maf2sam.yml/badge.svg?branch=master

newick2nexus

https://github.com/bioconvert/bioconvert/actions/workflows/newick2nexus.yml/badge.svg?branch=master

newick2phyloxml

https://github.com/bioconvert/bioconvert/actions/workflows/newick2phyloxml.yml/badge.svg?branch=master

nexus2clustal

https://github.com/bioconvert/bioconvert/actions/workflows/nexus2clustal.yml/badge.svg?branch=master

nexus2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/nexus2fasta.yml/badge.svg?branch=master

nexus2newick

https://github.com/bioconvert/bioconvert/actions/workflows/nexus2newick.yml/badge.svg?branch=master

nexus2phylip

https://github.com/bioconvert/bioconvert/actions/workflows/nexus2phylip.yml/badge.svg?branch=master

nexus2phyloxml

https://github.com/bioconvert/bioconvert/actions/workflows/nexus2phyloxml.yml/badge.svg?branch=master

ods2csv

https://github.com/bioconvert/bioconvert/actions/workflows/ods2csv.yml/badge.svg?branch=master

phylip2clustal

https://github.com/bioconvert/bioconvert/actions/workflows/phylip2clustal.yml/badge.svg?branch=master

phylip2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/phylip2fasta.yml/badge.svg?branch=master

phylip2nexus

https://github.com/bioconvert/bioconvert/actions/workflows/phylip2nexus.yml/badge.svg?branch=master

phylip2stockholm

https://github.com/bioconvert/bioconvert/actions/workflows/phylip2stockholm.yml/badge.svg?branch=master

phylip2xmfa

https://github.com/bioconvert/bioconvert/actions/workflows/phylip2xmfa.yml/badge.svg?branch=master

phyloxml2newick

https://github.com/bioconvert/bioconvert/actions/workflows/phyloxml2newick.yml/badge.svg?branch=master

phyloxml2nexus

https://github.com/bioconvert/bioconvert/actions/workflows/phyloxml2nexus.yml/badge.svg?branch=master

plink2bplink

https://github.com/bioconvert/bioconvert/actions/workflows/plink2bplink.yml/badge.svg?branch=master

plink2vcf

https://github.com/bioconvert/bioconvert/actions/workflows/plink2vcf.yml/badge.svg?branch=master

sam2bam

https://github.com/bioconvert/bioconvert/actions/workflows/sam2bam.yml/badge.svg?branch=master

sam2cram

https://github.com/bioconvert/bioconvert/actions/workflows/sam2cram.yml/badge.svg?branch=master

sam2paf

https://github.com/bioconvert/bioconvert/actions/workflows/sam2paf.yml/badge.svg?branch=master

scf2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/scf2fasta.yml/badge.svg?branch=master

scf2fastq

https://github.com/bioconvert/bioconvert/actions/workflows/scf2fastq.yml/badge.svg?branch=master

sra2fastq

https://github.com/bioconvert/bioconvert/actions/workflows/sra2fastq.yml/badge.svg?branch=master

stockholm2clustal

https://github.com/bioconvert/bioconvert/actions/workflows/stockholm2clustal.yml/badge.svg?branch=master

stockholm2phylip

https://github.com/bioconvert/bioconvert/actions/workflows/stockholm2phylip.yml/badge.svg?branch=master

tsv2csv

https://github.com/bioconvert/bioconvert/actions/workflows/tsv2csv.yml/badge.svg?branch=master

twobit2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/twobit2fasta.yml/badge.svg?branch=master

vcf2bcf

https://github.com/bioconvert/bioconvert/actions/workflows/vcf2bcf.yml/badge.svg?branch=master

vcf2bed

https://github.com/bioconvert/bioconvert/actions/workflows/vcf2bed.yml/badge.svg?branch=master

vcf2bplink

https://github.com/bioconvert/bioconvert/actions/workflows/vcf2bplink.yml/badge.svg?branch=master

vcf2plink

https://github.com/bioconvert/bioconvert/actions/workflows/vcf2plink.yml/badge.svg?branch=master

vcf2wiggle

https://github.com/bioconvert/bioconvert/actions/workflows/vcf2wiggle.yml/badge.svg?branch=master

wig2bed

https://github.com/bioconvert/bioconvert/actions/workflows/wig2bed.yml/badge.svg?branch=master

xls2csv

https://github.com/bioconvert/bioconvert/actions/workflows/xls2csv.yml/badge.svg?branch=master

xlsx2csv

https://github.com/bioconvert/bioconvert/actions/workflows/xlsx2csv.yml/badge.svg?branch=master

xmfa2phylip

https://github.com/bioconvert/bioconvert/actions/workflows/xmfa2phylip.yml/badge.svg?branch=master

yaml2json

https://github.com/bioconvert/bioconvert/actions/workflows/yaml2json.yml/badge.svg?branch=master

Contributors

Setting up and maintaining Bioconvert has been possible thanks to users and contributors. Thanks to all:

https://contrib.rocks/image?repo=bioconvert/bioconvert

Changes

Version

Description

0.5.0

  • Add CI actions for all converters

  • remove sniffer (now in biosniff on pypi https://pypi.org/project/biosniff/)

  • A complete benchmarking suite (see doc/Snakefile_benchmark file and benchmarking)

  • documentation and tests for all converters

  • removed the validators (we assume intputs are correct)

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

bioconvert-0.5.0.tar.gz (902.8 kB view hashes)

Uploaded Source

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