Package: bioconvert
BioconvertBioconvertis a collaborative project to facilitate the interconversion of life science data from one format to another.contributions:Want to add a convertor ? Please joinhttps://github.com/bioconvert/bioconvert/issues/1OverviewLife 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.InstallationBioConvertis developped in Python. Please use conda or any Python environment manager to installBioConvertusing thepipcommand:pip install bioconvert50% of the conversions should work out of the box. However, many conversions require external tools. This is why we
recommend to use acondaenvironment. In particular, most external tools are available on thebiocondachannel.
For instance if you want to convert a SAM file to a BAM file you would need to installsamtoolsas follow:conda install -c bioconda samtoolsSincebioconvertis available onbiocondaon solution that installsBioConvertand all its dependencies is to use conda/mamba:conda env create --name bioconvert mamba
conda activate bioconvert
mamba install bioconvert
bioconvert --helpSee the Installation section for more details and alternative solutions (docker, singularity).Quick StartThere are many conversions available. Type:bioconvert --helpto get a list of valid method of conversions. Taking the example of a conversion from aFastQfile into
aFastAfile, 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.bz2When there is no ambiguity, you can be implicit:bioconvert input.fastq output.fastaThe default method of conversion is used but you may use another one. Checkout the available methods with:bioconvert fastq2fasta --show-methodsFor more help about a conversion, just type:bioconvert fastq2fasta --helpand more generally:bioconvert --helpYou may also callBioConvertfrom 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 ConvertersConversion tableConvertersCI testingDefault methodabi2fastaBIOPYTHONabi2fastqBIOPYTHONabi2qualBIOPYTHONbam2bedgraphBEDTOOLSbam2bigwigDEEPTOOLSbam2covBEDTOOLSbam2cramSAMTOOLSbam2fastaSAMTOOLSbam2fastqSAMTOOLSbam2jsonBAMTOOLSbam2samSAMBAMBAbam2tsvSAMTOOLSbam2wiggleWIGGLETOOLSbcf2vcfBCFTOOLSbcf2wiggleWIGGLETOOLSbed2wiggleWIGGLETOOLSbedgraph2bigwigUCSCbedgraph2covBIOCONVERTbedgraph2wiggleWIGGLETOOLSbigbed2bedDEEPTOOLSbigbed2wiggleWIGGLETOOLSbigwig2bedgraphDEEPTOOLSbigwig2wiggleWIGGLETOOLSbplink2plinkPLINKbplink2vcfPLINKbz22gzUnix commandsclustal2fastaBIOPYTHONclustal2nexusGOALIGNclustal2phylipBIOPYTHONclustal2stockholmBIOPYTHONcram2bamSAMTOOLScram2fastaSAMTOOLScram2fastqSAMTOOLScram2samSAMTOOLScsv2tsvBIOCONVERTcsv2xlsPandasdsrc2gzDSRC softwareembl2fastaBIOPYTHONembl2genbankBIOPYTHONfasta2clustalBIOPYTHONfasta2faaBIOCONVERTfasta2fasta_agpBIOCONVERTfasta2fastqPYSAMfasta2genbankBIOCONVERTfasta2nexusGOALIGNfasta2phylipBIOPYTHONfasta2twobitUCSCfasta_qual2fastqPYSAMfastq2fastaBIOCONVERTavailablefastq2fasta_qualBIOCONVERTfastq2qualREADFQgenbank2emblBIOPYTHONgenbank2fastaBIOPYTHONgenbank2gff3BIOCODEgfa2fastaBIOCONVERTgff22gff3BIOCONVERTgff32gff2BIOCONVERTgff32gtfBIOCONVERTgz2bz2pigz/pbzip2 softwaregz2dsrcDSRC softwarejson2yamlPythonmaf2samBIOCONVERTnewick2nexusGOTREEnewick2phyloxmlGOTREEnexus2clustalGOALIGNnexus2fastaBIOPYTHONnexus2newickGOTREEnexus2phylipGOALIGNnexus2phyloxmlGOTREEods2csvpyexcel librarypdb2faaBIOCONVERTphylip2clustalBIOPYTHONphylip2fastaBIOPYTHONphylip2nexusGOALIGNphylip2stockholmBIOPYTHONphylip2xmfaBIOPYTHONphyloxml2newickGOTREEphyloxml2nexusGOTREEplink2bplinkPLINKplink2vcfPLINKsam2bamSAMTOOLSsam2cramSAMTOOLSsam2pafBIOCONVERTscf2fastaBIOCONVERTscf2fastqBIOCONVERTsra2fastqFASTQDUMPstockholm2clustalBIOPYTHONstockholm2phylipBIOPYTHONtsv2csvBIOCONVERTtwobit2fastaDEEPTOOLSvcf2bcfBCFTOOLSvcf2bedBIOCONVERTvcf2bplinkPLINKvcf2plinkPLINKvcf2wiggleWIGGLETOOLSwig2bedBEDOPSxls2csvxlsx2csvPandas libraryxmfa2phylipBIOPYTHONyaml2jsonPandas libraryContributorsSetting up and maintaining Bioconvert has been possible thanks to users and contributors.
Thanks to all:ChangesVersionDescription1.1.1Fix benchmark labels.NEW: fast52pod5 conversionFIX: set goalign and gotree instead of go requirements1.1.0Implement ability to benchmark the CPU and memory usage (not just time)
benchmark incorporates CPU/memory usage1.0.0Fix bam2fastq for paired data that computed useless intermediate filehttps://github.com/bioconvert/bioconvert/issues/325more realistic fastq simulatorpin openpyxl to <=3.0.10 to prevent regression error in v3.1.00.6.3add picard method in bam2samFixed all CI workflows to use mambadrop python3.7 support and add 3.10 supportupdate bedops test file to fit the latest bedops 2.4.41 versionrevisit logging system0.6.2added gff3 to gtf conversion.Added pdb to faa conversionAdded missing –reference argument to the cram2sam conversion0.6.1output file can be in sub-directories allowing syntax such as
‘bioconvert fastq2fasta test.fastq outputs/test.fastafix all CI actionsadd more examples as notebooks in ./examplesadd a Snakefile for the paper in ./doc/Snakefile_paper0.6.0Fix bug in bam2sam (method sambamba)Fix graph layoutadd threading in fastq2fasta (seqkit method)multibenchmark feature addedstable version used for web interface0.5.2Update requirements and environment.yml and add a conda spec-file.txt file0.5.1add genbank2gff3 requirement material in bioconvert.utils.biocode0.5.0Add CI actions for all convertersremove sniffer (now in biosniff on pypihttps://pypi.org/project/biosniff/)A complete benchmarking suite (see doc/Snakefile_benchmark file andbenchmarking)documentation and tests for all convertersremoved the validators (we assume intputs are correct)0.4.X(aug 2019) added nexus2fasta, cram2fasta, fasta2faa … ; 1-to-many and
many-to-one converters are now part of the API.0.3.Xmay 2019. new methods abi2qual, bigbed2bed, etc. added –threads option0.2.Xaug 2018. abi2fastx, bioconvert_stats tool added0.1.Xmajor refactoring to  have subcommands with implicit/explicit mode