Remote submission in perl
From GBWiki
Contents |
Remote submission as of 2.5
Two key points have changed:
- you must login and info kept in the cookies
- submission can be done asynchronously
The following system uses curl, but it can of course be implemented in whatever language
logging in and saving authentication
Session ccokies are saved at once in a structure (here a file /tmp/pwicookies.jar)
wget -O - --save-cookies /tmp/pwicookies.jar --keep-session-cookies 'http://phenyx.vital-it.ch/pwi/j_acegi_security_check?j_username=mylogin&j_password=mypassword'
Old Fashion
That's a soon deprecated manner to make submission, but for the moment it works. There are plenty of manner to call the submission process. Here is just one...
preparation
submissionparam.xml
- find
submissionParam.xml(eventually.gz) of a job you'd like to use as a template (phenyx management console->export/browse) - save it locally
data files
- get datafile (MS/MS peak list in common formats) ready (they all should be in the same format)
launch the identification
prepare the job
remote call submitJobs.pl without starting a job
wget -O - --load-cookies /tmp/pwicookies.jar --quiet --post-file=/tmp/sp.xml.gz 'http://phenyx.vital-it.ch/pwi/cgi-bin/submitJobs.pl?user=joe&title=uri_escaped_title&noexec=1'
Parse the stdout to get something like:
<jobId>16561</jobId>
Therefore, all following call to submitJobs.pl will be referring jobid=16561
Check your job shall be appearing in the PWI desktop, with a blue led
add datafiles
This command can be called several times (with diffrerent peaklist)
wget -O - --load-cookies /tmp/pwicookies.jar --quiet --post-file=/home/alex/olavExamples/data/1113.mgf 'http://phenyx.vital-it.ch/pwi/cgi-bin/submitJobs.pl?user=joe&jobid=16561&datafile=mgf:-'
launch execution
Once all datafiles have been uploaded
wget -O - --load-cookies /tmp/pwicookies.jar --quiet 'http://phenyx.vital-it.ch/pwi/cgi-bin/submitJobs.pl?user=joe&jobid=16561&exec=1'
Completion
completed?
Well, I have something to check setting the cookies, but the command is:
wget -O - --load-cookies /tmp/pwicookies.jar --quiet 'http://phenyx.vital-it.ch/pwi/cgi-bin/cgiUserJob.pl?user=swisspit&jobid=16704&file=runstatus.txt&showForm=0&username=joe&passwd=joe'
You can check the status of a job with the last returned line (error|completed)
download the job folder
It should be a tar.gz, but for the moment (until bug is corrected), it is only a tar
wget -O /tmp/a.tar --load-cookies /tmp/pwicookies.jar --quiet 'http://phenyx.vital-it.ch/pwi/cgi-bin/cgiUserJob.pl?user=joe&username=joe&passwd=dalton&jobid=16569&action=export&exportcommand=archive_targz&showForm=0'
