Run-blast.pl
This script was used for performing blast search.
Source
<source lang="perl">
- !/usr/bin/perl -w
- File: run-blast.pl
- Description:
- run blast for given query sequence over big_80 database
- result will be printed out
- Usage:
- run-blast.pl query.fasta [blastp|psiblast]
use strict;
use constant DATABASE => '/mnt/project/pracstrucfunc13/data/big/big_80';
my ($query, $program, $output_type) = ($ARGV[0], undef, undef);
- parse command line
while ( (my $param = shift @ARGV) ) { if ($param eq '-p') { $program = shift @ARGV; next; }
if ($param eq '-m') { $output_type = shift; next; } } !$program && ($program = 'blastp');
- TSV output format, without alignment strings
!defined($output_type) && ($output_type = 9);
- warn "Query:\t$query\n";
- warn "Program:\t$program\n";
- warn "Output:\t$output_type\n";
- call blastall with given parameters. -b 200000 means maximal number of database
- sequence to be shown
if ($query && -f $query) { exec "blastall -p $program -d ".DATABASE." -i $query -m $output_type -b 200000"; } else { #query file is missing, print warning message and show help info warn "Error: Query file is missing!\n"; warn "Run blast for given query file against big_80 protein sequence database Usage: run-blast <query.fasta> -p [blastp|psiblast] -m [0-11] Parameters: -p Program to be used for blast (blastp or psiblast) -m Output format (0 - 11, default is 9). Please consult manual for blastall for details.\n"; exit 1; }
__END__
=head1 run-blast.pl
Run blast for given query file against big_80 protein sequence database
=head2 Usage
run-blast <query.fasta> -p [blastp|psiblast] -m [0-11]
=head2 Parameters
=over 4
=item -p Program to be used for blast (blastp or psiblast)
=item -m Output format (0 - 11, default is 9). Please consult manual for blastall for details.
=back </source>