473,394 Members | 1,852 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

sortting of blast output in perl programme

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,$outfile) = @ARGV;
print "running BLAST ...";
system("blastall -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=BAC58264.1 CP014046.1 100.00 435 0 0 1 435 804117 804551 0.0 862
protein_id=BAC58264.1 CP014046.1 100.00 16 0 0 357 372 444601 444586 3.9 32.2
protein_id=BAC58264.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=BAC58264.1 CP014046.1 100.00 435 0 0 1 435 804117 804551 0.0 862
protein_id=BAC58264.1 BA000031.2 100.00 435 0 0 1 435 805 371 0.0 862
Sep 17 '16 #1
1 3380
RonB
589 Expert Mod 512MB
I'm not a biologist and these 2 books are a bit out of date but still useful.
Beginning Perl for Bioinformatics
Mastering Perl for Bioinformatics

BioPerl is more up to date and might be a better starting point.

Bio::SearchIO::blast - Event generator for event based parsing of blast reports

General cpan search for Bio modules.
Sep 17 '16 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Justin | last post by:
Hi. I have a perl script that can be run at the command line to take some HTML and do something filtering with it. What I want to do is use it from within PHP (run the script on a var, eg: echo...
4
by: Mark Wilson CPU | last post by:
This must be easy, but I'm missing something... I want to execute a Perl script, and capture ALL its output into a PHP variable. Here are my 2 files: -------------------------------------...
2
by: ben moretti | last post by:
hi i'm learning python, and one area i'd use it for is data management in scientific computing. in the case i've tried i want to reformat a data file from a normalised list to a matrix with some...
0
by: melledge | last post by:
Full Programme for XTech 2005 Announced Premier European XML Industry Event Expands Focus to "XML, the Web and Beyond"; Co-hosted by the Mozilla Foundation,W3C, and OASIS, Presenters Include...
29
by: Mainlander | last post by:
An ISP I belong to uses Majordomo for their mailing list system. I'd like to encourage them to move to a system that uses a database, preferably psql which they already run on their server....
1
by: idorjee | last post by:
hi all, i've been trying to write a perl cgi script to generate an html output of the blast (program) and it's parsed results on the browser. following are some of the few lines from the script. the...
3
by: lokeshrajoria | last post by:
Hello Everyone, I am running Perl in Linux 9.0 but after writing simple hello program not getting output. despite of compile sucessfully and i set path of perl. Please do...
2
by: muppetjones | last post by:
I have been receiving a "Floating point exception" from Perl after my program has run several iterations. I have not been able to pin point the location of the error, and I am clueless. Especially as...
0
by: sarudna | last post by:
Hi, I'm doing BLASTn search on Human genomic + transcript database for several EST queries. In the BLAST result page I'm looking for any deletion in the exon sequence by seeing the graphic summary...
1
by: korcanucar | last post by:
Hi all, I am using an external binary to view memory starting from a specific address and i want to automate this via perl however there are problems. Hope you can help me ..thx The output of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.