changeset 59:08a599cf71d0

Bjoern's suggestions
author Michael R. Crusoe <mcrusoe@msu.edu>
date Mon, 18 Aug 2014 07:02:05 -0400
parents be2f355d6841
children fe697e0cb24a
files abundance-dist-single.xml abundance-dist.xml count-median.xml do-partition.xml extract-partitions.xml filter-abund.xml filter-below-abund.xml macros.xml normalize-by-median.xml
diffstat 9 files changed, 60 insertions(+), 80 deletions(-) [+]
line wrap: on
line diff
--- a/abundance-dist-single.xml	Wed Aug 06 18:32:24 2014 -0400
+++ b/abundance-dist-single.xml	Mon Aug 18 07:02:05 2014 -0400
@@ -1,4 +1,4 @@
-<tool	id="gedlab-khmer-abudance-dist-single"
+<tool	id="gedlab-khmer-abundance-dist-single"
 	name="Abundance Distribution (all-in-one)"
 	version="1.1-1"
 	force_history_refresh="true">
@@ -35,14 +35,14 @@
 		<param	name="save_countingtable"
 			type="boolean"
 			label="Save the k-mer counting table(s) in a file"
-			help="" />
+			help="(--savetable)" />
 		<expand macro="input_zero" />
 		<param	name="bigcount"
 			type="boolean"
 			truevalue=""
 			falsevalue="--no-bigcount"
 			checked="true"
-			help="Count k-mers past 255" />
+			help="Count k-mers past 255 (--no-bigcount)" />
 		<expand macro="tableinputs" />
 	</inputs>
 	<outputs>
@@ -53,12 +53,7 @@
 		</data>
 		<expand macro="abundance-histogram-output" />	
 	</outputs>
- 	<stdio>
-        <!-- [HELP] If no exit code rule is defined, the tool will stop if anything is written to STDERR -->
-		<exit_code	range="1:"
-				level="fatal" />
-	</stdio>
-    
+	<expand macro="stdio" />
     <tests>
 	    <test>
 		    <param name="input_sequence_filename" value="test-abund-read-2.fa" />
--- a/abundance-dist.xml	Wed Aug 06 18:32:24 2014 -0400
+++ b/abundance-dist.xml	Mon Aug 18 07:02:05 2014 -0400
@@ -31,12 +31,7 @@
 	<outputs>
 		<expand macro="abundance-histogram-output" />
 	</outputs>
- 	<stdio>
-        <!-- [HELP] If no exit code rule is defined, the tool will stop if anything is written to STDERR -->
-		<exit_code	range="1:"
-				level="fatal" />
-	</stdio>
-    
+	<expand macro="stdio" />
 	<tests>
 		<test>
                     	<param name="input_sequence_filename" value="test-abund-read-2.fa" />
--- a/count-median.xml	Wed Aug 06 18:32:24 2014 -0400
+++ b/count-median.xml	Mon Aug 18 07:02:05 2014 -0400
@@ -4,9 +4,10 @@
 	force_history_refresh="true">
 	
 	<description>
-		Count the median/avg k-mer abundance for each sequence in the input file,
-		based on the k-mer counts in the given k-mer counting table. Can be used to
-		estimate expression levels (mRNAseq) or coverage (genomic/metagenomic).
+		Count the median/avg k-mer abundance for each sequence in the
+		input file, based on the k-mer counts in the given k-mer
+		counting table. Can be used to estimate expression levels
+		(mRNAseq) or coverage (genomic/metagenomic).
 	</description>
         <macros>
 		<token name="@BINARY@">count-median.py</token>
@@ -14,13 +15,10 @@
         </macros>
         <expand macro="requirements" />
 	<command>
-## The command is a Cheetah template which allows some Python based syntax.
-## Lines starting hash hash are comments. Galaxy will turn newlines into spaces
-mkdir output; cd output;
 @BINARY@
-		$input_counting_table_filename
-		$input_sequence_filename
-		$output_summary_filename	
+$input_counting_table_filename
+$input_sequence_filename
+$output_summary_filename
 	</command>
 
 	<inputs>
@@ -28,22 +26,22 @@
 		<expand macro="input_counting_table_filename" />
 	</inputs>
 	<outputs>
-		<data name="output_summary_filename" format="text" label="${input_sequence_filename} sequence id, median, average, stddev, and seq length" />
+		<data name="output_summary_filename" format="text"
+			label="${input_sequence_filename} sequence id, median, average, stddev, and seq length" />
 	</outputs>
- 	<stdio>
-        <!-- [HELP] If no exit code rule is defined, the tool will stop if anything is written to STDERR -->
-		<exit_code	range="1:"
-				level="fatal" />
-	</stdio>
-
+	<expand macro="stdio" />
 	<tests>
 		<test interactor="api">
