view merge.xml @ 2:4263967e8d40 draft

planemo upload commit ee055b53af5f4a3420b35f3641d45c0559be37fc
author nml
date Tue, 17 May 2016 15:56:30 -0400
parents a78a70d4806c
children c0c988378838
line wrap: on
line source

<tool id="collapse_dataset" name="Collapse Collection" version="2.1">
  <description>Collapse collection into single dataset in order of the collection</description>
  <command>
    <![CDATA[
    
     (
    #for $f in $input_list#
    #if $filename.add_name:
       #if str($filename.place_name) ==  "same":
           printf "$f.element_identifier\t" ;
       #else
           printf "$f.element_identifier\n" ;
       #end if
    #end if
    cat "$f" ;
    #end for#
    )
    > $output

    ]]>
    
  </command>
  <inputs>
     <param name="input_list" type="data" label="Collection of files to collapse into single dataset" help="" optional="false" multiple="true" />
     <conditional name="filename">
     <param name="add_name" type="boolean" display="checkboxes" label="Append File name"/>
     <when value="true">
       <param name="place_name" type="select" label="Where to add dataset name">
         <option value="same">Same line</option>
         <option value="above">Line Above</option>
       </param>
     </when>
     <when value='false'>
     </when>
     </conditional>
  </inputs>
  <outputs>
    <data name="output" format_source="input_list" ></data>
  </outputs>
  <tests>
	<test>
	        <param name="input_list">
        	  <collection type="list">
	            <element name="input1" value="input1" />
        	    <element name="input2" value="input2" />
	          </collection>
		</param>
		<output name="output" file="answer.txt"/>
	</test>
  </tests>
  <help>
	Combines a list collection into a single file dataset with option to include dataset names.
        
        
  </help>
  <citations>
  </citations>
</tool>