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://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

abi2fastq

https://github.com/bioconvert/bioconvert/actions/workflows/abi2fastq.yml/badge.svg

abi2qual

https://github.com/bioconvert/bioconvert/actions/workflows/abi2qual.yml/badge.svg

bam2bedgraph

https://github.com/bioconvert/bioconvert/actions/workflows/bam2bedgraph.yml/badge.svg

bam2bigwig

https://github.com/bioconvert/bioconvert/actions/workflows/bam2bigwig.yml/badge.svg

bam2cov

https://github.com/bioconvert/bioconvert/actions/workflows/bam2cov.yml/badge.svg

bam2cram

https://github.com/bioconvert/bioconvert/actions/workflows/bam2cram.yml/badge.svg

bam2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/bam2fasta.yml/badge.svg

bam2fastq

https://github.com/bioconvert/bioconvert/actions/workflows/bam2fastq.yml/badge.svg

bam2json

https://github.com/bioconvert/bioconvert/actions/workflows/bam2json.yml/badge.svg

bam2sam

https://github.com/bioconvert/bioconvert/actions/workflows/bam2sam.yml/badge.svg

bam2tsv

https://github.com/bioconvert/bioconvert/actions/workflows/bam2tsv.yml/badge.svg

bam2wiggle

https://github.com/bioconvert/bioconvert/actions/workflows/bam2wiggle.yml/badge.svg

bcf2vcf

https://github.com/bioconvert/bioconvert/actions/workflows/bcf2vcf.yml/badge.svg

bcf2wiggle

https://github.com/bioconvert/bioconvert/actions/workflows/bcf2wiggle.yml/badge.svg

bed2wiggle

https://github.com/bioconvert/bioconvert/actions/workflows/bed2wiggle.yml/badge.svg

bedgraph2bigwig

https://github.com/bioconvert/bioconvert/actions/workflows/bedgraph2bigwig.yml/badge.svg

bedgraph2cov

https://github.com/bioconvert/bioconvert/actions/workflows/bedgraph2cov.yml/badge.svg

bedgraph2wiggle

https://github.com/bioconvert/bioconvert/actions/workflows/bedgraph2wiggle.yml/badge.svg

bigbed2bed

https://github.com/bioconvert/bioconvert/actions/workflows/bigbed2bed.yml/badge.svg

bigbed2wiggle

https://github.com/bioconvert/bioconvert/actions/workflows/bigbed2wiggle.yml/badge.svg

bigwig2bedgraph

https://github.com/bioconvert/bioconvert/actions/workflows/bigwig2bedgraph.yml/badge.svg

bigwig2wiggle

https://github.com/bioconvert/bioconvert/actions/workflows/bigwig2wiggle.yml/badge.svg

bplink2plink

https://github.com/bioconvert/bioconvert/actions/workflows/bplink2plink.yml/badge.svg

bplink2vcf

https://github.com/bioconvert/bioconvert/actions/workflows/bplink2vcf.yml/badge.svg

bz22gz

https://github.com/bioconvert/bioconvert/actions/workflows/bz22gz.yml/badge.svg

clustal2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/clustal2fasta.yml/badge.svg

clustal2nexus

https://github.com/bioconvert/bioconvert/actions/workflows/clustal2nexus.yml/badge.svg

clustal2phylip

https://github.com/bioconvert/bioconvert/actions/workflows/clustal2phylip.yml/badge.svg

clustal2stockholm

https://github.com/bioconvert/bioconvert/actions/workflows/clustal2stockholm.yml/badge.svg

cram2bam

https://github.com/bioconvert/bioconvert/actions/workflows/cram2bam.yml/badge.svg

cram2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/cram2fasta.yml/badge.svg

cram2fastq

https://github.com/bioconvert/bioconvert/actions/workflows/cram2fastq.yml/badge.svg

cram2sam

https://github.com/bioconvert/bioconvert/actions/workflows/cram2sam.yml/badge.svg

csv2tsv

https://github.com/bioconvert/bioconvert/actions/workflows/csv2tsv.yml/badge.svg

csv2xls

https://github.com/bioconvert/bioconvert/actions/workflows/csv2xls.yml/badge.svg

dsrc2gz

https://github.com/bioconvert/bioconvert/actions/workflows/dsrc2gz.yml/badge.svg

embl2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/embl2fasta.yml/badge.svg

embl2genbank

https://github.com/bioconvert/bioconvert/actions/workflows/embl2genbank.yml/badge.svg

fasta2clustal

https://github.com/bioconvert/bioconvert/actions/workflows/fasta2clustal.yml/badge.svg

fasta2faa

https://github.com/bioconvert/bioconvert/actions/workflows/fasta2faa.yml/badge.svg

fasta2fasta_agp

https://github.com/bioconvert/bioconvert/actions/workflows/fasta2fasta_agp.yml/badge.svg

fasta2fastq

https://github.com/bioconvert/bioconvert/actions/workflows/fasta2fastq.yml/badge.svg

fasta2genbank

https://github.com/bioconvert/bioconvert/actions/workflows/fasta2genbank.yml/badge.svg

fasta2nexus

https://github.com/bioconvert/bioconvert/actions/workflows/fasta2nexus.yml/badge.svg

fasta2phylip

https://github.com/bioconvert/bioconvert/actions/workflows/fasta2phylip.yml/badge.svg

fasta2twobit

https://github.com/bioconvert/bioconvert/actions/workflows/fasta2twobit.yml/badge.svg

fasta_qual2fastq

https://github.com/bioconvert/bioconvert/actions/workflows/fasta_qual2fastq.yml/badge.svg

fastq2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/fastq2fasta.yml/badge.svg

available

fastq2fasta_qual

https://github.com/bioconvert/bioconvert/actions/workflows/fastq2fasta_qual.yml/badge.svg

