<?xml version="1.0" encoding="UTF-8"?>
<maxdQL version="0.1" name="ArrayMetadata" >
	<description>Will return Feature, Reporter, Gene metadata</description>
	
	<unitTest>
		php run.php -file=../../sequences/arrayMetadata.xml -display=last -FeatureIDs="0-100" -profile="The mouse microarray experiment"  
	</unitTest>
	
	<arguments type="user">
		<var name="FeatureNames" comment="the feature names as a comma-separated list, or * for all" />
	</arguments>
	
	<pfunction id="formatLinkResult" comment="formats a list of entries from a link output" method="xml" >
			<![CDATA[
			
				$output = formatLinkResult($input, "Feature");
				
				//print_r($output->saveXML());die();
				
				
			]]>
	</pfunction>
	
	<query id="1" 
	       name="linkIt" 
	       comment="links the features to their reporters and genes" 
	       type="maxdBrowse" 
	       >
	       <!-- loopResultID="1"   -->
		<names uref="user" name="FeatureNames" />
		<action>link</action>
		<desiredTable>Feature,Reporter,Gene</desiredTable>
		<table>Feature</table>
		<attributes>yes</attributes>
		<format>array</format>
	</query>
	
	
	<query 
	       id="2"
	       name="mergeResults"
	       comment="this merges the results into a report"
	       type="export"
	       >
		<result pref="formatLinkResult" processResultID="1"  />
	</query>
	
</maxdQL>
