changeset 0:b815081988b5 draft default tip

Uploaded
author nml
date Mon, 06 Feb 2017 10:38:14 -0500
parents
children
files combine.sh combine.xml
diffstat 2 files changed, 47 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /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
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/combine.xml	Mon Feb 06 10:38:14 2017 -0500
@@ -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>