2023/12/07 dockerのコマンド修正
配列決定されたゲノムの数は飛躍的に増加しており、データの生成からゲノムの解釈に至るまでのボトルネックが大きく変化している。形質は、細菌を特徴づけたり区別したりするためによく用いられ、微生物群集組成の原動力となっていると考えられるが、ほとんどの微生物の形質についてはほとんど知られていない。ここでは、ゲノム配列から表現型を導き出すための完全自動化ソフトウェアパッケージである微生物形質分析器Traitarについて説明する。Traitarは、炭素・エネルギー源としての様々な基質の利用、酸素要求量、形態、抗生物質感受性、タンパク質分解、酵素活性などに関連する67の形質を予測する表現型分類器を提供する。さらに、特定の表現型の存在に関連するタンパク質ファミリーを示唆している。本手法では、L1正則化L2損失サポートベクターマシンを用いて、多様な微生物種におけるタンパク質ファミリーの植物学的パターンとその進化の歴史に基づいて、表現型の割り当てを行う。また、不完全なシングルセルゲノムやシミュレーションされたドラフトゲノムに基づいて、8系統572種の細菌ゲノムに対するTraitarの表現型の信頼性を実証した。また、商業用バイオガスリアクターから回収されたドラフトゲノムに基づいた2種の新規Clostridialesの手動による代謝再構築を検証・補完することで、メタゲノミクスへの応用も紹介している。Traitarは、https://github.com/hzi-bifo/traitar で入手できる。
細菌は私たちの生態系に普遍的に存在しており、ヒトの腸内での消化をサポートするなど、ヒトの健康に大きな影響を与えています。また、細菌群集は、廃水処理や汚染された土壌の除染などのバイオテクノロジーのプロセスにも役立つ。このような生態系の機能には、多様な細菌が独自の能力を発揮して貢献しているが、その能力を調べるための実験には多大な労力を要する。しかし、シーケンシング技術の大幅な進歩により、バクテリアのゲノム配列を調べることができるようになった。そこで、著者らは、ゲノムをもとにバクテリアの形質を予測するソフトウェア「Traitar」を開発した。このソフトウェアは、数十から数百のバクテリアのゲノムを用いた研究に適用できる。Traitarは、微生物学の研究者が興味のある形質を特定するのに役立ち、必要なウェットラボの作業量を減らすことができるだろう。
67 diverse traits
https://github.com/hzi-bifo/traitar/blob/master/traits.tsv
インストール
miniconda2.7環境でのテストではラン中にエラーが起きたため、オーサーが公開しているdocker imageを使った(<latest>TAG使用)。
依存
- python 2.7
#conda (bioconda)
mamba create -n traitar python=2.7 -y
conda activate traitar
mamba install -c bioconda traitar -y
#numpyが読み込まれない場合=> *1
#docker (dockerhub)
docker pull aweimann/traitar
> traitar -h
usage: traitar [-h] [-v]
{phenotype,pfam,annotate,show,new,remove,evaluate} ...
positional arguments:
{phenotype,pfam,annotate,show,new,remove,evaluate}
phenotype run annotation and prediction
pfam download or set Pfam HMMs
annotate run annotation
show show features important for classification
new create a new phenotype model archive
remove remove phenotypes from a given phenotype archive
evaluate compare Traitar predictions against a given standard
of truth
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
> traitar phenotype -h
usage: traitar phenotype [-h] [-g {genbank,refseq,img,prodigal,metagenemark}]
[-c CPUS] [-p PRIMARY_MODELS] [-s SECONDARY_MODELS]
[-r REARRANGE_HEATMAP]
[--no_heatmap_sample_clustering]
[--no_heatmap_phenotype_clustering]
input_dir sample2file
{from_genes,from_nucleotides,from_annotation_summary}
output_dir
positional arguments:
input_dir directory with the input data
sample2file mapping from samples to fasta files (also see gitHub
help): sample1_file_name{tab}sample1_name
sample2_file_name{tab}sample2_name
{from_genes,from_nucleotides,from_annotation_summary}
either from_genes if gene prediction amino acid fasta
is available in input_dir otherwise from_nucleotides
in this case Prodigal is used to determine the ORFs
from the nucleotide fasta files in input_dir
output_dir directory for the output; will be created if it
doesn't exist yet
optional arguments:
-h, --help show this help message and exit
-g {genbank,refseq,img,prodigal,metagenemark}, --gene_gff_type {genbank,refseq,img,prodigal,metagenemark}
if the input is amino acids the type of gene
prediction GFF file can be specified for mapping the
phenotype predictions to the genes
-c CPUS, --cpus CPUS number of cpus used for the individual steps; maximum
is number of samples; needs parallel
-p PRIMARY_MODELS, --primary_models PRIMARY_MODELS
primary phenotype models archive
-s SECONDARY_MODELS, --secondary_models SECONDARY_MODELS
secondary phenotype models archive
-r REARRANGE_HEATMAP, --rearrange_heatmap REARRANGE_HEATMAP
recompute the phenotype heatmaps based on a subset of
previously annotated and phenotyped samples
--no_heatmap_sample_clustering
if option is set, don't cluster the phenotype heatmaps
by samples and keep input ordering
--no_heatmap_phenotype_clustering
if option is set, don't cluster the heatmaps by
phenotype and keep input ordering
-f {png,pdf,svg,jpg}, --heatmap_format {png,pdf,svg,jpg}
choose file format for the heatmap
データベースの準備(Pfam-A.hmm)
mkdir database
traitar pfam database/
config.jsonも登録される。
テストラン
Prodigalでオープンリーディングフレームを予測し、<sample_file>の全サンプルの<in_dir>でヌクレオチドFASTAとして提供されたコーディング配列をHMMerを使ってPfamファミリーでアノテーションし、最後に67の形質に対するモデルから表現型を予測する。ランするには、
traitar phenotype <option> <target_dir> <query_table.tsv>{from_genes,from_nucleotides,from_annotation_summary} <output_dir>の順に記載する
git clone https://github.com/hzi-bifo/traitar.git
cd traitar/traitar/data/
traitar phenotype -g refseq sample_data/ sample_data/samples_gene_gff.txt from_genes outdir
#docker (aweimann/traitar:releaseの:releaseを削除。このバージョンのイメージではエラーが出る)
cd traitar/traitar/data/
docker run -v $PWD/sample_data:/mnt aweimann/traitar bash -c 'traitar phenotype -g refseq /mnt/ /mnt/samples_gene_gff.txt from_genes /mnt/outdir'
- -g {genbank,refseq,img,prodigal,metagenemark} if the input is amino acids the type of gene prediction GFF file can be specified for mapping the phenotype predictions to the genes
- -c CPUS number of cpus used for the individual steps; maximum is number of samples; needs parallel
提供しているテキスト(クエリ情報を記載したテキスト):上で指定しているsamples_gene_gff.txtは、2つのゲノムからのprotein.faa、サンプル名、カテゴリ、アノテーションのGFFファイル、を指定したタブ区切りファイルになる。
出力
> docker run --rm -v $PWD/sample_data:/mnt aweimann/traitar:latest bash -c
'traitar phenotype -g refseq /mnt/ /mnt/samples_gene_gff.txt
from_genes /mnt/out_dir'
遺伝子予測結果は<out_dir>/gene_predictionに、Pfamアノテーションは<out_dir>/pfam_annotationに、表現型予測は<out_dir>/phenotype predictionに保存される。
表現型の予測結果は、hyletic pattern classifierのヒートマップ、phylogeny-aware classifierのヒートマップ(heatmap_phypat_ggl.png)、両方のclassifierを組み合わせたヒートマップ(heatmap_comb.png)にまとめられる。
heatmap_phypat_pgl.pdf
表現型とサンプルの階層的クラスタリングが行われ、デンドログラム付きでヒートマップ に視覚化される。
heatmap_combined.pdf
(phypat分類器とPGL分類器の予測の両方でpositiveなものが黄緑)
この後、30ゲノム使ってランすると4時間ほどかかった。
ちょっとしたことでエラーが出やすいので、注意深く実行して下さい。 dockerのlatestかreleaseが安定のようです。
引用
From Genomes to Phenotypes: Traitar, the Microbial Trait Analyzer
Aaron Weimann, Kyra Mooren, Jeremy Frank, Phillip B Pope, Andreas Bremges, Alice C McHardy
mSystems. 2016 Dec 27;1(6)
参考
*1
pip uninstall numpy && pip install numpy
で解決した。