hai wrote a code for doing BLAST as follows
#!/usr/local/bin/perl
use strict;
use warnings;
# Usage information
die "Usage: $0 <input_fasata > <gene_lenght> <output_file>\n ", if (@ARGV != 3);
my ($infile,$ln,$o utfile) = @ARGV;
print "running BLAST ...";
system("blastal l -p blastn -d aa.fna -i $infile -o blastout -m8");
print "Parsing the BLAST result ...";
Next i want to sort blastout file based on the gene length
example
protein_id=BAC5 8264.1 CP014046.1 100.00 435 0 0 1 435 804117 804551 0.0 862
protein_id=BAC5 8264.1 CP014046.1 100.00 16 0 0 357 372 444601 444586 3.9 32.2
protein_id=BAC5 8264.1 BA000031.2 100.00 435 0 0 1 435 805 371 0.0 862
if user inputted 435 as gene length
desirable out put is
protein_id=BAC5 8264.1 CP014046.1 100.00 435 0 0 1 435 804117 804551 0.0 862
protein_id=BAC5 8264.1 BA000031.2 100.00 435 0 0 1 435 805 371 0.0 862
#!/usr/local/bin/perl
use strict;
use warnings;
# Usage information
die "Usage: $0 <input_fasata > <gene_lenght> <output_file>\n ", if (@ARGV != 3);
my ($infile,$ln,$o utfile) = @ARGV;
print "running BLAST ...";
system("blastal l -p blastn -d aa.fna -i $infile -o blastout -m8");
print "Parsing the BLAST result ...";
Next i want to sort blastout file based on the gene length
example
protein_id=BAC5 8264.1 CP014046.1 100.00 435 0 0 1 435 804117 804551 0.0 862
protein_id=BAC5 8264.1 CP014046.1 100.00 16 0 0 357 372 444601 444586 3.9 32.2
protein_id=BAC5 8264.1 BA000031.2 100.00 435 0 0 1 435 805 371 0.0 862
if user inputted 435 as gene length
desirable out put is
protein_id=BAC5 8264.1 CP014046.1 100.00 435 0 0 1 435 804117 804551 0.0 862
protein_id=BAC5 8264.1 BA000031.2 100.00 435 0 0 1 435 805 371 0.0 862
Comment