#!/usr/bin/env perl use strict; use Carp; use Pod::Usage; =head1 NAME cgiComputePI.pl =head1 DESCRIPTION Predict peptide PI based on sequence =head1 SYNOPSIS =head1 ARGUMENTS =over 4 =item -in=file Text file. Each line starts with a peptide sequence =back =head1 OPTIONS =over 4 =item expdata=(calibrate) Prints all possible output formats =item --help =item --man =item --verbose =back =head1 EXAMPLE =head1 COPYRIGHT Copyright (C) 2004-2005 Geneva Bioinformatics www.genebio.com This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA =head1 AUTHORS Pablo Carbonell Alexandre Masselot, www.genebio.com =cut $|=1; # flush immediately; BEGIN{ use File::Basename; push @INC, basename($0); } BEGIN { use CGIUtils; } use InSilicoSpectro::InSilico::IsoelPoint; use InSilicoSpectro::InSilico::ExpCalibrator; my $query = new CGI; if($query->param('doc')){ print $query->header; while(){ print $_; } exit(0); } my $help=$query->param('help'); if(defined $help){ print $query->header('text/plain'); pod2usage(-verbose=>2, -exitval=>0); } my $peptideList=join("\n", split(/:/, $query->param('peptideList'))); my $action=$query->param('action'); my $script=basename $0; unless($action){ my %cookies=$query->cookie($script); my $method=$cookies{method}; my $author=$cookies{author}; print $query->header; print $query->start_html(-title=>"$script - ms/ms peaklist converter", -author=>'alexandre.masselot@genebio.com' ); my %method2authors=( iterative=>InSilicoSpectro::InSilico::IsoelPoint::getAuthorList('iterative'), ); print <

$script

An amino acid sequence => PI predictor (?)

Method (?)
Author (?)
Peptide sequence(s) (?)
Experimental data (?)

calibrate from
EOT print $query->end_html; exit(0); } my $method=$query->param('method')||CORE::die "must provide method parameter"; my $author=$query->param('author'); my $peptseq=$query->param('peptseq'); my $expdata=$query->param('expdata'); my $cb_exp_calibrate=$query->param('cb_exp_calibrate'); my %cookies; $cookies{method}=$method; $cookies{author}=$author; my $cookie=$query->cookie(-name=>$script, -value=>\%cookies, -expires=>'+100d' ); print $query->header(-type=>'text/plain', -cookie=>$cookie, ); my (@expSeq, @expTimes); if($expdata){ foreach (split /\n/, $expdata){ next unless /\S/; my @tmp=split; push @expSeq, $tmp[0]; push @expTimes, $tmp[1]; } } print "#method=$method parameter set=$author\n"; my $pi=InSilicoSpectro::InSilico::IsoelPoint->new(method=>$method,current=>$author); if ($cb_exp_calibrate) { my $ec=InSilicoSpectro::InSilico::ExpCalibrator->new(fitting=>'linear'); $pi->calibrate(data=>{calseqs=>\@expSeq,caltimes=>\@expTimes},calibrator=>$ec); } foreach (split /\n/, $peptseq){ s/\s+$//; next unless /\S/; my ($peptide,$remaining)=split(' ',$_,2); chomp $remaining; my $pt=$pi->predict(peptide => uc $peptide); print "$peptide $remaining $pt \n"; } __DATA__ cgiComputePI.pl - HPLC retention time predictor

cgiComputePI.pl

Peptide Isolelectric point predictor

Goal

cgiComputerPI.pl is a cgi application for predicting PI. It is a weaker version of the computePI.pl that comes with the library InSilicoSpectro and which gives you much more flexibility.

For this script man page, plese click here.

Parameters

Method

The method used by the prediciton algorithm (summing weighted residues, neural network, etc.).

Author

For a given method, it is possible to use different sets of published parameters.

Petide sequences

Paste your data here. Each line must start with a petpide amino acid sequence. The rest of the line will be repeated on the output, with the predicted retention time appended as the last column.

Experimental data

Experimental data (each line contains a peptide sequence, a space, and one number for time) can be used for:
  • calibrating: if not enough valid experimental data are available, one can use published parameters and make a linear calibration with his own data at the end of the computation.
The command-line version computePI.pl will allow, for instance, to save the learned parameters in a file and re-use them later.