配列解析 NCBI BLAST+ を EC2(Ubuntu 20.04)にセットアップして解析処理を走らせてみた

2022.09.05

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

NCBI BLAST+ のセットアップ方法と実行方法を検証する機会がありました。TogoTV で公開されている以下の動画を参考に EC2(Ubuntu 20.04)で BLAST+ をやってみた記録です。BLAST+ 実行時エラーの解消方法も備忘録として載せています。

NCBI BLAST とは

以下のサイトでわかりやすく説明されていましたのでご参照ください。

BLAST | NCBI blast+ のインストールと設定 (Linux, Mac, Win)

BLAST+ セットアップ

以下を参考に BLAST+ の実行環境を作成します。OS は Ubuntu 20.04 を使用します。

NCBI BLAST+ を使って 自分のコンピュータでBLAST検索をする〜導入・準備編 (MacOS版)〜 | TogoTV

セットアップ

以下のリンクに Linux 用のバイナリファイルが用意されていました。現時点での最新版(2.13.0)をダウンロードします。

Index of /blast/executables/blast+/LATEST

$ wget https://ftp.ncbi.nlm.nih.gov/blast/executables/blast+/LATEST/ncbi-blast-2.13.0+-x64-linux.tar.gz
$ tar xvf ncbi-blast-2.13.0+-x64-linux.tar.gz

展開したフォルダをホームディレクトリ配下にblastディレクトリを作成して移動しました。

$ mkdir ~/blast
$ mv ncbi-blast-2.13.0+ ~/blast/

blast のコマンドを楽に実行するために PATH を通しておきます。.profileに以下を追記しました。

~/.profile

PATH="$PATH:$HOME/blast/ncbi-blast-2.13.0+/bin"

反映させます。

$ source ~/.profile

blastディレクトリ配下に後々必要となるディレクトリを作成しておきます。

$ mkdir ~/blast/db ~/blast/fasta ~/blast/output

以上でセットアップは完了です。バイナリファイルをダウンロードするだけでした。

データベース取得

BLAST+ ではインプットファイルを指定したデータベースから検索して似た配列の情報を出力してくれます。その検索先となるとデータベースをダウンロードしてローカルに保存しておきます。

update_blastdb.pl --showallでダウンロードできるデータベース名を確認できます。

$ update_blastdb.pl --showall
Connected to AWS
16S_ribosomal_RNA
18S_fungal_sequences
28S_fungal_sequences
Betacoronavirus
GCF_000001405.39_top_level
GCF_000001635.27_top_level
ITS_RefSeq_Fungi
ITS_eukaryote_sequences
LSU_eukaryote_rRNA
LSU_prokaryote_rRNA
SSU_eukaryote_rRNA
env_nr
env_nt
landmark
mito
nr
nt
pataa
patnt
pdbaa
pdbnt
ref_euk_rep_genomes
ref_prok_rep_genomes
ref_viroids_rep_genomes
ref_viruses_rep_genomes
refseq_protein
refseq_rna
refseq_select_prot
refseq_select_rna
split-cdd
swissprot
taxdb
tsa_nr
tsa_nt

Index of /blast/db

update_blastdb.plの引数にデータベース名を与え、対象のデータベースをダウンロードします。

The pre-formatted BLAST databases are archived in this directory. The names of the available databases are listed at https://github.com/ncbi/blast_plus_docs#blast-databases
It is recommended to use update_blastdb.pl to download databases from the FTP site in order to make sure that all volumes are downloaded.

https://ftp.ncbi.nlm.nih.gov/blast/db/README

今回は16S_ribosomal_RNAデータベースをダウンロードします。どうやら AWS にデータベースのデータが保存されているようです。プロンプトが返ってきたらダウンロード完了です。

$ update_blastdb.pl 16S_ribosomal_RNA
Connected to AWS