-                        <param name="input_sequence_filename" value="test-abund-read-2.fa" />
-                        <param name="input_counting_table_filename" value="test-abund-read-2.ct" ftype="ct" />
+			<param name="input_sequence_filename"
+				value="test-abund-read-2.fa" />
+			<param name="input_counting_table_filename"
+				value="test-abund-read-2.ct" ftype="ct" />
                         <output name="output_summary_filename">
                                 <assert_contents>
-                                        <has_line_matching expression="seq 1001 1001.0 0.0 18" />
-                                        <has_line_matching expression="895:1:37:17593:9954/1 1 103.803741455 303.702941895 114" />
+					<has_line_matching
+						expression="seq 1001 1001.0 0.0 18" />
+					<has_line_matching
+						expression="895:1:37:17593:9954/1 1 103.803741455 303.702941895 114" />
                                 </assert_contents>
                         </output>
 		</test>
--- a/do-partition.xml	Wed Aug 06 18:32:24 2014 -0400
+++ b/do-partition.xml	Mon Aug 18 07:02:05 2014 -0400
@@ -30,17 +30,17 @@
 			type="integer"
 			value="20"
 			label="ksize"
-			help="k-mer size to use" />
+			help="k-mer size to use (--ksize/-k)" />
 		<param	name="n_tables"
 			type="integer"
 			min="1"
 			value="4"
 			label="n_tables"
-			help="number of tables to use" />
+			help="number of tables to use (--n_tables/-N)" />
 		<param	name="tablesize_specific"
 			type="text"
 			label="tablesize"
-			help="lower bound on the tablesize to use" />
+			help="lower bound on the tablesize to use (--min-tablesize/-x)" />
 	</inputs>
 	<outputs>
 		<data	name="information"
@@ -48,12 +48,7 @@
 			label="${tool.name} summary for #echo ','.join(map(str, $inputs ))#" />
 		<expand macro="output_sequences" />
 	</outputs>
- 	<stdio>
-        <!-- [HELP] If no exit code rule is defined, the tool will stop if anything is written to STDERR -->
-		<exit_code	range="1:"
-				level="fatal" />
-	</stdio>
-	
+	<expand macro="stdio" />
 <!--	<tests>
 		<test interactor="api">
 			<conditional name="parameters">
--- a/extract-partitions.xml	Wed Aug 06 18:32:24 2014 -0400
+++ b/extract-partitions.xml	Mon Aug 18 07:02:05 2014 -0400
@@ -4,7 +4,8 @@
 	force_history_refresh="true">
 	
 	<description>
-		Separate sequences that are annotated with partitions into grouped files.
+		Separate sequences that are annotated with partitions into
+		grouped files.
 	</description>
         <macros>
                 <token name="@BINARY@">extract-partitions.py</token>
@@ -30,19 +31,19 @@
 		<param	name="max_size"
 			type="integer"
 			label="Max group size"
-			help="No more than this many number of sequences will be stored in each output"
+			help="No more than this many number of sequences will be stored in each output (--max-size/-X)"
 			value="1000000" />
 		<param	name="min_partition_size"
 			type="integer"
 			label="Min partition size"
-			help="The minimum partition size worth keeping"
+			help="The minimum partition size worth keeping (--min-partition-size/-m)"
 			value="5" />
 		<param	name="output_unassigned"
 			type="boolean"
 			checked="false"
 			truevalue="--output-unassigned"
 			falsevalue=""
-			label="Output unassigned sequences" />
+			label="Output unassigned sequences (--output-unassigned/-U)" />
 	</inputs>
 	<outputs>
 		<data	name="distribution"
@@ -50,18 +51,15 @@
 			label="Partition size distribution from ${tool.name}" />
 		<expand macro="output_sequences" />
 	</outputs>
- 	<stdio>
-        <!-- [HELP] If no exit code rule is defined, the tool will stop if anything is written to STDERR -->
-		<exit_code	range="1:"
-				level="fatal" />
-	</stdio>
+	<expand macro="stdio" />
 	
 	<tests>
 		<test interactor="api">
 			<param name="inputs" value="random-20-a.fa.part"/>
 			<output name="distribution">
 				<assert_contents>
-					<has_line_matching expression="'99 1 1 99" />
+					<has_line_matching
+						expression="99 1 1 99" />
 				</assert_contents>
 			</output>
 		</test>
--- a/filter-abund.xml	Wed Aug 06 18:32:24 2014 -0400
+++ b/filter-abund.xml	Mon Aug 18 07:02:05 2014 -0400
@@ -35,27 +35,24 @@
 			truevalue="--variable-coverage"
 			falsevalue=""
 			label="Variable coverage"
-			help="Only trim when a sequence has high enough coverage (median abundance > 20)" />
+			help="Only trim when a sequence has high enough coverage; median abundance > 20 (--variable_coverage)" />
 		<param	name="cutoff"
 			type="integer"
 			value="2"
 			label="cutoff"
