LoginSignup
9
3

More than 5 years have passed since last update.

ローカル環境にInterProScan5を導入する方法

Last updated at Posted at 2017-10-26

InterProScanとは

かの有名な統合TVでは、以下のように説明されています。

InterProScanは、アミノ酸配列の特徴を複数のデータベースを対象にまとめて検索することによって、問い合わせた配列が属するタンパク質ファミリーやドメイン構成およびモチーフなどの特徴を効率的に推測することができるツールです。 興味のあるタンパク質の機能が未知であるとき、配列解析によって機能注釈を行いたいといった場面で、配列相同性検索と同様によく用いられるのがモチーフ・ドメイン検索です。InterProScanはそういった場面で用いられる最も代表的なツールです。

InterProScanでは以下のような複数のデータベースから一度に検索でき、非常に便利です。また、使い方も至って簡単で、InterProScanのWebサイトに配列をコピペして走らせるだけです。詳しくは統合TVでも説明されています。

  • CDD
  • COILS
  • Gene3D
  • HAMAP
  • MOBIDB
  • PANTHER
  • Pfam
  • PIRSF
  • PRINTS
  • ProDom
  • PROSITE
  • SFLD
  • SMART
  • SUPERFAMILY
  • TIGRFAMs

ローカルで動かしたい

とはいえど、数百個以上の配列情報や、全ゲノムレベルの配列情報を扱う場合、ブラウザ上でひとつずつコピペして解析しているのでは気が狂ってしまいそうです。そこで、ローカルの環境にインストールしてfastaファイルから解析する方法を紹介します。また、以下の方法はルート権限無しですべて実行できます。

参考

https://github.com/ebi-pf-team/interproscan/wiki
http://www.ebi.ac.uk/interpro/search/sequence-search

インストール

必要な環境

詳しくは公式wiki (Link) に非常に丁寧に説明されています。

  • 64-bit Linux
  • Perl (大体デフォルトで入っている)
  • Python 2.7.x only
    • Python3.xの人はAnacondaかなんかで仮想環境作りましょう(参考)
  • Oracle's Java JDK/JRE version 8
    • Java1.8以上でない人はOracle公式サイト (Link) からインストールしましょう
  • Environment variables set
    • $JAVA_HOME はJVMのインストールしてあるディレクトリ
    • $JAVA_HOME/bin にPATHを通す

OSはLinuxにのみ対応しており、今後MacOSやWindowsOSに対応する予定もないそうです。

InsterProScanのダウンロード

InterProScanのソフトウェアは圧縮状態で5GB、解凍したら17GBになるので相応に空いたディスクにダウンロードしてください。
64bitのLinuxでは以下のようにダウンロードできます。

mkdir my_interproscan # 適当なディレクトリを作る
cd my_interproscan

# InterProScan自体のダウンロード
wget ftp://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/5.26-65.0/interproscan-5.26-65.0-64-bit.tar.gz 

# ちゃんとダウンロードできたか確認できるやつ
wget ftp://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/5.26-65.0/interproscan-5.26-65.0-64-bit.tar.gz.md5 

# 以下のコマンドを実行するとInterProScanがちゃんとダウンロードできたか確認できる
md5sum -c interproscan-5.26-65.0-64-bit.tar.gz.md5
>>> *interproscan-5.26-65.0-64-bit.tar.gz: OK*

# 解凍
tar -pxvzf interproscan-5.26-65.0-*-bit.tar.gz

PANTHERのダウンロード

InterProScanでPANTHERを使うためにダウンロードします。PANTHERはInterProScan5ディレクトリ直下のdataというディレクトリにダウンロードする必要があります。PANTHERも12GB位あるので注意してください。

cd [InterProScan5 home]/data/

wget ftp://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/data/panther-data-12.0.tar.gz
wget ftp://ftp.ebi.ac.uk/pub/software/unix/iprscan/5/data/panther-data-12.0.tar.gz.md5

# 正しくダウンロードできたかチェック
md5sum -c panther-data-12.0.tar.gz.md5
>>> *panther-data-12.0.tar.gz: OK*

# 解凍
tar -pxvzf panther-data-12.0.tar.gz

InsterProScanを走らせる

オプションの確認

InterProScanは相対PATHになっており(多分)、InterProScanディレクトリに移動してプログラムを走らせる必要があるようです。
まず手始めに以下のコマンドを実行してちゃんと動くかとオプションの確認をします。