$ ls -lh
total 183M
-rw-rw-r-- 1 ubuntu ubuntu 1.2M Sep  1 22:53 16S_ribosomal_RNA.ndb
-rw-rw-r-- 1 ubuntu ubuntu 3.4M Sep  1 22:53 16S_ribosomal_RNA.nhr
-rw-rw-r-- 1 ubuntu ubuntu 267K Sep  1 22:53 16S_ribosomal_RNA.nin
-rw-rw-r-- 1 ubuntu ubuntu 178K Sep  1 22:53 16S_ribosomal_RNA.nnd
-rw-rw-r-- 1 ubuntu ubuntu  756 Sep  1 22:53 16S_ribosomal_RNA.nni
-rw-rw-r-- 1 ubuntu ubuntu  89K Sep  1 22:53 16S_ribosomal_RNA.nog
-rw-rw-r-- 1 ubuntu ubuntu 444K Sep  1 22:53 16S_ribosomal_RNA.nos
-rw-rw-r-- 1 ubuntu ubuntu 267K Sep  1 22:53 16S_ribosomal_RNA.not
-rw-rw-r-- 1 ubuntu ubuntu 8.0M Sep  1 22:53 16S_ribosomal_RNA.nsq
-rw-rw-r-- 1 ubuntu ubuntu 596K Sep  1 22:53 16S_ribosomal_RNA.ntf
-rw-rw-r-- 1 ubuntu ubuntu 157K Sep  1 22:53 16S_ribosomal_RNA.nto
-rw-rw-r-- 1 ubuntu ubuntu 152M Sep  2 01:41 taxdb.btd
-rw-rw-r-- 1 ubuntu ubuntu  16M Sep  2 01:41 taxdb.bti

データベースの準備完了です。複数のデータベースから検索もできますが今回は16S_ribosomal_RNAを対象に検索します。

解析処理を実行してみる

以下を参考に BLAST+ の解析処理を実行します。

NCBI BLAST+ を使って自分のコンピュータでBLAST検索をする ~実行編 (MacOS版)~ | TogoTV

サンプルシーケンスのダウンロード

大腸菌(Escherichia coli)と、バチルス セレウス(Bacillus cereus)のリファレンス配列をテスト解析のインプットファイルとして利用します。インプットファイルで必要になる FASTA ファイルをダウンロードします。

上記リンクから FASTA ファイルをダウンロードできます。以下のキャプチャは Escherichia coli の FASTAファイルをダウンロード時の画面です。

解説動画のなかで2つのファイルを結合していたので結合しました。

$ cat sequence.fasta sequence\ \(1\).fasta > test-sequence.fasta

小さなFASTAファイルだったため文字列をコピペして EC2 で新規ファイルを作成しました。大きなファイルの場合は rsync や、S3 経由で転送すると良いでしょう。

$ pwd
/home/ubuntu/blast/fasta

$ ls -lh
total 4.0K
-rw-rw-r-- 1 ubuntu ubuntu 3.3K Sep  4 09:39 test-sequence.fasta

blastn 実行(解析処理)

blastnコマンドはクエリ、データベースがともに塩基配列のときに使うコマンドです。blastpはクエリ、データベースともにアミノ酸配列のときに使ったりと組み合わせに使用するコマンドが変わってきます。

$ pwd
/home/ubuntu/blast

$ blastn -query ./fasta/test-sequence.fasta -db ./db/16S_ribosomal_RNA -out ./output/test-result.out

秒で解析が終了しました。

  • Database 使用したデータベース名
  • E Value 値が低いほど類似性が高い

test-result.out

BLASTN 2.13.0+

Reference: Zheng Zhang, Scott Schwartz, Lukas Wagner, and Webb
Miller (2000), "A greedy algorithm for aligning DNA sequences", J
Comput Biol 2000; 7(1-2):203-14.

Database: 16S ribosomal RNA (Bacteria and Archaea type strains)
           22,705 sequences; 32,993,098 total letters

Query= NC_000913.3:c3428762-3427221 Escherichia coli str. K-12 substr.
MG1655, complete genome

Length=1542
                                                                      Score     E
Sequences producing significant alignments:                          (Bits)  Value

NR_074902.1 Escherichia fergusonii ATCC 35469 16S ribosomal RNA, ...  2809    0.0
NR_104826.1 Shigella sonnei strain CECT 4887 16S ribosomal RNA, p...  2782    0.0
NR_104901.1 Shigella boydii strain P288 16S ribosomal RNA, partia...  2765    0.0
NR_026331.1 Shigella flexneri strain ATCC 29903 16S ribosomal RNA...  2721    0.0
NR_025569.1 Escherichia albertii strain Albert 19982 16S ribosoma...  2715    0.0
NR_027549.1 Escherichia fergusonii ATCC 35469 16S ribosomal RNA, ...  2684    0.0
... snip ...

指定したデータベースの中から似た配列を検索して結果を出力してくれました。解析にかけたインプットファイルはリファレンス配列でしたけど、本来はお手持ちの解析したいデータを対象にデータベースから検索をかけるものと思われます。

今回の検証目的

