NAME
WebService::FuncNet::Results - object encapsulating results
FUNCTIONS
new
Creates a new instance of the results object.
Do not use this function directly.
prepare_data
Internal function used by all output format-specific functions in order to prepare the data. Essentially, it sorts the output the service returns on the raw pairwise score in descending order.
Do not use this function directly.
as_csv
Formats and returns the data in CSV format. The data is returned as a reference to an array where each line is a comma separated string. The elements are: query protein, reference protein, raw score, p-value. The data is sorted by raw score in descending order.
my $ra_data = $R->as_csv;
More information on the output of the function can be found at http://funcnet.eu/wsdls/example-queries/
This function returns undef on error.
as_tsv
Formats and returns the data in TSV format. The data is returned as a reference to an array where each line is a tab separated string. The elements are: query protein, reference protein, raw score, p-value. The data is sorted by raw score in descending order.
my $ra_data = $R->as_tsv;
More information on the output of the function can be found at http://funcnet.eu/wsdls/example-queries/
This function returns undef on error.
as_xml
Formats and returns the data in CSV format. Returns a scalar which contains the XML markup. The root node is named 'results'.
Tip: each pairwise result is stored under an XML element named 'anon'. This way, you can use XMLin from XML::Simple and reconstruct a reference to a array of anonymos hashes easily.
my $xml = $R->as_xml;
More information on the output of the function can be found at http://funcnet.eu/wsdls/example-queries/
Example output:
<results>
<anon>
<p1>Q9H8H3</p1>
<p2>O75865</p2>
<pv>0.8059660198021762</pv>
<rs>1.615708908613666</rs>
</anon>
<anon>
<p1>P22676</p1>
<p2>A3EXL0</p2>
<pv>0.9246652723089276</pv>
<rs>0.8992717754263188</rs>
</anon>
<anon>
<p1>Q5SR05</p1>
<p2>A3EXL0</p2>
<pv>0.9739920871688543</pv>
<rs>0.49493596412217056</rs>
</anon>
</results>
This function returns undef on error.
REVISION INFO
Revision: $Rev: 64 $
Last editor: $Author: andrew_b_clegg $
Last updated: $Date: 2009-07-06 16:12:20 +0100 (Mon, 06 Jul 2009) $
The latest source code for this project can be checked out from:
https://funcnet.svn.sf.net/svnroot/funcnet/trunk