Commit message:
Uploaded |
added:
combine.sh combine.xml |
b |
diff -r 000000000000 -r b815081988b5 combine.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/combine.sh Mon Feb 06 10:38:14 2017 -0500 |
[ |
@@ -0,0 +1,24 @@ +#!/bin/bash + +output=$1 +shift + +i=1 + +for var in "$@" +do + if [[ -s $var ]] ; then + ( head -q -n 1 $var ) > $output + break + fi + i=$[i+1] +done + +if [ $i -le "$#" ] + then + ( tail -q -n +2 $@ )>> $output +else + exit 5 +fi + + |
b |
diff -r 000000000000 -r b815081988b5 combine.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/combine.xml Mon Feb 06 10:38:14 2017 -0500 |
b |
@@ -0,0 +1,23 @@ +<tool id="combine" name="Combine" version="0.1"> + <description>Combine Tabular with same header</description> + <command interpreter="bash"> + + combine.sh $output + #for $f in $texts# $f #end for# + </command> + <inputs> + <param name="texts" type="data_collection" label="Collection of Tabular data" help="" optional="false" format="txt" collection_type="list" /> + </inputs> + <stdio> + <exit_code range="5" level="warning" description="Your input sets were all empty. Either the tool that generated the input sets did not work correctly or no results were found."/> + </stdio> + + <outputs> + <data name="output" format="tabular" ></data> + </outputs> + <help> + + + + </help> +</tool> |