AWS ParallelCluster で BLAST を実行する場合、コンピュートノードで必要になるセットアップと、どのようなワークロードなのか事前に把握したく EC2 で動かしてみました。

  • セットアップはバイナリファイルがあれば済む
  • 実行オプション-num_threadsで CPU 数指定して全コア使い切りたい
  • ダウンロードするデータベースのサイズ、数よってディスクサイズを検討
  • BLASTを実行した1台のインスタンスからデータベースへアクセスする
    • 確認できていないだけで並列分散実行するオプションがあるかもしれないです

オプション確認様に BLAST 2.13.0+ のヘルプコマンドの出力結果

折りたたみ

blastn 1=の実行結果

USAGE
  blastn [-h] [-help] [-import_search_strategy filename]
    [-export_search_strategy filename] [-task task_name] [-db database_name]
    [-dbsize num_letters] [-gilist filename] [-seqidlist filename]
    [-negative_gilist filename] [-negative_seqidlist filename]
    [-taxids taxids] [-negative_taxids taxids] [-taxidlist filename]
    [-negative_taxidlist filename] [-entrez_query entrez_query]
    [-db_soft_mask filtering_algorithm] [-db_hard_mask filtering_algorithm]
    [-subject subject_input_file] [-subject_loc range] [-query input_file]
    [-out output_file] [-evalue evalue] [-word_size int_value]
    [-gapopen open_penalty] [-gapextend extend_penalty]
    [-perc_identity float_value] [-qcov_hsp_perc float_value]
    [-max_hsps int_value] [-xdrop_ungap float_value] [-xdrop_gap float_value]
    [-xdrop_gap_final float_value] [-searchsp int_value]
    [-sum_stats bool_value] [-penalty penalty] [-reward reward] [-no_greedy]
    [-min_raw_gapped_score int_value] [-template_type type]
    [-template_length int_value] [-dust DUST_options]
    [-filtering_db filtering_database]
    [-window_masker_taxid window_masker_taxid]
    [-window_masker_db window_masker_db] [-soft_masking soft_masking]
    [-ungapped] [-culling_limit int_value] [-best_hit_overhang float_value]
    [-best_hit_score_edge float_value] [-subject_besthit]
    [-window_size int_value] [-off_diagonal_range int_value]
    [-use_index boolean] [-index_name string] [-lcase_masking]
    [-query_loc range] [-strand strand] [-parse_deflines] [-outfmt format]
    [-show_gis] [-num_descriptions int_value] [-num_alignments int_value]
    [-line_length line_length] [-html] [-sorthits sort_hits]
    [-sorthsps sort_hsps] [-max_target_seqs num_sequences]
    [-num_threads int_value] [-mt_mode int_value] [-remote] [-version]

DESCRIPTION
   Nucleotide-Nucleotide BLAST 2.13.0+