-			help="Trim at k-mers below this abundance." />
+			help="Trim at k-mers below this abundance. (--cutoff)" />
 		<expand macro="input_counting_table_filename" />	
 	</inputs>
 	<outputs>
 		<!-- <expand macro="output_sequences" /> -->
 		<expand macro="output_sequences_single" />
 	</outputs>
- 	<stdio>
-        <!-- [HELP] If no exit code rule is defined, the tool will stop if anything is written to STDERR -->
-		<exit_code	range="1:"
-				level="fatal" />
-	</stdio>
-        <tests>
+	<expand macro="stdio" />
+	<tests>
                 <test interactor="api">
                         <param name="inputs" value="test-abund-read-2.fa" />
-                        <param name="input_counting_table_filename" value="test-abund-read-2.ct" ftype="ct" />
+			<param name="input_counting_table_filename"
+				value="test-abund-read-2.ct" ftype="ct" />
                         <output name="output">
 				<!-- <discover_dataset name="test-abund-read-2.fa.abundfilt"> -->
                                 	<assert_contents>
@@ -65,8 +62,10 @@
                         </output>
                 </test>
                 <test interactor="api">
-                        <param name="input_sequence_filename" value="test-abund-read-2.fa" />
-                        <param name="input_counting_table_filename" value="test-abund-read-2.ct" ftype="ct" />
+			<param name="input_sequence_filename"
+				value="test-abund-read-2.fa" />
+			<param name="input_counting_table_filename"
+				value="test-abund-read-2.ct" ftype="ct" />
 			<param name="cutoff" value="1" />
                         <output name="output">
 				<!-- <discover_dataset name="test-abund-read-2.fa.abundfilt"> -->
--- a/filter-below-abund.xml	Wed Aug 06 18:32:24 2014 -0400
+++ b/filter-below-abund.xml	Mon Aug 18 07:02:05 2014 -0400
@@ -2,7 +2,8 @@
 	name="Filter below abundance cutoff of 50"
 	version="1.1-1"
 	force_history_refresh="true">
-	
+
+<!-- Work in progress, gating on filter-below-abund.py being upgraded -->
 	<description>
 		Trims fastq/fasta sequences at k-mers with abundance below 50
 		based on a provided k-mer counting table.
@@ -29,11 +30,7 @@
 		<!-- <expand macro="output_sequences" /> -->
 		<expand macro="output_sequences_single" />
 	</outputs>
- 	<stdio>
-        <!-- [HELP] If no exit code rule is defined, the tool will stop if anything is written to STDERR -->
-		<exit_code	range="1:"
-				level="fatal" />
-	</stdio>
+	<expand macro="stdio" />
 	<!--        <tests>
                 <test interactor="api">
                         <param name="inputs" value="test-abund-read-2.fa" />
--- a/macros.xml	Wed Aug 06 18:32:24 2014 -0400
+++ b/macros.xml	Mon Aug 18 07:02:05 2014 -0400
@@ -15,7 +15,7 @@
   --n_tables=$parameters.n_tables
   --min-tablesize=$parameters.tablesize_specific
   #end if</token>
-	<token name="@THREADS@">--threads \$GALAXY_SLOTS</token>
+	<token name="@THREADS@">--threads \${GALAXY_SLOTS:-4}</token>
 	<xml name="tableinputs">
 		<conditional name="parameters">
 			<param	name="type"
@@ -43,7 +43,8 @@
 						Animal Transcriptome
 					</option>
 					<option value="4e9">
-						Small Animal Genome or Low-Diversity Metagenome
+						Small Animal Genome or
+						Low-Diversity Metagenome
 					</option>
 					<option value="16e9">
 						Large Animal Genome
@@ -117,7 +118,7 @@
                         truevalue=""
                         falsevalue="--no-zero"
                         checked="true" 
-                        help="Output zero count bins" />
+                        help="Output zero count bins (--no-zero)" />
 	</xml>
 	<xml name="software-citation">
 		<citation type="bibtex">@article{khmer2014,
@@ -149,5 +150,11 @@
 	<xml name="counting-citation">
 		<citation type="doi">10.1371/journal.pone.0101271</citation>
 	</xml>
-
+	<xml name="stdio">
+	<stdio>
+        <!-- [HELP] If no exit code rule is defined, the tool will stop if anything is written to STDERR -->
+		<exit_code	range="1:"
+				level="fatal" />
+	</stdio>
+	</xml>
 </macros>
--- a/normalize-by-median.xml	Wed Aug 06 18:32:24 2014 -0400
+++ b/normalize-by-median.xml	Mon Aug 18 07:02:05 2014 -0400
@@ -73,11 +73,7 @@
 		<!-- <expand macro="output_sequences" /> -->
 		<expand macro="output_sequences_single" />
 	</outputs>
- 	<stdio>
-        <!-- [HELP] If no exit code rule is defined, the tool will stop if anything is written to STDERR -->
-		<exit_code	range="1:"
-				level="fatal" />
-	</stdio>
+	<expand macro="stdio" />
 	
 	<tests>
 		<test interactor="api">