comparison merge.xml @ 6:830961c48e42 draft

"planemo upload commit 9023eff03236d0c02dfa1c303f652cecb77cb09c"
author nml
date Thu, 13 Feb 2020 12:38:44 -0500
parents 33151a38533a
children 90981f86000f
comparison
equal deleted inserted replaced
5:33151a38533a 6:830961c48e42
1 <tool id="collapse_dataset" name="Collapse Collection" version="4.1"> 1 <tool id="collapse_dataset" name="Collapse Collection" version="4.2">
2 <description>into single dataset in order of the collection</description> 2 <description>into single dataset in order of the collection</description>
3 <command> 3 <command>
4 <![CDATA[ 4 <![CDATA[
5 5
6 ( 6 (
16 #if $filename.add_name: 16 #if $filename.add_name:
17 #if str($filename.place_name) == "same_once": 17 #if str($filename.place_name) == "same_once":
18 #if $one_header: 18 #if $one_header:
19 printf "$f.element_identifier\t"; tail -q -n +2 "$f"; 19 printf "$f.element_identifier\t"; tail -q -n +2 "$f";
20 #else: 20 #else:
21 printf "$f.element_identifier\t"; cat "$f"; 21 printf "$f.element_identifier\t"; awk '{ print $0 } END { if (NR == 0 && NF == 0) { print "" } }' "$f";
22 #end if 22 #end if
23 #elif str($filename.place_name) == "same_multiple": 23 #elif str($filename.place_name) == "same_multiple":
24 #if $one_header: 24 #if $one_header:
25 awk '{if (NR!=1) {print "$f.element_identifier\t"$0}}' "$f"; 25 awk '{if (NR!=1) {print "$f.element_identifier\t"$0}}' "$f";
26 #else: 26 #else:
27 awk '{print "$f.element_identifier\t"$0}' "$f"; 27 awk '{print "$f.element_identifier\t"$0} END { if (NR == 0 && NF == 0) { print "$f.element_identifier\t" } }' "$f";
28 #end if 28 #end if
29 #elif str($filename.place_name) == "above": 29 #elif str($filename.place_name) == "above":
30 #if $one_header: 30 #if $one_header:
31 printf "$f.element_identifier\n"; tail -q -n +2 "$f"; 31 printf "$f.element_identifier\n"; tail -q -n +2 "$f";
32 #else: 32 #else:
49 49
50 </command> 50 </command>
51 <inputs> 51 <inputs>
52 <param name="input_list" type="data" format="data" label="Collection of files to collapse into single dataset" help="" optional="false" multiple="true" /> 52 <param name="input_list" type="data" format="data" label="Collection of files to collapse into single dataset" help="" optional="false" multiple="true" />
53 <param name="one_header" type="boolean" display="checkboxes" label="Keep one header line" help="Combine first line of each file as the header for the final dataset. Useful when same header line is found in all files."/> 53 <param name="one_header" type="boolean" display="checkboxes" label="Keep one header line" help="Combine first line of each file as the header for the final dataset. Useful when same header line is found in all files."/>
54 <conditional name="filename"> 54 <conditional name="filename">
55
56 <param name="add_name" type="boolean" display="checkboxes" label="Prepend File name"/> 55 <param name="add_name" type="boolean" display="checkboxes" label="Prepend File name"/>
57 <when value="true"> 56 <when value="true">
58 <param name="place_name" type="select" label="Where to add dataset name"> 57 <param name="place_name" type="select" label="Where to add dataset name">
59 <option value="same_once">Same line and only once per dataset</option> 58 <option value="same_once">Same line and only once per dataset</option>
60 <option value="same_multiple">Same line and each line in dataset</option> 59 <option value="same_multiple">Same line and each line in dataset</option>