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

#summary BLAST pairs of sequences in the stream against each other.

Biopiece: blast_seq_pair

Description

[blast_seq_pair] uses NCBI's bl2seq to BLAST the pairs of sequences found in the stream against each other. The sequence type of the sequences is guessed automagically, but can be specified using the -p switch (only necessary for tblastx).

Note that for blastx the first sequence should be nucleotide, and for tblastn the second sequence nucleotide.

[blast_seq_pair] emit records like the below example:

REC_TYPE: BLAST
Q_ID: test1
S_ID: test2
IDENT: 100.0
ALIGN_LEN: 20
MISMATCHES: 0
GAPS: 0
Q_BEG: 7
Q_END: 26
S_BEG: 7
S_END: 26
E_VAL: 5.0e-10
BIT_SCORE: 40.1
STRAND: +
---

Read more here:

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

Usage

... | blast_seq_pair [options]

Options

[-?           | --help]               #  Print full usage description.
[-p <string>  | --program=<string>    #  blastn|blastp|tblastn|blastx|tblastx     -  Default=guessed!
[-e <float>   | --e_val=<float>]      #  Expectation value                        -  Default=10
[-f <string>  | --filter=<string>]    #  Filter low complexity sequence (yes|no)  -  Default=no
[-w <uint>    | --word_size=<uint>]   #  BLAST word size.
[-m           | --megablast]          #  Enable megablast.
[-G           | --no_gaps]            #  Disable gapped BLAST.
[-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

Consider the following FASTA entries in the file test.fna:

>test1
CAGCACTAGCATCGACGACAGCACGCATAC
>test2
CAGCgggAGCATCGACGACAGCACGCA

In order to BLAST these against each other use [blast_seq_pair]:

read_fasta -i test.fna | blast_seq_pair         

SEQ_NAME: test1
SEQ: CAGCACTAGCATCGACGACAGCACGCATAC
SEQ_LEN: 30
---
SEQ_NAME: test2
SEQ: CAGCgggAGCATCGACGACAGCACGCA
SEQ_LEN: 27
---
REC_TYPE: BLAST
Q_ID: test1
S_ID: test2
IDENT: 100.0
ALIGN_LEN: 20
MISMATCHES: 0
GAPS: 0
Q_BEG: 7
Q_END: 26
S_BEG: 7
S_END: 26
E_VAL: 5.0e-10
BIT_SCORE: 40.1
STRAND: +
---

See also

[read_fasta]

[create_blast_index]

[blast_seq]

[write_blast]

[read_blast_tab]

Author

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

[email protected]

June 2011

License

GNU General Public License version 2

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

Help

[blast_seq_pair] is part of the Biopieces framework.

http://www.biopieces.org

Clone this wiki locally