view merge.xml @ 1:a78a70d4806c draft

planemo upload commit b8a959738e856ac80cb2d58423f455337cdd4853
author nml
date Tue, 17 May 2016 12:54:54 -0400
parents 49bd84e136c7
children 4263967e8d40
line wrap: on
line source

<tool id="collapse_dataset" name="Collapse Collection" version="2.0">
  <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.name\t" ;
       #else
           printf "$f.name\n" ;
       #end if
    #end if
    cat "$f" ;
    #end for#
    )
    > $output

    ]]>
    
  </command>
  <inputs>
     <param name="input_list" type="data_collection" label="Collection of files to collapse into single dataset" help="" optional="false" collection_type="list" />
     <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>