OPTIONAL ARGUMENTS
 -h
   Print USAGE and DESCRIPTION;  ignore all other parameters
 -help
   Print USAGE, DESCRIPTION and ARGUMENTS; ignore all other parameters
 -version
   Print version number;  ignore other arguments

 *** Input query options
 -query <File_In>
   Input file name
   Default = `-'
 -query_loc <String>
   Location on the query sequence in 1-based offsets (Format: start-stop)
 -strand <String, `both', `minus', `plus'>
   Query strand(s) to search against database/subject
   Default = `both'

 *** General search options
 -task <String, Permissible values: 'blastn' 'blastn-short' 'dc-megablast'
                'megablast' 'rmblastn' >
   Task to execute
   Default = `megablast'
 -db <String>
   BLAST database name
    * Incompatible with:  subject, subject_loc
 -out <File_Out, file name length < 256>
   Output file name
   Default = `-'
 -evalue <Real>
   Expectation value (E) threshold for saving hits
   Default = `10'
 -word_size <Integer, >=4>
   Word size for wordfinder algorithm (length of best perfect match)
 -gapopen <Integer>
   Cost to open a gap
 -gapextend <Integer>
   Cost to extend a gap
 -penalty <Integer, <=0>
   Penalty for a nucleotide mismatch
 -reward <Integer, >=0>
   Reward for a nucleotide match
 -use_index <Boolean>
   Use MegaBLAST database index
   Default = `false'
 -index_name <String>
   MegaBLAST database index name (deprecated; use only for old style indices)

 *** BLAST-2-Sequences options
 -subject <File_In>
   Subject sequence(s) to search
    * Incompatible with:  db, gilist, seqidlist, negative_gilist,
   negative_seqidlist, taxids, taxidlist, negative_taxids, negative_taxidlist,
   db_soft_mask, db_hard_mask
 -subject_loc <String>
   Location on the subject sequence in 1-based offsets (Format: start-stop)
    * Incompatible with:  db, gilist, seqidlist, negative_gilist,
   negative_seqidlist, taxids, taxidlist, negative_taxids, negative_taxidlist,
   db_soft_mask, db_hard_mask, remote

 *** Formatting options
 -outfmt <String>
   alignment view options:
     0 = Pairwise,
     1 = Query-anchored showing identities,
     2 = Query-anchored no identities,
     3 = Flat query-anchored showing identities,
     4 = Flat query-anchored no identities,
     5 = BLAST XML,
     6 = Tabular,
     7 = Tabular with comment lines,
     8 = Seqalign (Text ASN.1),
     9 = Seqalign (Binary ASN.1),
    10 = Comma-separated values,
    11 = BLAST archive (ASN.1),
    12 = Seqalign (JSON),
    13 = Multiple-file BLAST JSON,
    14 = Multiple-file BLAST XML2,
    15 = Single-file BLAST JSON,
    16 = Single-file BLAST XML2,
    17 = Sequence Alignment/Map (SAM),
    18 = Organism Report

   Options 6, 7, 10 and 17 can be additionally configured to produce
   a custom format specified by space delimited format specifiers,
   or in the case of options 6, 7, and 10, by a token specified
   by the delim keyword. E.g.: "17 delim=@ qacc sacc score".
   The delim keyword must appear after the numeric output format
   specification.
   The supported format specifiers for options 6, 7 and 10 are:
            qseqid means Query Seq-id
               qgi means Query GI
              qacc means Query accesion
           qaccver means Query accesion.version
              qlen means Query sequence length
            sseqid means Subject Seq-id
         sallseqid means All subject Seq-id(s), separated by a ';'
               sgi means Subject GI
            sallgi means All subject GIs
              sacc means Subject accession
           saccver means Subject accession.version
           sallacc means All subject accessions
              slen means Subject sequence length
            qstart means Start of alignment in query
              qend means End of alignment in query
            sstart means Start of alignment in subject
              send means End of alignment in subject
              qseq means Aligned part of query sequence
              sseq means Aligned part of subject sequence
            evalue means Expect value
          bitscore means Bit score
             score means Raw score
            length means Alignment length
            pident means Percentage of identical matches
            nident means Number of identical matches
          mismatch means Number of mismatches
          positive means Number of positive-scoring matches
           gapopen means Number of gap openings
              gaps means Total number of gaps
              ppos means Percentage of positive-scoring matches
            frames means Query and subject frames separated by a '/'
            qframe means Query frame
            sframe means Subject frame
              btop means Blast traceback operations (BTOP)
            staxid means Subject Taxonomy ID
          ssciname means Subject Scientific Name
          scomname means Subject Common Name
        sblastname means Subject Blast Name
         sskingdom means Subject Super Kingdom
           staxids means unique Subject Taxonomy ID(s), separated by a ';'
                         (in numerical order)
         sscinames means unique Subject Scientific Name(s), separated by a ';'
         scomnames means unique Subject Common Name(s), separated by a ';'
        sblastnames means unique Subject Blast Name(s), separated by a ';'
                         (in alphabetical order)
        sskingdoms means unique Subject Super Kingdom(s), separated by a ';'
                         (in alphabetical order)
            stitle means Subject Title
        salltitles means All Subject Title(s), separated by a '<>'
           sstrand means Subject Strand
             qcovs means Query Coverage Per Subject
           qcovhsp means Query Coverage Per HSP
            qcovus means Query Coverage Per Unique Subject (blastn only)
   When not provided, the default value is:
   'qaccver saccver pident length mismatch gapopen qstart qend sstart send
   evalue bitscore', which is equivalent to the keyword 'std'
   The supported format specifier for option 17 is:
                SQ means Include Sequence Data
                SR means Subject as Reference Seq
   Default = `0'
 -show_gis
   Show NCBI GIs in deflines?
 -num_descriptions <Integer, >=0>
   Number of database sequences to show one-line descriptions for
   Not applicable for outfmt > 4
   Default = `500'
    * Incompatible with:  max_target_seqs
 -num_alignments <Integer, >=0>
   Number of database sequences to show alignments for
   Default = `250'
    * Incompatible with:  max_target_seqs
 -line_length <Integer, >=1>
   Line length for formatting alignments
   Not applicable for outfmt > 4
   Default = `60'
 -html
   Produce HTML output?
 -sorthits <Integer, (>=0 and =<4)>
   Sorting option for hits:
   alignment view options:
     0 = Sort by evalue,
     1 = Sort by bit score,
     2 = Sort by total score,
     3 = Sort by percent identity,
     4 = Sort by query coverage
   Not applicable for outfmt > 4
 -sorthsps <Integer, (>=0 and =<4)>
   Sorting option for hps:
     0 = Sort by hsp evalue,
     1 = Sort by hsp score,
     2 = Sort by hsp query start,
     3 = Sort by hsp percent identity,
     4 = Sort by hsp subject start
   Not applicable for outfmt != 0

 *** Query filtering options
 -dust <String>
   Filter query sequence with DUST (Format: 'yes', 'level window linker', or
   'no' to disable)
   Default = `20 64 1'
 -filtering_db <String>
   BLAST database containing filtering elements (i.e.: repeats)
 -window_masker_taxid <Integer>
   Enable WindowMasker filtering using a Taxonomic ID
 -window_masker_db <String>
   Enable WindowMasker filtering using this repeats database.
 -soft_masking <Boolean>
   Apply filtering locations as soft masks
   Default = `true'
 -lcase_masking
   Use lower case filtering in query and subject sequence(s)?

 *** Restrict search or results
 -gilist <String>
   Restrict search of database to list of GIs
    * Incompatible with:  seqidlist, taxids, taxidlist, negative_gilist,
   negative_seqidlist, negative_taxids, negative_taxidlist, remote, subject,
   subject_loc
 -seqidlist <String>
   Restrict search of database to list of SeqIDs
    * Incompatible with:  gilist, taxids, taxidlist, negative_gilist,
   negative_seqidlist, negative_taxids, negative_taxidlist, remote, subject,
   subject_loc
 -negative_gilist <String>
   Restrict search of database to everything except the specified GIs
    * Incompatible with:  gilist, seqidlist, taxids, taxidlist,
   negative_seqidlist, negative_taxids, negative_taxidlist, remote, subject,
   subject_loc
 -negative_seqidlist <String>
   Restrict search of database to everything except the specified SeqIDs
    * Incompatible with:  gilist, seqidlist, taxids, taxidlist,
   negative_gilist, negative_taxids, negative_taxidlist, remote, subject,
   subject_loc
 -taxids <String>
   Restrict search of database to include only the specified taxonomy IDs
   (multiple IDs delimited by ',')
    * Incompatible with:  gilist, seqidlist, taxidlist, negative_gilist,
   negative_seqidlist, negative_taxids, negative_taxidlist, remote, subject,
   subject_loc
 -negative_taxids <String>
   Restrict search of database to everything except the specified taxonomy IDs
   (multiple IDs delimited by ',')
    * Incompatible with:  gilist, seqidlist, taxids, taxidlist,
   negative_gilist, negative_seqidlist, negative_taxidlist, remote, subject,
   subject_loc
 -taxidlist <String>
   Restrict search of database to include only the specified taxonomy IDs
    * Incompatible with:  gilist, seqidlist, taxids, negative_gilist,
   negative_seqidlist, negative_taxids, negative_taxidlist, remote, subject,
   subject_loc
 -negative_taxidlist <String>
   Restrict search of database to everything except the specified taxonomy IDs
    * Incompatible with:  gilist, seqidlist, taxids, taxidlist,
   negative_gilist, negative_seqidlist, negative_taxids, remote, subject,
   subject_loc
 -entrez_query <String>
   Restrict search with the given Entrez query
    * Requires:  remote
 -db_soft_mask <String>
   Filtering algorithm ID to apply to the BLAST database as soft masking
    * Incompatible with:  db_hard_mask, subject, subject_loc
 -db_hard_mask <String>
   Filtering algorithm ID to apply to the BLAST database as hard masking
    * Incompatible with:  db_soft_mask, subject, subject_loc
 -perc_identity <Real, 0..100>
   Percent identity
 -qcov_hsp_perc <Real, 0..100>
   Percent query coverage per hsp
 -max_hsps <Integer, >=1>
   Set maximum number of HSPs per subject sequence to save for each query
 -culling_limit <Integer, >=0>
   If the query range of a hit is enveloped by that of at least this many
   higher-scoring hits, delete the hit
    * Incompatible with:  best_hit_overhang, best_hit_score_edge
 -best_hit_overhang <Real, (>0 and <0.5)>
   Best Hit algorithm overhang value (recommended value: 0.1)
    * Incompatible with:  culling_limit
 -best_hit_score_edge <Real, (>0 and <0.5)>
   Best Hit algorithm score edge value (recommended value: 0.1)
    * Incompatible with:  culling_limit
 -subject_besthit
   Turn on best hit per subject sequence
 -max_target_seqs <Integer, >=1>
   Maximum number of aligned sequences to keep
   (value of 5 or more is recommended)
   Default = `500'
    * Incompatible with:  num_descriptions, num_alignments

 *** Discontiguous MegaBLAST options
 -template_type <String, `coding', `coding_and_optimal', `optimal'>
   Discontiguous MegaBLAST template type
    * Requires:  template_length
 -template_length <Integer, Permissible values: '16' '18' '21' >
   Discontiguous MegaBLAST template length
    * Requires:  template_type

 *** Statistical options
 -dbsize <Int8>
   Effective length of the database
 -searchsp <Int8, >=0>
   Effective length of the search space
 -sum_stats <Boolean>
   Use sum statistics

 *** Search strategy options
 -import_search_strategy <File_In>
   Search strategy to use
    * Incompatible with:  export_search_strategy
 -export_search_strategy <File_Out>
   File name to record the search strategy used
    * Incompatible with:  import_search_strategy

 *** Extension options
 -xdrop_ungap <Real>
   X-dropoff value (in bits) for ungapped extensions
 -xdrop_gap <Real>
   X-dropoff value (in bits) for preliminary gapped extensions
 -xdrop_gap_final <Real>
   X-dropoff value (in bits) for final gapped alignment
 -no_greedy
   Use non-greedy dynamic programming extension
 -min_raw_gapped_score <Integer>
   Minimum raw gapped score to keep an alignment in the preliminary gapped and
   traceback stages
 -ungapped
   Perform ungapped alignment only?
 -window_size <Integer, >=0>
   Multiple hits window size, use 0 to specify 1-hit algorithm
 -off_diagonal_range <Integer, >=0>
   Number of off-diagonals to search for the 2nd hit, use 0 to turn off
   Default = `0'

 *** Miscellaneous options
 -parse_deflines
   Should the query and subject defline(s) be parsed?
 -num_threads <Integer, >=1>
   Number of threads (CPUs) to use in the BLAST search
   Default = `1'
    * Incompatible with:  remote
 -mt_mode <Integer, (>=0 and =<1)>
   Multi-thread mode to use in BLAST search:
    0 (auto) split by database
    1 split by queries
   Default = `0'
    * Requires:  num_threads
 -remote
   Execute search remotely?
    * Incompatible with:  gilist, seqidlist, taxids, taxidlist,
   negative_gilist, negative_seqidlist, negative_taxids, negative_taxidlist,
   subject_loc, num_threads

