Metabolomics Society Forum

Databases => METLIN => Topic started by: liyalolo on August 31, 2012, 03:58:22 AM

Title: reporting problem for MSMS search
Post by: liyalolo on August 31, 2012, 03:58:22 AM
i was trying to use php soap-client to do Spectrum Match as ducument page template wrote: http://metlin.scripps.edu/soap/ (http://metlin.scripps.edu/soap/) , but encounter some problem for the return webpage, the return page was bland, although the search for Metabolite Search works fine.
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/ (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 (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]
Title: Re: reporting problem for MSMS search
Post by: liyalolo on September 02, 2012, 07:39:48 PM
is there anyone could give a hand? Thanks in advance!
Title: Re: reporting problem for MSMS search
Post by: Ralf on September 12, 2012, 03:09:40 PM
There was a problem with a SOAP interface with is fixed now.
EDIT: The SOAP service for the metabolite search is working again, but it seems there is still a problem with the MS/MS search, which is being investigated at the moment and will hopefully be fixed soon.
Title: Re: reporting problem for MSMS search
Post by: liyalolo on September 18, 2012, 09:18:15 PM
Thanks for the reply, Ralf. i checked again, it comes back with new display patterns, but still not working. is there a expected date on this?

some of the return message:

Notice: Trying to get property of non-object in D:phpnowhtdocs3.php on line 68
Title: Re: reporting problem for MSMS search
Post by: kevincho on September 19, 2012, 09:32:54 AM
Hi,

We have modified the structure a bit, please refer the new description at http://metlin.scripps.edu/soap/ (http://metlin.scripps.edu/soap/)

Thank you,
Kevin
Title: Re: reporting problem for MSMS search
Post by: liyalolo on September 20, 2012, 02:21:27 AM
Thanks, Kevin! another question is i was seeking the formular of the compound, hence trying SOAP Client functions _getTypes() and _getFunctions() , to see if there is a function to do this. i was using the script below, but i'm not quite familiar with this. is there a hint on this? Thanks!

or some information on MSMS search client returned function names would help a lot!

<?php
$client = new SoapClient("http://metlin.scripps.edu/soap/metlin-1.0.wsdl");
var_dump($client->__getTypes());
var_dump($client->__getFunctions());
?>

seems not quite correct, would anyone take a look at it? Thanks!
Title: Re: reporting problem for MSMS search
Post by: liyalolo on September 26, 2012, 04:28:44 AM
i got 1 the return compound instead of 5 as page http://metlin.scripps.edu/soap/ (http://metlin.scripps.edu/soap/) showed.

does anyone encounter the same situation?

[attachment deleted by admin]
Title: Re: reporting problem for MSMS search
Post by: iteriani on February 11, 2013, 08:26:12 PM
This has been fixed in our development servers. Will be up soon tm