macでインフォマティクス

macでインフォマティクス

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

タンパク質ファミリー生成のためのスケーラブルなパイプライン proteinfamilies

 

メタゲノム由来のアミノ酸配列データの増加は、タンパク質の機能、微生物の多様性、進化的関係に対する我々の理解を大きく変えた。しかし、これらのタンパク質の大部分は依然として機能的に未解明である。このような未解明配列を、少数の実験的に機能が確認された配列とグループ化することで、アノテーションを転移することが可能になる。また、多重配列アライメントによって保存された残基を調べることで、既存の機能情報がなくても、機能の手がかりを得ることができる。このデータ量の急増と配列のグループ化の必要性に対応するために、本著者らはスケーラブルでオープンソース、かつパラメータ設定可能な Nextflow パイプライン(nf-core/proteinfamilies)を提案する。このパイプラインは、新規タンパク質ファミリーを生成するか、新しいタンパク質を既存のファミリーに割り当てることができる。計算ベンチマークでは、リソース使用量が入力サイズにほぼ線形でスケールすることが示され、また生物学的ベンチマークでは、生成されたタンパク質ファミリーが広く使われているデータベースの手動でキュレーションされたファミリーと密接に類似していることが示された。

 

以下の流れで進められる。

1、入力タンパク質配列の品質チェック

2、タンパク質ファミリーの作成

シーケンスクラスタリング(MMseqs2)

MSA実行(FAMSAまたはmafft)、オプションで、MSAのギャップ部分のクリップ(ClipKIT)

たんぱく質ファミリーのHMMを生成し、追加のシーケンスをファミリーに組み込む(hmmer)。オプションで、ファミリー代表シーケンスをファミリーモデルと比較して重複ファミリーを削除(hmmer)オプションで、残ったファミリーから、MMseqs2を使用して厳密なクラスタリングを行い、ファミリー内の重複シーケンスを除去し、クラスタ代表シーケンスを保持。さらにオプションで、ファミリー内の重複が除去されていない場合、HH-suite3を使用して.sto形式のフルMSAを.fas形式に再フォーマットする

ファミリーサイズ分布と代表シーケンスの長さの統計情報を表示(MultiQC)

3、ファミリーのアップデート

入力シーケンスを既存のファミリーモデル(hmmer)と比較して、更新対象のファミリーを特定
ヒットしないシーケンスの場合、上記の手順を継続

インストール

Github

$ nextflow run nf-core/proteinfamilies --help

 

 N E X T F L O W   ~  version 25.04.6

 

