macでインフォマティクス

macでインフォマティクス

HTS (NGS) 関連のインフォマティクス情報についてまとめています。

複雑な微生物群集から個々のゲノムを回収するアンサンブルビニング法 MetaBinner

 

 ビニングは、メタゲノムデータから微生物ゲノムを復元することを目的としている。複雑なメタゲノムコミュニティに対して、利用可能なビニング手法は満足できるものではなく、通常、異なる種類の特徴や重要な生物学的知識を十分に利用できていない。本著者らは、K-meansにより複数種類の特徴量を用いて成分結果を生成し、初期化にシングルコピー遺伝子情報を用いる新しいアンサンブルBinner、MetaBinnerを開発した。そして、シングルコピー遺伝子に基づく2段階のアンサンブル戦略を採用し、コンポーネント結果を効率的かつ効果的に統合する。3つの大規模シミュレーションデータセットと1つの実世界データセットを用いた広範な実験結果により、MetaBinnerが最先端のバイナーを大幅に上回ることが実証された。

 

インストール

Github

#conda(link)
mamba create -n metabinner_env python=3.7.6 -y
conda activate metabinner_env
mamba install -c conda-forge -c bioconda metabinner -y

> run_metabinner.sh 

Usage: bash run_metabinner.sh [options] -a contig_file -o output_dir -d coverage_profile -k kmer_profile -p path_to_MetaBinner

Options:

 

  -a STR          metagenomic assembly file

  -o STR          output directory

  -d STR          coverage_profile.tsv; The coverage profiles, containing a table where each row correspond to a contig, and each column correspond to a sample. All values are separated with tabs.

  -k STR          kmer_profile.csv; The composition profiles, containing a table where each row correspond to a contig, and each column correspond to the kmer composition of particular kmer. All values are separated with comma.

  -p STR          path to MetaBinner; e.g. /home/wzy/MetaBinner

  -t INT          number of threads (default=1)

  -s STR          Dataset scale; eg. small,large,huge

 

> bash gen_coverage_file.sh

 

------------------------------------------------------------------------------------------------------------------------

-----                             Non-optional parameters -a and/or -o were not entered                            -----

------------------------------------------------------------------------------------------------------------------------ 

 

 

Usage: bash gen_coverage_file.sh [options] -a assembly.fa -o output_dir readsA_1.fastq readsA_2.fastq ... [readsX_1.fastq readsX_2.fastq]

Note1: Make sure to provide all your separately replicate read files, not the joined file.

Note2: You may provide single end or interleaved reads as well with the use of the correct option

Note3: If the output already has the .bam alignments files from previous runs, the module will skip re-aligning the reads

 

Options:

 

    -a STR    metagenomic assembly file

    -o STR    output directory (to save the coverage files)

    -b STR    directory for the bam files

    -t INT    number of threads (default=1)

    -m INT        amount of RAM available (default=4)

    -l INT        minimum contig length to bin (default=1000bp).

    --single-end    non-paired reads mode (provide *.fastq files)

    --interleaved    the input read files contain interleaved paired-end reads

    -f STR    Forward read suffix for paired reads (default=_1.fastq)

    -r STR    Reverse read suffix for paired reads (default=_2.fastq)

 

 

実行方法

ランするにはカバレッジプロファイルとコンポジションプロファイルが必要。MetaWRAPの結果を使用するか、もしくはシーケンシングリードから直接カバレッジを生成する。それにMetaWRAPの "binning.sh "を修正したスクリプトを使用する。

 

1、カバレッジプロファイルテキストの生成

git clone https://github.com/ziyewang/MetaBinner.git
cd MetaBinner/scripts/
bash gen_coverage_file.sh -a final.contigs.fa -o outdir -t 20 sample_1.fastq sample_2.fastq
  • --single-end    non-paired reads mode (provide *.fastq files)
  • --interleaved   the input read files contain interleaved paired-end reads
  • -f       Forward read suffix for paired reads (default="_1.fastq")
  • -r       Reverse read suffix for paired reads (default="_2.fastq")
  • -t       number of threads (default=1)

 

2、コンポジションプロファイルテキストの生成

コンティグプロファイルはコンティグのベクトル表現であり、この情報の生成にはkmer(例ではk=4)を使用する(マニュアルより)。

cd MetaBinner/scripts/
python Filter_tooshort.py test_data/final.contigs_f1k.fa 1000

 

3、MetaBinnerのラン。ここではレポジトリからダウンロードできるテストデータを使う。

metabinner_path=$(dirname $(which run_metabinner.sh))

run_metabinner.sh -a final_contigs_f1k.fa -o outdir -d coverage_profile_f1k.tsv -k kmer_4_f1000.csv -p ${metabinner_path}

 

 

 

引用

MetaBinner: a high-performance and stand-alone ensemble binning method to recover individual genomes from complex microbial communities
Ziye Wang, Pingqin Huang, Ronghui You, Fengzhu Sun & Shanfeng Zhu 
Genome Biology volume 24, Article number: 1 (2023)