Method: Bio::Blast::Fastacmd#initialize

Defined in:
lib/bio/io/fastacmd.rb

#initialize(blast_database_file_path) ⇒ Fastacmd

This method provides a handle to a BLASTable database, which you can then use to retrieve sequences.

Prerequisites:

  • You have created a BLASTable database with the ‘-o T’ option.

  • You have the NCBI fastacmd tool installed.

For example, suppose the original input file looks like:

>my_seq_1
ACCGACCTCCGGAACGGATAGCCCGACCTACG
>my_seq_2
TCCGACCTTTCCTACCGCACACCTACGCCATCAC
...

and you’ve created a BLASTable database from that with the command

cd /my_dir/
formatdb -i my_input_file -t Test -n Test -o T

then you can get a handle to this database with the command

fastacmd = Bio::Blast::Fastacmd.new("/my_dir/Test")

Arguments:

  • database

    path and name of BLASTable database



81
82
83
84
# File 'lib/bio/io/fastacmd.rb', line 81

def initialize(blast_database_file_path)
  @database = blast_database_file_path
  @fastacmd = 'fastacmd'
end