#!/usr/bin/perl -w # #Sample script to demonstrate the use of the RPF Web-Service. #It is important that the file attachments have the correct Content-Ids. # #accepted Ids are: #Ids are bmrbfile, pdbfile, n15noesy, c13aro, c13ali, c13noesy, ccnoesy, and noesy2d # #required parameters are: #email, protein_name, pdbfile, and bmrbfile # #optional parameters are: # [experiment name]_water for the water suppression range # [experiment name]_d20 if the experiment is in d20 # use SOAP::Lite; use MIME::Entity; use SOAP::Lite::Packager; sub build_entity { my ($id, $filename, $filepath) = @_; return build MIME::Entity Type => "text/plain", Path => $filepath, Filename => $filename, Disposition => "attachment", Id => $id; } my $email = SOAP::Data->name(email => "gautams\@cabm.rutgers.edu")->type("string"); my $protein_name = SOAP::Data->name(protein_name => "str65")->type("string"); my $bmrb = &build_entity("bmrbfile", "str65.str", "/dataset/StR65/str65.str"); my $pdb = &build_entity("pdbfile", "StR65.pdb", "/dataset/StR65/StR65.pdb"); my $n15noesy = &build_entity("n15noesy", "n15noesy.list", "/dataset/StR65/n15noesy.list"); my $c13aro = &build_entity("c13aro", "c13aro.list", "/dataset/StR65/c13aro.list"); my $c13ali = &build_entity("c13ali", "c13ali.list", "/dataset/StR65/c13ali.list"); my $c13ali_water = SOAP::Data->name("c13ali_water" => "4.6-4.9")->type("string"); #water suppression range my $c13ali_d20 = SOAP::Data->name("c13ali_d20"); #d20 solution my $result = SOAP::Lite -> service('http://nmr.cabm.rutgers.edu:80/rpf/RpfService.wsdl') -> getRpfScoreWithOptions($email, $protein_name, $bmrb, $pdb, $c13aro, $c13ali, $n15noesy, $c13ali_water); print $result . "\n";