cd [InterProScan5 home]

./interproscan.sh
>>>
Welcome to InterProScan-5.XX-XX.X
usage: java -XX:+UseParallelGC -XX:+AggressiveOpts
            -XX:+UseFastAccessorMethods -Xms128M -Xmx2048M -jar
            interproscan-5.jar

Please give us your feedback by sending an email to

interhelp@ebi.ac.uk

 -appl,--applications <ANALYSES>            Optional, comma separated list
                                            of analyses.  If this option
                                            is not set, ALL analyses will
                                            be run.
 -b,--output-file-base <OUTPUT-FILE-BASE>   Optional, base output filename
                                            (relative or absolute path).
                                            Note that this option, the
                                            --output-dir (-d) option and
                                            the --outfile (-o) option are
                                            mutually exclusive.  The
                                            appropriate file extension for
                                            the output format(s) will be
                                            appended automatically. By
                                            default the input file
                                            path/name will be used.
 -d,--output-dir <OUTPUT-DIR>               Optional, output directory.
                                            Note that this option, the
                                            --outfile (-o) option and the
                                            --output-file-base (-b) option
                                            are mutually exclusive. The
                                            output filename(s) are the
                                            same as the input filename,
                                            with the appropriate file
                                            extension(s) for the output
                                            format(s) appended
                                            automatically .
 -dp,--disable-precalc                      Optional.  Disables use of the
                                            precalculated match lookup
                                            service.  All match
                                            calculations will be run
                                            locally.
 -dra,--disable-residue-annot               Optional, excludes sites from
                                            the XML, JSON output
 -f,--formats <OUTPUT-FORMATS>              Optional, case-insensitive,
                                            comma separated list of output
                                            formats. Supported formats are
                                            TSV, XML, JSON, GFF3, HTML and
                                            SVG. Default for protein
                                            sequences are TSV, XML and
                                            GFF3, or for nucleotide
                                            sequences GFF3 and XML.
 -goterms,--goterms                         Optional, switch on lookup of
                                            corresponding Gene Ontology
                                            annotation (IMPLIES -iprlookup
                                            option)
 -help,--help                               Optional, display help
                                            information
 -i,--input <INPUT-FILE-PATH>               Optional, path to fasta file
                                            that should be loaded on
                                            Master startup. Alternatively,
                                            in CONVERT mode, the
                                            InterProScan 5 XML file to
                                            convert.
 -iprlookup,--iprlookup                     Also include lookup of
                                            corresponding InterPro
                                            annotation in the TSV and GFF3
                                            output formats.
 -ms,--minsize <MINIMUM-SIZE>               Optional, minimum nucleotide
                                            size of ORF to report. Will
                                            only be considered if n is
                                            specified as a sequence type.
                                            Please be aware of the fact
                                            that if you specify a too
                                            short value it might be that
                                            the analysis takes a very long
                                            time!
 -o,--outfile <EXPLICIT_OUTPUT_FILENAME>    Optional explicit output file
                                            name (relative or absolute
                                            path).  Note that this option,
                                            the --output-dir (-d) option
                                            and the --output-file-base
                                            (-b) option are mutually
                                            exclusive. If this option is
                                            given, you MUST specify a
                                            single output format using the
                                            -f option.  The output file
                                            name will not be modified.
                                            Note that specifying an output
                                            file name using this option
                                            OVERWRITES ANY EXISTING FILE.
 -pa,--pathways                             Optional, switch on lookup of
                                            corresponding Pathway
                                            annotation (IMPLIES -iprlookup
                                            option)
 -t,--seqtype <SEQUENCE-TYPE>               Optional, the type of the
                                            input sequences (dna/rna (n)
                                            or protein (p)).  The default
                                            sequence type is protein.
 -T,--tempdir <TEMP-DIR>                    Optional, specify temporary
                                            file directory (relative or
                                            absolute path). The default
                                            location is temp/.
 -version,--version                         Optional, display version
                                            number

