473,608 Members | 2,565 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

sortting of blast output in perl programme

5 New Member
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
Sep 17 '16 #1
1 3397
RonB
589 Recognized Expert Moderator Contributor
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
2798
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 fancyHtmlFilter($inputHtml); ). I've thought about accessing the perl script via HTTP, but then I would have to modify the perl script to accept data from HTTP forms, which I have no idea how to do.
4
8128
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: ------------------------------------- test3.pl ------------------------------------- print "PERL Hello from Perl! (plain print)<br>\n"; print STDERR "PERL This is text sent to STDERR<br>\n"; $output="PERL Some output:<br>\n"; for ($i=0; $i<5; $i++) {
2
4428
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 sorted columns. to do this at the moment i am using perl, which is very easy to do, and i want to see if python is as easy. so, the data i am using is some epiphyte population abundance data for particular sites, and it looks like this:
0
1577
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 BBC, IBM, Justsystem, Microsoft, Oracle, Sun Alexandria, Va. - March 7, 2005 - IDEAlliance, a leading industry association dedicated to fostering XML and other information technology
29
3158
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. Anything out there in Php?
1
1848
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 thing is, the script seems to be working fine when i run on the terminal (ie, perl <scriptname.cgi>), but i can't get the same output on the browser, when i give a sequence (input) on the text area of the html form. $seq variable seems to be storing...
3
1438
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 some needful solution. Thanks & Regards Lokiii
2
2569
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 I can't seem to find exactly what this exception means. 1) What is a floating point exception? 2) What causes it? 3) Is there any way to fix it? I have included my code below, but as there is quite a bit any suggestion of how to handle...
0
1288
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 for every BLAST search I do. I would highly appreciate if anybody could give me a perl script with which I can do multiple searches at one time. Thanks Saravana
1
1678
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 the programme is like below: bash-3.2$ mem_disp 12B21D20 100 Opening RO Data Memory File scp.ro Opening Memory File CP2.16.0000000c.18.pmd.raw 12B21D20 12B6E500 186CAF00 12D81A00 00000010 *.....l..........* 12B21D30 000000AA 01060009 00000088...
0
7998
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8491
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8142
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8329
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6010
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3959
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4022
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2472
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1580
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.