Skip to main content

Binette: accurate binning refinement tool to constructs high quality MAGs.

Project description

install with bioconda Anaconda-Server Badge Anaconda-Server Badge Anaconda-Server Badge PyPI version status

Test Coverage CI Status Documentation Status

Binette

Binette is a fast and accurate binning refinement tool to constructs high quality MAGs from the output of multiple binning tools.

From the input bin sets, Binette constructs new hybrid bins. A bin can be seen as a set of contigs. When at least two bins overlap, meaning they share at least one contig, Binette utilizes basic set operations to create new bins.

  • Intersection bin: This bin consists of the contigs that are shared by the overlapping bins.
  • Difference bin: This bin contains the contigs that are exclusively found in one bin and not present in the others.
  • Union bin: The union bin includes all the contigs contained within the overlapping bins

It then uses CheckM2 to assess bins quality to finally select the best bins possible.

Binette is inspired from the metaWRAP bin-refinement tool but it effectively solves all the problems from that very tool.

  • Enhanced Speed: Binette significantly improves the speed of the refinement process. It achieves this by launching the initial steps of CheckM2, such as Prodigal and Diamond runs, only once on all contigs. These intermediate results are then utilized to assess the quality of any given bin, eliminating redundant computations and accelerating the refinement process.
  • No Limit on Input Bin Sets: Unlike its predecessor, Binette is not constrained by the number of input bin sets. It can handle and process multiple bin sets simultaneously.

A comprehensive documentation of Binette is avalaible here: https://binette.readthedocs.io/

Installation

With Bioconda

Binette can be easilly installed with conda

conda create -c bioconda -c defaults -c conda-forge -n binette binette
conda activate binette

Binette should be able to run :

binette -h

From a conda environnement

Clone this repository:

git clone https://github.com/genotoul-bioinfo/Binette
cd Binette

Then create a Conda environment using the binette.yaml file:

conda env create -n binette -f binette.yaml
conda activate binette 

Finally install Binette with pip

pip install .

Binette should be able to run :

binette -h

Downloading the CheckM2 database

Before using Binette, it is necessary to download the CheckM2 database:

checkm2 database --download --path <checkm2/database/>

Make sure to replace <checkm2/database/> with the desired path where you want to store the CheckM2 database.

Usage

Input Formats

Binette supports two input formats for bin sets:

  1. Contig2bin Tables: You can provide bin sets using contig2bin tables, which establish the relationship between each contig and its corresponding bin. In this format, you need to specify the --contig2bin_tables argument.

For example, consider the following two contig2bin_tables:

  • bin_set1.tsv:

    contig_1   binA
    contig_8   binA
    contig_15  binB
    contig_9   binC
    
  • bin_set2.tsv:

    contig_1   bin.0
    contig_8   bin.0
    contig_15  bin.1
    contig_9   bin.2
    contig_10  bin.0
    

    The binette command to process this input would be:

    binette --contig2bin_tables bin_set1.tsv bin_set2.tsv --contigs assembly.fasta
    
  1. Bin Directories: Alternatively, you can use bin directories, where each bin is represented by a separate FASTA file. For this format, you need to provide the --bin_dirs argument. Here's an example of two bin directories:

    bin_set1/
    ├── binA.fa: contains sequences of contig_1, contig_8
    ├── binB.fa: contains sequences of contig_15
    └── binC.fa: contains sequences of contig_9
    
    bin_set2/
    ├── binA.fa: contains sequences of contig_1, contig_8, contig_10
    ├── binB.fa: contains sequences of contig_15
    └── binC.fa: contains sequences of contig_9
    

    The binette command to process this input would be:

    binette --bin_dirs bin_set1 bin_set2 --contigs assembly.fasta
    

In both formats, the --contigs argument should specify a FASTA file containing all the contigs found in the bins. Typically, this file would be the assembly FASTA file used to generate the bins. In these exemple the assembly.fasta file should contain at least the five contigs mentioned in the contig2bin_tables files or in the bin fasta files: contig_1, contig_8, contig_15, contig_9, and contig_10.

Outputs

Binette results are stored in the results directory. You can specify a different directory using the --outdir option.

In this directory you will find:

  • final_bins_quality_reports.tsv: This is a TSV (tab-separated values) file containing quality information about the final selected bins.
  • final_bins/: This directory stores all the selected bins in fasta format.
  • temporary_files/: This directory contains intermediate files. If you choose to use the --resume option, Binette will utilize files in this directory to prevent the recomputation of time-consuming steps.

The final_bins_quality_reports.tsv file contains the following columns:

Column Name Description
bin_id This column displays the unique ID of the bin.
origin Indicates the source or origin of the bin, specifying from which bin set it originates or the intermediate set operation that created it.
name The name of the bin.
completeness The completeness of the bin, determined by CheckM2.
contamination The contamination of the bin, determined by CheckM2.
score This column displays the computed score, which is calculated as: completeness - contamination * weight. You can customize the contamination weight using the --contamination_weight option.
size Represents the size of the bin in nucleotides.
N50 Displays the N50 of the bin.
contig_count The number of contigs contained within the bin.

Help, feature requests and bug reporting

To report bugs, request new features, or seek help and support, please open an issue.

Licence

This program is released as an open source software under the terms of MIT License.

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

binette-1.0.2.tar.gz (87.4 kB view details)

Uploaded Source

Built Distribution

Binette-1.0.2-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

Details for the file binette-1.0.2.tar.gz.

File metadata

  • Download URL: binette-1.0.2.tar.gz
  • Upload date:
  • Size: 87.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for binette-1.0.2.tar.gz
Algorithm Hash digest
SHA256 a4be87dc657cdfddcee78a9627c100fbeea8034f2ecb56474cc56a2432c94daa
MD5 59fa74343c1cd06c8d392883afffba07
BLAKE2b-256 ea6ec771d5c280dc3c634df6ae15f977705a1c1038ff06816f0434836ccff825

See more details on using hashes here.

File details

Details for the file Binette-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: Binette-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 25.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for Binette-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4fb9a9b9c2370f213799940a57f4300ad532bfead683fa66b1e0e593277f9fc6
MD5 297e033d01edb7488d469970108ea80f
BLAKE2b-256 510a0e53e4d981978a54c8fb56a411c537072f726f17cdd05881575b8bb761b6

See more details on using hashes here.

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