This is harder for two reasons:
Here's the broad outline:
Code:
#!/usr/bin/perl -w # file: post_gs.pl # genscan runner use LWP; use HTTP::Request::Common; my $GS_URL = 'http://genes.mit.edu/cgi-bin/genscanw.cgi'; my $file = shift or die "Provide a Fasta file to run Genscan on"; my $agent = new LWP::UserAgent; my $request = POST($GS_URL, Content_Type => 'form-data', Content => [ -o => 'Vertebrate', -e => '1.00', -n => 'MySequence', -p => 'Predicted peptides only', -u => [$file,'C:/Windows/Fonts/$file'], ] ); my $response = $agent->request($request); die "request failed" unless $response->is_success; my $record = $response->content; print $record; |
Output:
(~) 69% post_gs.pl test.fa <HTML> <HEAD> <TITLE>GENSCAN output</TITLE> <META HTTP-EQUIV="OWNER" CONTENT="GENSCAN"> <LINK REL="made" HREF="mailto:cburge@mit.edu"> <BASE HREF="http://genes.mit.edu/GS/gs_out.html"> </HEAD> <BODY> <BODY BGCOLOR="#00336677" link="#FFFF00" vlink="#77FFFF77" alink="#FFFF00" text="#FFFFFF"> <BR> <CENTER><H3>GENSCANW output for sequence MySequence</H3></CENTER> <BR> <BR> <pre> <EM> GENSCAN 1.0 Date run: 24-Oct-102 Time: 15:57:15 Sequence MySequence : 100000 bp : 34.63% C+G : Isochore 1 ( 0 - 43 C+G%) Parameter matrix: HumanIso.smat </EM><b>Predicted genes/exons: </b><STRONG> Gn.Ex Type S .Begin ...End .Len Fr Ph I/Ac Do/T CodRg P.... Tscr.. ----- ---- - ------ ------ ---- -- -- ---- ---- ----- ----- ------ 1.01 Intr + 158 227 70 0 1 46 92 94 0.403 2.92 1.02 Term + 883 1210 328 1 1 34 38 400 0.918 22.80 1.03 PlyA + 1301 1306 6 1.05 2.00 Prom + 1496 1535 40 -10.94 2.01 Init + 1599 1653 55 2 1 65 34 87 0.921 0.53 2.02 Intr + 1711 1851 141 2 0 54 81 263 0.999 21.60 2.03 Intr + 1908 2035 128 1 2 52 92 198 0.999 16.08 2.04 Term + 2104 2553 450 0 0 52 48 654 0.999 52.00 2.05 PlyA + 2821 2826 6 1.05 3.00 Prom + 2986 3025 40 -14.06
For POST scripts this can be hard. You can either:
|
| Contents |