fastq2qual

https://github.com/bioconvert/bioconvert/actions/workflows/fastq2qual.yml/badge.svg

genbank2embl

https://github.com/bioconvert/bioconvert/actions/workflows/genbank2embl.yml/badge.svg

genbank2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/genbank2fasta.yml/badge.svg

genbank2gff3

https://github.com/bioconvert/bioconvert/actions/workflows/genbank2gff3.yml/badge.svg

gfa2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/gfa2fasta.yml/badge.svg

gff22gff3

https://github.com/bioconvert/bioconvert/actions/workflows/gff22gff3.yml/badge.svg

gff32gff2

https://github.com/bioconvert/bioconvert/actions/workflows/gff32gff2.yml/badge.svg

gz2bz2

https://github.com/bioconvert/bioconvert/actions/workflows/gz2bz2.yml/badge.svg

gz2dsrc

https://github.com/bioconvert/bioconvert/actions/workflows/gz2dsrc.yml/badge.svg

json2yaml

https://github.com/bioconvert/bioconvert/actions/workflows/json2yaml.yml/badge.svg

maf2sam

https://github.com/bioconvert/bioconvert/actions/workflows/maf2sam.yml/badge.svg

newick2nexus

https://github.com/bioconvert/bioconvert/actions/workflows/newick2nexus.yml/badge.svg

newick2phyloxml

https://github.com/bioconvert/bioconvert/actions/workflows/newick2phyloxml.yml/badge.svg

nexus2clustal

https://github.com/bioconvert/bioconvert/actions/workflows/nexus2clustal.yml/badge.svg

nexus2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/nexus2fasta.yml/badge.svg

nexus2newick

https://github.com/bioconvert/bioconvert/actions/workflows/nexus2newick.yml/badge.svg

nexus2phylip

https://github.com/bioconvert/bioconvert/actions/workflows/nexus2phylip.yml/badge.svg

nexus2phyloxml

https://github.com/bioconvert/bioconvert/actions/workflows/nexus2phyloxml.yml/badge.svg

ods2csv

https://github.com/bioconvert/bioconvert/actions/workflows/ods2csv.yml/badge.svg

phylip2clustal

https://github.com/bioconvert/bioconvert/actions/workflows/phylip2clustal.yml/badge.svg

phylip2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/phylip2fasta.yml/badge.svg

phylip2nexus

https://github.com/bioconvert/bioconvert/actions/workflows/phylip2nexus.yml/badge.svg

phylip2stockholm

https://github.com/bioconvert/bioconvert/actions/workflows/phylip2stockholm.yml/badge.svg

phylip2xmfa

https://github.com/bioconvert/bioconvert/actions/workflows/phylip2xmfa.yml/badge.svg

phyloxml2newick

https://github.com/bioconvert/bioconvert/actions/workflows/phyloxml2newick.yml/badge.svg

phyloxml2nexus

https://github.com/bioconvert/bioconvert/actions/workflows/phyloxml2nexus.yml/badge.svg

plink2bplink

https://github.com/bioconvert/bioconvert/actions/workflows/plink2bplink.yml/badge.svg

plink2vcf

https://github.com/bioconvert/bioconvert/actions/workflows/plink2vcf.yml/badge.svg

sam2bam

https://github.com/bioconvert/bioconvert/actions/workflows/sam2bam.yml/badge.svg

sam2cram

https://github.com/bioconvert/bioconvert/actions/workflows/sam2cram.yml/badge.svg

sam2paf

https://github.com/bioconvert/bioconvert/actions/workflows/sam2paf.yml/badge.svg

scf2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/scf2fasta.yml/badge.svg

scf2fastq

https://github.com/bioconvert/bioconvert/actions/workflows/scf2fastq.yml/badge.svg

sra2fastq

https://github.com/bioconvert/bioconvert/actions/workflows/sra2fastq.yml/badge.svg

stockholm2clustal

https://github.com/bioconvert/bioconvert/actions/workflows/stockholm2clustal.yml/badge.svg

stockholm2phylip

https://github.com/bioconvert/bioconvert/actions/workflows/stockholm2phylip.yml/badge.svg

tsv2csv

https://github.com/bioconvert/bioconvert/actions/workflows/tsv2csv.yml/badge.svg

twobit2fasta

https://github.com/bioconvert/bioconvert/actions/workflows/twobit2fasta.yml/badge.svg

vcf2bcf

https://github.com/bioconvert/bioconvert/actions/workflows/vcf2bcf.yml/badge.svg

vcf2bed

https://github.com/bioconvert/bioconvert/actions/workflows/vcf2bed.yml/badge.svg

vcf2bplink

https://github.com/bioconvert/bioconvert/actions/workflows/vcf2bplink.yml/badge.svg

vcf2plink

https://github.com/bioconvert/bioconvert/actions/workflows/vcf2plink.yml/badge.svg

vcf2wiggle

https://github.com/bioconvert/bioconvert/actions/workflows/vcf2wiggle.yml/badge.svg

wig2bed

https://github.com/bioconvert/bioconvert/actions/workflows/wig2bed.yml/badge.svg

xls2csv

https://github.com/bioconvert/bioconvert/actions/workflows/xls2csv.yml/badge.svg

xlsx2csv

https://github.com/bioconvert/bioconvert/actions/workflows/xlsx2csv.yml/badge.svg

xmfa2phylip

https://github.com/bioconvert/bioconvert/actions/workflows/xmfa2phylip.yml/badge.svg

yaml2json

https://github.com/bioconvert/bioconvert/actions/workflows/yaml2json.yml/badge.svg

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.1

  • add genbank2gff3 requirement material in bioconvert.utils.biocode

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.1.tar.gz (936.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