Launching `https://github.com/nf-core/proteinfamilies` [adoring_lalande] DSL2 - revision: 4b8c2c06c3 [main]

 

 

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

                                        ,--./,-.

        ___     __   __   __   ___     /,-._.--~'

  |\ | |__  __ /  ` /  \ |__) |__         }  {

  | \| |       \__, \__/ |  \ |___     \`-._,-`-,

                                        `._,._,'

  nf-core/proteinfamilies 1.3.0

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

Typical pipeline command:

 

  nextflow run nf-core/proteinfamilies -profile <docker/singularity/.../institute> --input samplesheet.csv --outdir <OUTDIR>

 

--help                                  [boolean, string] Show the help message for all top level parameters. When a parameter is given to `--help`, the full help message of that parameter will be printed. 

--help_full                             [boolean]         Show the help message for all non-hidden parameters. 

--show_hidden                           [boolean]         Show all hidden parameters in the help message. This needs to be used in combination with `--help` or `--help_full`. 

 

Input/output options

  --input                               [string] Path to comma-separated file '.csv' containing information about the samples in the experiment. 

  --outdir                              [string] The output directory where the results will be saved. You have to use absolute paths to storage on Cloud infrastructure. 

  --email                               [string] Email address for completion summary. Example: name.surname@example.com 

  --multiqc_title                       [string] MultiQC report title. Printed as page header, used for filename if not otherwise specified. 

 

Generic options

  --multiqc_methods_description         [string] Custom MultiQC yaml file containing HTML including a methods description. 

 

Clustering parameters

  --save_mmseqs_db                      [boolean] Save the db output folder of mmseqs createdb 

  --clustering_tool                     [string]  Choose clustering algorithm. Either simple 'cluster' for medium size inputs, or 'linclust' for less sensitive clustering of larger datasets.  (accepted: linclust, cluster) 

  --cluster_seq_identity                [number]  mmseqs parameter for minimum sequence identity [default: 0.5] 

  --cluster_coverage                    [number]  mmseqs parameter for minimum sequence coverage ratio [default: 0.9] 

  --cluster_cov_mode                    [integer] mmseqs parameter for coverage mode: 0 for both, 1 for target and 2 for query sequence [default: 0] 

  --save_mmseqs_clustering              [boolean] Save the clustering output folder of mmseqs cluster or linclust 

  --cluster_size_threshold              [integer] Minimum clustering chunk size threshold to create seed Multiple Sequence Alignments upon. [default: 25] 

  --save_mmseqs_chunked_fasta           [boolean] Save membership-filtered initial mmseqs clusters in fasta format 

 

Alignment parameters

  --alignment_tool                      [string]  Choose alignment tool. FAMSA is recommended as best time-memory-accuracy combination option.  (accepted: famsa, mafft) 

  --clipkit_out_format                  [string]  Choose the output format of the clipped alignment. [default: clipkit] 

  --trim_ends_only                      [boolean] Choose if ClipKIT should only clip gaps at the ends of the MSAs. [default: true] 

  --gap_threshold                       [number]  Multiple Sequence Alignment (MSA) positions with gappiness greater than this threshold will be trimmed [default: 0.5] 

  --hmmsearch_evalue_cutoff             [number]  hmmsearch e-value cutoff threshold for reported results [default: 0.001] 

  --save_hmmsearch_results              [boolean] Save the output of hmmsearch (.domtbl.gz and .tbl.gz) 

  --hmmsearch_query_length_threshold    [number]  hmmsearch minimum length percentage filter of hit env vs query length [default: 0.9] 

  --save_hmmsearch_filtered_fasta       [boolean] Save family fasta files after recruiting sequences with hmmsearch 

 

Redundancy removal parameters

  --hmmsearch_family_length_threshold   [number]  hmmsearch minimum length percentage filter of hit env vs query length, for redundant family removal [default: 0.9] 

  --save_non_redundant_fams_fasta       [boolean] Save only the fasta files of non-redundant families (might still contain redundant sequences) 

  --cluster_seq_identity_for_redundancy [number]  mmseqs parameter for minimum sequence identity [default: 0.9] 

  --cluster_coverage_for_redundancy     [number]  mmseqs parameter for minimum sequence coverage ratio [default: 0.9] 

  --cluster_cov_mode_for_redundancy     [integer] mmseqs parameter for coverage mode: 0 for both, 1 for target and 2 for query sequence [default: 0] 

  --save_non_redundant_seqs_fasta       [boolean] Save the final family fasta files with sequence redundancy removed 

 

 !! Hiding 24 param(s), use the `--show_hidden` parameter to show them !!

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

 

* The pipeline

    https://doi.org/10.5281/zenodo.14881993

 

* The nf-core framework

    https://doi.org/10.1038/s41587-020-0439-x

 

* Software dependencies

    https://github.com/nf-core/proteinfamilies/blob/main/CITATIONS.md

 

 

テストラン

分類するタンパク質のfasta配列とそのパスを書いたサンプルシートが必要。

1列目:  サンプル名

2列目: アミノ酸 fasta配列ファイルへのパス( .faa や .fa)ここではweb上のファイルをURLで指定

3列目:  existing_hmms_to_update  - 任意で既存の HMM を指定

4列目:  existing_msas_to_update   -  任意で既存の MSA を指定する

 

MGnify由来の小さな配列セットが使われている。

https://raw.githubusercontent.com/nf-core/test-datasets/proteinfamilies/test_data/mgnifams_input_small.fa

 

テストランならレポジトリをcloneしてそのまま実行する。fastaはweb上のファイルを使っている。

git clone https://github.com/nf-core/proteinfamilies.git
cd proteinfamilies
nextflow run nf-core/proteinfamilies -profile test,docker --outdir test

出力例

出力

https://nf-co.re/proteinfamilies/output

入力アミノ酸配列の基本統計、クラスタリング結果、シードのMSA、HMM生成およびサーチ結果、冗長性除去、既存ファミリー更新、代表配列抽出とレポート作成が行われる。

 

その他(論文より)

  • タンパク質配列の数が増加するにつれ、タンパク質ファミリーの大量の手動キュレーションは現実的ではなくなってきている。タンパク質ファミリーを自動的に生成する計算機手法は、感度、スケーラビリティ、および使いやすさのバランスを保つ必要がある。Pfam-Bは、Pfam のプロファイル HMM に基づくファミリーを補完する、計算機で生成された仮説的なタンパク質ファミリーの集合である。Pfam-Bファミリーは、非常に高速なシーケンスクラスタリングツールである双方向MMseqs2クラスタリングを基盤としており、Pfamの主要なリリースごとに再計算されているが、他のシーケンスへの転用は容易ではない。もう1つの広く使用されているクラスタリングツールはCD-HITで、MMseqs2と同様に、より長いシーケンスのgreedy incremental clusteringを採用することで速度を優先している。しかし、MMseqs2とCD-HITはプロファイルHMM手法に比べて感度を犠牲にし、追加のシーケンスにファミリー注釈を転送する際にもいくつかの課題を抱えている。したがって、大規模で継続的に拡大するシーケンスデータセットからタンパク質ファミリーを生成し維持するための、効率的でスケーラブルなソリューションが求められている。proteinfamiliesパイプラインは、シーケンスのクラスタリング、タンパク質ファミリーレベルのモデル、アラインメント、メタデータの生成、重複の除去、および新たなシーケンスが追加されるにつれてファミリーを更新するモジュールを連鎖させることで、これらの課題を解決する。

引用

nf-core/proteinfamilies: A scalable pipeline for the generation of protein families

Evangelos Karatzas,  Martin Beracochea,  A. Baltoumas,  Eleni Aplakidou,  Lorna Richardson,  James A. Fellows Yates,  Daniel Lundin, nf-core community,  Aydin Buluc,  Nikos Kyrpides,  Ilias Georgakopoulos-Soares,  Georgios A. Pavlopoulos,  Robert D. Finn

bioRixv, Posted August 16, 2025.

 

*1 javaを11から17に更新した

sudo apt update
sudo apt install openjdk-17-jdk

java -version

export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64

export PATH=$JAVA_HOME/bin:$PATH

java -version

 

#nextflow最新版

curl -fsSL https://get.nextflow.io | bash
./nextflow -version

=> パスの通ったディレクトリに移動