Skip to content
Martin Asser Hansen edited this page Oct 2, 2015 · 6 revisions

Biopiece: create_blast_index

Description

create_blast_index creates a BLAST index from sequences found in the stream using formatdb from NCBI's BLAST. The sequence type is determined automagically.

NCBI BLAST/formatdb must be installed in order for create_blast_index to work.

Read more here:

ftp://ftp.ncbi.nih.gov/blast/

Usage

... | create_blast_index [options] -d <my_dir> -i <my_index>

Options

[-?          | --help]                 #  Print full usage description.
[-x          | --no_stream]            #  Do not emit records.
[-d <dir>    | --directory=<dir>]      #  Directory to cantain index files.
[-i <string> | --index_name=<string>]  #  Index name.
[-I <file!>  | --stream_in=<file!>]    #  Read input from stream file   -  Default=STDIN
[-O <file>   | --stream_out=<file>]    #  Write output to stream file   -  Default=STDOUT
[-v          | --verbose]              #  Verbose output.

Examples

To create the BLAST index from a FASTA file, do:

read_fasta -i <FASTA file(s)> | create_blast_index -d ~/my_blast_dir/ -i my_blast_index -x

Depending on the sequence type you will then get the following files:

For protein sequences:

~/my_blast_dir/my_blast_index.phr
~/my_blast_dir/my_blast_index.pin
~/my_blast_dir/my_blast_index.psq

For nucleotide sequences:

~/my_blast_dir/my_blast_index.nhr
~/my_blast_dir/my_blast_index.nin
~/my_blast_dir/my_blast_index.nsq

And finally to use this new index with blast_seq, simply do:

read_fasta -i <FASTA file(s)> | blast_seq -d ~/my_blast_dir/my_blast_index

See also

read_fasta

blast_seq

write_blast

read_blast_tab

Author

Martin Asser Hansen - Copyright (C) - All rights reserved.

mail@maasha.dk

August 2007

License

GNU General Public License version 2

http://www.gnu.org/copyleft/gpl.html

Help

create_blast_index is part of the Biopieces framework.

http://www.biopieces.org

Clone this wiki locally