Copyright (c) EMBL European Bioinformatics Institute, Hinxton, Cambridge,
UK. (http://www.ebi.ac.uk) The InterProScan software itself is provided
under the Apache License, Version 2.0
(http://www.apache.org/licenses/LICENSE-2.0.html). Third party components
(e.g. member database binaries and models) are subject to separate
licensing - please see the individual member database websites for
details.
Available analyses:
                      TIGRFAM (XX.X) : TIGRFAMs are protein families based on Hidden Markov Models or HMMs
                         SFLD (X.X) : SFLDs are protein families based on Hidden Markov Models or HMMs
                        ProDom (XXXX.X) : ProDom is a comprehensive set of protein domain families automatically generated from the UniProt Knowledge Database.
                        Hamap (XXXXXX.XX) : High-quality Automated and Manual Annotation of Microbial Proteomes
                        SMART (X.X) : SMART allows the identification and analysis of domain architectures based on Hidden Markov Models or HMMs
                          CDD (X.XX) : Prediction of CDD domains in Proteins
              ProSiteProfiles (XX.XXX) : PROSITE consists of documentation entries describing protein domains, families and functional sites as well as associated patterns and profiles to identify them
              ProSitePatterns (XX.XXX) : PROSITE consists of documentation entries describing protein domains, families and functional sites as well as associated patterns and profiles to identify them
                  SUPERFAMILY (X.XX) : SUPERFAMILY is a database of structural and functional annotation for all proteins and genomes.
                       PRINTS (XX.X) : A fingerprint is a group of conserved motifs used to characterise a protein family
                      PANTHER (X.X) : The PANTHER (Protein ANalysis THrough Evolutionary Relationships) Classification System is a unique resource that classifies genes by their functions, using published scientific experimental evidence and evolutionary relationships to predict function even in the absence of direct experimental evidence.
                       Gene3D (X.X.X) : Structural assignment for whole genes and genomes using the CATH domain structure database
                        PIRSF (X.XX) : The PIRSF concept is being used as a guiding principle to provide comprehensive and non-overlapping clustering of UniProtKB sequences into a hierarchical order to reflect their evolutionary relationships.
                         Pfam (XX.X) : A large collection of protein families, each represented by multiple sequence alignments and hidden Markov models (HMMs)
                        Coils (X.X) : Prediction of Coiled Coil Regions in Proteins
                   MobiDBLite (X.X) : Prediction of disordered domains Regions in Proteins

Deactivated analyses:
        SignalP_GRAM_POSITIVE (X.X) : Analysis SignalP_GRAM_POSITIVE-X.X is deactivated, because the following parameters are not set in the interproscan.properties file: binary.signalp.4.0.path
                  SignalP_EUK (X.X) : Analysis SignalP_EUK-X.X is deactivated, because the following parameters are not set in the interproscan.properties file: binary.signalp.4.0.path
                      Phobius (X.XX) : Analysis Phobius-X.XX is deactivated, because the following parameters are not set in the interproscan.properties file: binary.phobius.pl.path.1.01
                        TMHMM (X.Xc) : Analysis TMHMM-X.Xc is deactivated, because the following parameters are not set in the interproscan.properties file: binary.tmhmm.path, tmhmm.model.path
        SignalP_GRAM_NEGATIVE (X.X) : Analysis SignalP_GRAM_NEGATIVE-X.X is deactivated, because the following parameters are not set in the interproscan.properties file: binary.signalp.4.0.path

テストラン

InterProScanにはテスト用のfastaファイルが用意されているのでそれを使ってテストランをしてみます。

./interproscan.sh -i test_proteins.fasta -f tsv

これを実行すると
test_proteins.fasta.tsv
というファイルができるはずです。

エラーがでまくる人へ (トラブルシューティング)

InterProScanはコンパイル済みでダウンロードする仕様になっているので、ちょっと古い環境を使っている人や、Root権限を持ってない人にはたくさんエラーがでるとおもいます。InterProScan wiki Linkを参考にして、自分の環境でコンパイルし直すとエラー回避できる場合もあります。
以下に参考までに私が遭遇したエラーとその改善方法を示します。

rpsblastのエラー

以下のようなエラーが出る人向け

Error output from binary:
bin/blast/ncbi-blast-2.6.0+/rpsblast: error while loading shared libraries: libgnutls.so.28: cannot open shared object file: No such file or directory

もしくは

ERROR - Execution thrown when attempting to executeInTransaction the StepExecution. All database activity rolled back.
java.lang.IllegalStateException: IOException thrown when attempting to run binary

解決策その1: ebiから古いバージョンをダウンロードする

ebiのGithubのページのリリースノート (Link) より、古いライブラリでコンパイルしたものが配布されているのでそれをダウンロードします。

wget ftp://ftp.ebi.ac.uk/pub/databases/interpro/iprscan/5/bin/rh6/rpsblast_binary.zip
unzip rpsblast_binary.zip
# 一応元のバージョンもどこかに保管しておいたほうが無難です
cp rpsblast <interproscan_install_dir>bin/blast/ncbi-blast-2.3.0+/
cp rpsbproc <interproscan_install_dir>bin/blast/ncbi-blast-2.3.0+/

僕の場合、ダウンロードしたものに実行権が付与されておらず、微妙にハマったので念のため確認しておくと良いと思います。

ls -l
>>> -rwxr-xr-x  rpsblast
>>> -rwxr-xr-x  rpsbproc
# 自分のところにxがついているか確認しなかったら chmod +x で実行権を付与する

解決策その2: 自分の環境でコンパイルし直す

それでもだめならInterProScan wiki (Link) のとおりにコンパイルし直します。
C++のコンパイラが4.8以上でないとうまくいかないので以下のコマンドで確認してください。

c++ --version

4.8以上であった場合はこのまま続けてください。それ未満のバージョンであった場合にはコンパイラのバージョンを上げてください。

mkdir cddblast # 適当なディレクトリを作る
cd cddblast
wget ftp://ftp.ncbi.nih.gov/blast/executables/LATEST/ncbi-blast-2.6.0+-src.tar.gz
wget ftp://ftp.ncbi.nih.gov/blast/executables/LATEST/ncbi-blast-2.6.0+-src.tar.gz.md5
md5sum -c ncbi-blast-2.6.0+-src.tar.gz.md5
>>> "ncbi-blast-2.6.0+-src.tar.gz: OK" if download successful

tar xvzf ncbi-blast-2.6.0+-src.tar.gz
cd ncbi-blast-2.6.0+-src/c++/src/app/
wget -r --no-parent -l 1 -np -nd -nH -P rpsbproc ftp://ftp.ncbi.nih.gov/pub/mmdb/cdd/rpsbproc/rpsbproc-src/

# c++ディレクトリのMakefile.inをエディタで開き、SUB_PROJ 以下を下の様になるように編集してください。
# SUB_PROJ = blast rpsbproc

cd ../../
./configure
/usr/bin/make
# コンパイルに結構時間かかります
cp ReleaseMT/bin/rpsblast <interproscan_install_dir>/bin/blast/ncbi-blast-2.6.0+/
cp ReleaseMT/bin/rpsbproc <interproscan_install_dir>/bin/blast/ncbi-blast-2.6.0+/

libc.so.6のエラー

以下のようなエラーが出る人向け

Error output from binary:
bin/sfld/sfld_postprocess: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by bin/sfld/sfld_postprocess)

システムのglibcライブラリが古いため起こっていると思われます。以下のようにebiが配布している古いバージョンでコンパイルしたsfldをダウンロードし、元のものと置き換えてください。また、元のsfldも念のため保管しておいたほうが安全と思います。

wget ftp://ftp.ebi.ac.uk/pub/databases/interpro/iprscan/5/bin/rh6/sfld_binary.zip

unzip sfld_binary.zip
cp sfld_postprocess  <interproscan_install_dir>/bin
cp sfld_preprocess   <interproscan_install_dir>/bin

同じく実行権があるか確認してください。

Gene3Dのエラー

InterProScanのWiki (Link)より、以下の方法が提示されています。

For Gene3D copy the following binary (https://github.com/UCLOrengoGroup/cath-tools/releases/download/v0.12.26/cath-resolve-hits.centos6) into bin/gene3d/4.1.0/ and rename it to bin/gene3d/4.1.0/cath-resolve-hits. Further add the following to the interproscan.properties file : cath.resolve.hits.switches.gene3d=--input-format=hmmer_domtblout

おわりに

スーパーコンピューター上にインストールしたかったため、自分がスーパーユーザーでない状態での導入となり、わりとハマったのでトラブルシュートを中心に書きました。
今後このデータと系統解析のデータをつかってモチーフ・ドメイン解析をしていく予定なので、ハマったらまた別の記事にしようと思います。便利・面白いツールなどあったら教えてください。

9
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
3