Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
use WWW::Mechanize; ($fasta, $type) = @ARGV; #type -> euk, Gpos, Gneg $outfile = $fasta.".SIGNALCF"; open OUT, ">>$outfile"; open IN, $fasta; while(<IN>) { if($_=~/^>(.*)/) { $id=$1; $seq=<IN>; chomp $seq; $mikos=length($seq); $url = 'http://www.csbio.sjtu.edu.cn/bioinf/Signal-CF/'; $mech = WWW::Mechanize->new(); $mech->get($url); $mech->submit_form ( form_number => 1, fields => { #textarea name | value S1 => $seq, #Radio button name | value R2 => $type } ); $result = $mech->content(); #case with NO signal peptide if($result=~/According to our computational result, your input + sequence/) {print OUT $id."\t0\n";} #case with signal peptide if($result=~/According to our computational results, the signa +l peptide is:\<font color\=red\>1\-(\d+)\<\/font>/) {$sp_end=$1; print OUT $id."\t".$sp_end."\n";} } } close IN; close OUT;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to set a time interval in web batch script?
by spadacciniweb (Curate) on Oct 24, 2013 at 20:11 UTC | |
by Anonymous Monk on Oct 24, 2013 at 20:14 UTC | |
by Anonymous Monk on Oct 24, 2013 at 22:58 UTC | |
by bioinformatics (Friar) on Oct 25, 2013 at 05:06 UTC |