macでインフォマティクス

macでインフォマティクス

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

ビニングツール MetaBMF

2021 7/14 インストール手順追記

 

 メタゲノミクスは、ヒトの消化管などの生態系における微生物ゲノムを研究する。次世代シーケンシング技術を用いてシーケンスされた、異なる微生物種間の新規微生物種の同定およびそれらの分布変動の定量化は、ほとんどのメタゲノム研究の成功への鍵を握っている。これらの目的を達成するために、本著者らは単純で強力なメタゲノムビニング方法、MetaBMFを提案する。この方法は、リファレンスゲノムの予備知識を必要とせず、そして株レベルでさえも非常に正確な結果を生じる。したがって、それは広く研究されていない疾患関連微生物を同定するために広く使用され得る。
 数学的に、入力行列として異なるサンプルを交差させる各アセンブリされたゲノム断片上のマッピングされたリードの数を数え、この数行列をバイナリ行列と非負行列の積に因数分解するスケーラブルな層別角度回帰アルゴリズムを提案する。二元マトリックスは微生物種を分離するために使用することができ、そして非負行列は異なるサンプル中の種分布を定量化する。シミュレーションと実証研究でMetaBMFが高いビニング精度を持っていることを示す。MetaBMFは種レベルだけでなく株レベルでも正確にDNA断片を分類することができる。例に示すように、MetaBMFは2011年のドイツの大腸菌の集団発生につながった志賀毒素原性大腸菌O104:H4株を正確に同定することができる。これらの分野における著者らの努力は、(1)メタゲノムビニングの根本的な進歩、(2)微生物分布の迅速な同定および定量化のための技術の開発および改良(3)潜在的プロバイオティクスまたは信頼できる病原性細菌株の発見につながるはずである。

 

 

インストール

pyenvでminiconda2.4.0.5と3-4.3.27をactivateしてcondaで依存を導入してテストした(docker使用、ホストos ubuntu16.0.4)。

依存

  • Ray Assembler or MegaHIT Assembler (Users can also choose their preferred assemblers other than Ray and MegaHIT)
  • Bowtie2
  • Samtools
mamba create -n metabmf -y
conda activate metabmf
#ray
mamba install -c bioconda -c conda-forge -y ray
#megahit
mamba install -c bioconda -y megahit
#bowtie2, samtools
mamba install -c bioconda -y bowtie2 samtools

本体 Github

git clone https://github.com/didi10384/MetaBMF

bash ./MetaBMF/MetaBMF.sh -h

# bash MetaBMF/MetaBMF.sh -h

Usage:

    bash MetaBMF.sh [options] -c <contigs> -o <outdir> -p <reads-list>

Options:

-o      Output directory

-c      The path to the contigs fasta file

    -s      list of sample names for single-end reads

    -p      list of sample names for paired-ends reads

    -q      For fastq files

    -a      For fasta files

######## Options for binning

-n Number of threads: Specify the number of CPU cores used for parallel computing. When there is a large number of contigs, it is recommended to set multiple CPU cores to accelerate the computation. The default number is 1.

-l Specify the minimum number of clusters. The default is 2.

-u Specify the maximum number of clusters. The default is 0, which will let the algorithm sets the maximum number of cluster automatically.

-e Specify the increment of the number of clusters from bic_min to bic_max. The default is 1.

-t Specify the threshold for setting the initial value. It is recommended to set this number smaller(0.01-0.1) when the number of samples is less than -h0$ and larger (0.1-0.2) when the number of samples is larger than -h0$. The default value is set to 0.1.

-i Specify how many percent contigs are used to set the initial value of the algorithm. The default value is 1, which means that all the contigs is used to find initial value of the algorithm. The number can be set to a smaller one, when there are a very large number of contigs.

-r Specify the minimum contig length, contigs shorter than this value will not be included. Default is 500.

-c If the value is "T", output the plot of BIC scores. The default is "F".

-m The value is "1" for the simple metagenomic community. The value is "2" for the complex metagenomic community.

    -h  This help documentation.

 

 

 テストラン

1、テストデータのダウンロードとリストファイル作成

mkdir example
cd example
wget https://ndownloader.figshare.com/files/5523092
unzip 5523092

cd ./test_data
for f in *.fasta; do
g=$(echo $f |gawk '{gsub(/.*[/]|.fasta/, "", $0)} 1')
echo -e "$PWD/$g" >> read_list.txt
done

cd ..
mkdir metabmf_work

test_data

f:id:kazumaxneo:20210714195843p:plain

 

実行する。

bash MetaBMF/MetaBMF.sh -a -c ./test_data/ray/Contigs.fasta -o ./metabmf_work -s ./test_data/read_list.txt 

 

 

引用

MetaBMF: a scalable binning algorithm for large-scale reference-free metagenomic studies
Terry Ma, Di Xiao, Xin Xing
Bioinformatics, Volume 36, Issue 2, 15 January 2020, Pages 356–363