1
METLIN / reporting problem for MSMS search
besides, is this the right board to post this question? kindly move it to the right one if not. Thanks.
here are the steps:
1) use template php from document: http://metlin.scripps.edu/soap/ , save as php file in local htdocs directory.
<?php
ini_set('soap.wsdl_cache_enable', 0 );
// Spectrum Match Parameters
$token = "myToken";
$specMasses = array(138.066,110.071,42.034,69.045,123.043,83.060,109.036);
$intensity = array(10877,2221,644,351,350,318,234);
$mode = "pos";
$ce = 20;
$tolMS = 0.01;
$tolPrec = 20;
$prec = 195.0877;
// Search parameters. Can also use a class instead of an array to map "token", "mass", ... to their corresponding value
// Can call the SoapClient functions _getTypes() and _getFunctions() to see the required types and structures for the WSDL
$specparam = array("token"=>$token, "mass" => $specMasses, "intensity" => $intensity, "mode" => $mode, "collisionEnergy" => $ce, "toleranceMSMS" => $tolMS, "tolerancePrecursor" => $tolPrec, "precursorMass" => $prec);
// Call the SpectrumMatch function via the soap service
try{
$client = new SoapClient("http://metlin.scripps.edu/soap/metlin-1.0.wsdl");
$return = $client->SpectrumMatch($specparam);
}catch (SoapFault $fault){
echo $fault;
trigger_error("SOAP Fault: (faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring})", E_USER_ERROR);
}
/* The SOAP return variable for the SpectrumMatch function is a struct containing a 2-D array
* with the format: $return->SpectrumMatchResult[# of results][line info on each result].
*/
$count = count($return);
if($count < 1){
echo "No result is returned, please try again with different parameters!!";
} else{
echo "<table align ="center" border="1" cellpadding = "3" bordercolor = "#747170"><tr>";
echo "<th align = "center" valign="top">METLIN ID</th>";
echo "<th align = "center" valign="top">Name</th>";
echo "<th align = "center" valign="top">METLIN Score<br/>(0-100)</th>";
echo "<th align = "center" valign="top">precursor</th>";
echo "<th align = "center" valign="top">precursor<br/>?PPM</th>";
echo "<th align = "center" valign="top">Spectrum Matching</th></tr>";
for($i=0 ; $i < $count ; $i++){
echo '<tr><td align = "center" width="80"><a href="http://metlin.scripps.edu/metabo_info.php?molid='.$return[$i]->metlinID.'">'.$return[$i]->metlinID."</a></td>";
echo '<td width="200">'.$return[$i]->name.'</td>';
echo "<td align='center'>".$return[$i]->metlinScore."</td>";
echo "<td align='center'>".$return[$i]->precursor."</td>";
echo "<td align='center'>".$return[$i]->precursorPPM."</td>";
echo '<td width="240"> <a href="'.$return[$i]->spectrumMatching.'" class="highslide" onclick="return hs.expand(this)"> <img src= "'.$return[$i]->spectrumMatching.'" alt ='.$return[$i]->MID.' title= "Click to enlarge" width = "240" height = "150"></a></td></tr>';
}
echo "</table>";
}
?>
2) browse from firefox, 127.0.0.1/name.php, but the example data could not return compound id and things related.
the return page screenshot was attached below.
PS: I found a input data error in the template, $prec = 193.0731; is expeceted instead from $prec = 195.0877; for positive mode search in sample data: http://metlin.scripps.edu/spec_search.php
is there anyone could help on this? could reply this post or email liyanli@genomics.cn
Thanks a lot!
[attachment deleted by admin]