Skip to content

Commit ffd2f1a

Browse files
authored
Update README.md
1 parent 278c031 commit ffd2f1a

1 file changed

Lines changed: 29 additions & 15 deletions

File tree

README.md

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
# MAGmax
2-
MAGmax is a tool to maximize the yield of Metagenome-Assembled Genomes (MAGs) through bin Merging and reAssembly.
2+
MAGmax is a dereplication tool designed to maximize the recovery of Metagenome-Assembled Genomes (MAGs) through bin Merging and reAssembly. It performs dereplication in three stages: (i) grouping bins based on average sequence identity, (ii) merging bins within each group, and (iii) reassembling the merged bins.
33

4-
### Example run
4+
## INPUTS
5+
MAGmax requires three input directories,
6+
1. `binsdir`, a directory containing bin files in FASTA format that need to be dereplicated. (e.g., output files from any metagenome binning tool)
57

6-
magmax -b binsdir -m mapid_dir -r readdir -f fasta -t 24
7-
magmax -b binsdir -m mapid_dir -r readdir -f fasta -t 24 -q quality_report.tsv // if CheckM2 result is already available
8-
magmax -b binsdir -m mapid_dir -r readdir -f fasta -t 24 --split // if input bins are not already split by sample id
8+
2. `readdir`, a directory containing read files in FASTQ format for each sample.
9+
10+
3. `mapid_dir`, a directory containing mapping files for each sample. Each file is a text file listing read IDs and the corresponding contig IDs they mapped to. These files are used to retrieve reads that map to each merged bin from the FASTQ files in `readdir` and to generate new bin-specific FASTQ files for reassembly.
911

10-
### Test run
11-
magmax -b test/bins -m test/mapids -r test/reads -t 24 -q test/quality_report.tsv
12+
## OUTPUTS
13+
An output directory named `mags_<x>comp_<y>purity` will be created, where `x` and `y` correspond to the user-specified completeness and purity thresholds used to select final bins. By default, MAGmax uses a percentage of 50 for completeness and 95 for purity.
14+
The output directory contains dereplicated bins, and a text file listing the completeness and contamination scores for each bin as calculated by CheckM2.
15+
16+
### Example command line call
17+
18+
magmax -b <binsdir> -r <readdir> -m <mapid_dir> -f fasta -t 24
19+
magmax -b <binsdir> -r <readdir> -m <mapid_dir> -f fasta -t 24 -q quality_report.tsv // if CheckM2 result is already available
20+
magmax -b <binsdir> -r <readdir> -m <mapid_dir> -f fasta -t 24 --split // if input bins are not already split by sample id
1221

1322
## Install
1423
### Prerequisites
@@ -49,7 +58,7 @@ Option 2: Build from source
4958
cargo install --path .
5059
magmax -h
5160

52-
61+
5362
## Options
5463
-b, --bindir <BINDIR>
5564
Directory containing fasta files of bins
@@ -78,19 +87,24 @@ Option 2: Build from source
7887
-V, --version
7988
Print version
8089

90+
### Test run using toy data
91+
This example test run demonstrates dereplication of bins using the provided toy dataset. In the `test/bins` directory, example bins generated with MetaBAT2 are given. In the `test/reads` directory, paired-end read files for two samples are given and in the `test/mapids` directory, mapid files mapping reads to contigs for each sample are given. Precomputed CheckM2 quality scores for the input bins are given in the `test/quality_report.tsv`. Run the following command to execute the test:
92+
93+
magmax -b test/bins -r test/reads -m test/mapids -t 24 -q test/quality_report.tsv
94+
8195

8296
## Notes
83-
1. Input contigs should have id prefixed with the sample ID, separated by 'C'. Perform mapping and binning on contig files with these updated contig ids.
97+
1. Input contigs should have id prefixed with the sample ID, separated by 'C', as commonly practiced in the single-sample and multi-sample binning. Perform mapping and binning on contig files with these updated contig ids.
8498
2. Mapid files can be generated using aligner2counts (https://github.com/soedinglab/binning_benchmarking/tree/main/util#aligner2counts) with `only-mapids` option.
8599

86100
File name: `<sampleid>_mapids`
87101
```
88-
read1_id sampleidCcontig1_id
89-
read2_id sampleidCcontig2_id
90-
read2_id sampleidCcontig4_id
91-
read3_id sampleidCcontig2_id
92-
read4_id sampleidCcontig3_id
93-
read4_id sampleidCcontig4_id
102+
read1_id <sampleid>Ccontig1_id
103+
read2_id <sampleid>Ccontig2_id
104+
read2_id <sampleid>Ccontig4_id
105+
read3_id <sampleid>Ccontig2_id
106+
read4_id <sampleid>Ccontig3_id
107+
read4_id <sampleid>Ccontig4_id
94108
```
95109
96110
3. If input bins are not separated by sample IDs, such as when using MetaBAT2 or COMEBin on a concatenated set of contigs, use the `--split` option to automatically separate input bin by sample IDs.

0 commit comments

Comments
 (0)