macでインフォマティクス

macでインフォマティクス

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

vFamsのprofileHMMsFromFASTA.pyスクリプト

 

profileHMMsFromFASTA.pyは、RefSeqのような大規模な(ウイルスの)タンパク質セットからカスタマイズされたプロファイルHMMを構築するスクリプト

 

スクリプトの<DESCRIPTION>より(一部改変)

このスクリプトは、タンパク質配列を含むFASTAファイルを入力とし、最終的にプロファイルHMMを構築するために使用できます。冗長な配列は折りたたまれ、all-by-allでBLASTされます。BLASTの結果はMCLの入力として使用され、関連する配列のクラスタが生成されます。これらの配列クラスタはさらにフィルタリングできます(極端に短い配列の削除など)。各クラスタに対して多重整列アライメントが生成され、MSA を hmmbuild に入力し、得られた profile-HMM を連結することで HMMER3 互換のプロファイル HMM に連結されます。

 

VFams

https://derisilab.ucsf.edu/software/vFam/

 

インストール

condaでpython2.7の環境を作って依存するツールを導入した。

#conda(link)
mamba create -n VFams python=2.7 -y
conda activate VFams
mamba install -c bioconda cd-hit -y
mamba conda install -c bioconda mcl -y
mamba install -c bioconda hmmer -y
mamba install -c bioconda muscle -y

> python profileHMMsFromFASTA.py

$ python profileHMMsFromFASTA.py 

You must provide a FASTA file!

 

SCRIPT:  profileHMMsFromFASTA.py

AUTHOR:  Peter Skewes-Cox

UPDATED:  February 2014

 

DESCRIPTION:

This script takes as input a FASTA file containing protein

sequences from which profile-HMMs are ultimately built.

Redundant sequences are collapsed, and are BLASTed in

an 'all-by-all' fashion. The BLAST results are used as

input to MCL to generate clusters of related sequences. These

sequence clusters can be filtered further, and multiple

sequence alignments are generated for each cluster. The MSAs

are input into hmmbuild, and the resulting profile-HMMs are

concatenated into a single HMMER3-compatible profile-HMM.

 

USAGE:

  profileHMMsFromFASTA.py -f <FASTA> [-m <#>] [-p <#>] [-c <#>] [-C] [-I <#>] [-n <#>] [-a <#>] [-o <string>] [-h]

 

OPTIONS:

  -f      FASTA file sequences from which to generate clusters

  -m      minimum sequence length [default = 1]

  -p      minumum fraction identity for initial sequence collapsing [default = 1.0]

  -c      minimum fraction coverage for initial sequence collapsing [default = 0.0]

  -C      impose fraction coverage heuristics for inclusion of sequences in MSAs

  -I      inflation number for cluster expansion in mcl [default = 2.0]

  -n      minimum number of sequences allowed in a MSA [default = 2]

  -a      number of cores on which to run all processes [default = 8]

  -o      output prefix for cluster names (default based on filename)

  -h      print help message

 

 

 

多重整列のために使用されるMUSCLEは、最新のMUSCLE v5でコマンドのオプション名が、入力ファイルを指定する”-align”と、出力名を指定する”-output”にそれぞれ変わっている。profileHMMsFromFASTA.pyの535行目をその通りに直した。

 

 

実行方法

入力ファイルと出力prefixを指定する。出力を指定しないと入力ファイル名から付けられる。

python profileHMMsFromFASTA.py -f proteins.fasta -o outprefix

 

出力例

 

引用

Profile Hidden Markov Models for the Detection of Viruses within Metagenomic Sequence Data
Peter Skewes-Cox, Thomas J. Sharpton, Katherine S. Pollard, Joseph L. DeRisi 
PLoS One. 2014; 9(8): e105067.  Published online 2014 Aug 20.

 

参考

mcxload

https://micans.org/mcl/man/mcxload.html

 

関連