エラー対応と解決方法

今回の検証で遭遇した BLAST のエラーメッセージと解決方法を紹介します。

libgomp.so.1: cannot open shared object file

blastnで解析実行時に以下のエラーが表示されました

blastn: error while loading shared libraries: libgomp.so.1: cannot open shared object file: No such file or directory

libgomp1をインストールして解消しました。

$ sudo apt-get install libgomp1

Command line argument error: Argument "query". File is not accessible:

インプットファイル名を typo してblastnを実行すると以下のエラーが表示されました。

$ blastn -query ./fasta/test-sequenve.fasta -db ./db/16S_ribosomal_RNA -out ./output/test-result.out
Command line argument error: Argument "query". File is not accessible:  `./fasta/test-sequenve.fasta'

インプットファイルの FASTA ファイルになにか問題があるのかと切り分けていたのですが、ただの typo でした。

おわりに

解説動画にみながらテスト実行してみました。解析処理が早く終わって手軽だった反面、どこに負荷がかかる処理なのかわかりませんでした。ParallelCluster で実行時は検索対象のデータベースの数を増やすなどして、解析処理の負荷を高くして試してみようと思います。

Docker Hub に NCBI で管理している BLAST のイメージがありました。ちゃんとメンテナンスされているようで、2.13.0 現時点の最新版のイメージがアップされています。BioContainers では見つけられなかったのでコンテナ実行時は Docker Hub から pull して利用しようと思います。M1 Mac ユーザーとしては Arm 版のイメージはなくローカルでテストは重そうなので、これもまた ParallelCluster から AWS Batch でコンテナでの動作も確認しておきたいところです。

ncbi/blast - Docker Image | Docker Hub

参考