Skip to main content

Show Posts

This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.

Messages - liyalolo

2
METLIN / Re: reporting problem for MSMS search
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!
3
METLIN / Re: reporting problem for MSMS search
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
5
METLIN / reporting problem for MSMS search
i was trying to use php soap-client to do Spectrum Match as ducument page template wrote: 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/ , 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]