changeset 5:20344ce0c811 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit b9d202134c3c6d0e5c398c3ae75e410067fcfc52
author bgruening
date Wed, 23 Nov 2016 15:56:41 -0500
parents 288462ec2630
children 60edf2f8c28f
files awk.xml cat.xml easyjoin.xml find_and_replace.xml grep.xml macros.xml multijoin multijoin.xml replace_text_in_column.xml replace_text_in_line.xml sed.xml sort.xml sorted_uniq.xml test-data/grep_results2.html tool_dependencies.xml unfold_column.xml
diffstat 16 files changed, 55 insertions(+), 92 deletions(-) [+]
line wrap: on
line diff
--- a/awk.xml	Fri Mar 18 15:17:27 2016 -0400
+++ b/awk.xml	Wed Nov 23 15:56:41 2016 -0500
@@ -3,9 +3,9 @@
     <macros>
         <import>macros.xml</import>
     </macros>
-    <expand macro="requirements">
-        <requirement type="package" version="4.1.0">gnu_awk</requirement>
-    </expand>
+    <requirements>
+        <requirement type="package" version="4.1.3">gawk</requirement>
+    </requirements>
     <version_command>awk --version | head -n 1</version_command>
     <command>
 <![CDATA[
@@ -19,6 +19,9 @@
         > "$outfile"
 ]]>
     </command>
+    <configfiles>
+        <configfile name="awk_script">$code</configfile>
+    </configfiles>
     <inputs>
         <param name="infile" format="txt" type="data" label="File to process" />
         <param name="code" type="text" area="true" size="5x35" label="AWK Program" help="">
@@ -29,9 +32,6 @@
             </sanitizer>
         </param>
     </inputs>
-    <configfiles>
-        <configfile name="awk_script">$code</configfile>
-    </configfiles>
     <outputs>
         <data name="outfile" format_source="infile" metadata_source="infile"/>
     </outputs>
@@ -61,9 +61,6 @@
 
 - Awk by Example (http://www.ibm.com/developerworks/linux/library/l-awk1.html)
 - Long AWK tutorial (http://www.grymoire.com/Unix/Awk.html)
-- Learn AWK in 1 hour (http://www.selectorweb.com/awk.html)
-- awk cheat-sheet (http://cbi.med.harvard.edu/people/peshkin/sb302/awk_cheatsheets.pdf)
-- Collection of useful awk one-liners (http://student.northpark.edu/pemente/awk/awk1line.txt)
 
 -----
 
--- a/cat.xml	Fri Mar 18 15:17:27 2016 -0400
+++ b/cat.xml	Wed Nov 23 15:56:41 2016 -0500
@@ -1,8 +1,9 @@
 <tool id="tp_cat" name="Concatenate datasets" version="0.1.0">
     <description>tail-to-head (cat)</description>
-    <requirements>
-        <requirement type="package" version="8.22">gnu_coreutils</requirement>
-    </requirements>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements" />
     <version_command>
     <![CDATA[
         cat --version | head -n 1
@@ -84,5 +85,7 @@
     chr1  151278832  151279227  Z  0  -
     chr2  100000030  200000955  P  0  +
     chr2  100000015  200000999  Q  0  +
+
+@REFERENCES@
 ]]></help>
 </tool>
--- a/easyjoin.xml	Fri Mar 18 15:17:27 2016 -0400
+++ b/easyjoin.xml	Wed Nov 23 15:56:41 2016 -0500
@@ -3,7 +3,9 @@
     <macros>
         <import>macros.xml</import>
     </macros>
-    <expand macro="requirements" />
+    <expand macro="requirements">
+        <requirement type="package" version="5.18.1">perl</requirement>
+    </expand>
     <version_command>join --version | head -n 1</version_command>
     <command>
 <![CDATA[
--- a/find_and_replace.xml	Fri Mar 18 15:17:27 2016 -0400
+++ b/find_and_replace.xml	Wed Nov 23 15:56:41 2016 -0500
@@ -3,9 +3,12 @@
     <macros>
         <import>macros.xml</import>
     </macros>
-    <command interpreter="perl">
+    <requirements>
+        <requirement type="package" version="5.18.1">perl</requirement>
+    </requirements>
+    <command>
 <![CDATA[
-        find_and_replace
+        perl '$__tool_directory__/find_and_replace'
             #if $searchwhere.searchwhere_select == "column":
                 -c $searchwhere.column
             #end if
--- a/grep.xml	Fri Mar 18 15:17:27 2016 -0400
+++ b/grep.xml	Wed Nov 23 15:56:41 2016 -0500
@@ -3,9 +3,10 @@
     <macros>
         <import>macros.xml</import>
     </macros>
-    <expand macro="requirements">
-        <requirement type="package" version="2.14">gnu_grep</requirement>
-    </expand>
+    <requirements>
+        <requirement type="package" version="2.14">grep</requirement>
+        <requirement type="package" version="4.2.3.dev0">sed</requirement><!-- for ansi2html.sh -->
+    </requirements>
     <version_command>grep --version | head -n 1</version_command>
     <command>
 <![CDATA[
@@ -30,8 +31,6 @@
                  -- "${url_paste}"
                 '${infile}' | grep -v "^--$" > "${output}"
         #end if
-
-        ##grep_wrapper.sh '$infile' '$output' '$url_paste' $color -A $lines_after -B $lines_before $invert $case_sensitive
 ]]>
     </command>
     <inputs>
@@ -123,7 +122,7 @@
             <param name="lines_before" value="0" />
             <param name="lines_after" value="0" />
             <param name="color" value="NOCOLOR" />
-            <output name="output" file="egrep_results2.txt" />>
+            <output name="output" file="egrep_results2.txt" />
         </test>
     </tests>
     <help>
--- a/macros.xml	Fri Mar 18 15:17:27 2016 -0400
+++ b/macros.xml	Wed Nov 23 15:56:41 2016 -0500
@@ -1,11 +1,11 @@
 <macros>
     <xml name="requirements">
         <requirements>
-            <requirement type="package" version="8.22">gnu_coreutils</requirement>
+            <requirement type="package" version="8.25">coreutils</requirement>
             <yield/>
         </requirements>
     </xml>
-    <token name="@BASE_VERSION@">1.0</token>
+    <token name="@BASE_VERSION@">1.1</token>
     <xml name="stdio">
         <stdio>
             <!-- Anything other than zero is an error -->
--- a/multijoin	Fri Mar 18 15:17:27 2016 -0400
+++ b/multijoin	Wed Nov 23 15:56:41 2016 -0500
@@ -5,7 +5,6 @@
 use Data::Dumper;
 use Carp;
 use File::Basename;
-use Sort::Key::Natural qw(natsort);
 
 my $version = "0.1.1";
 my $field_sep = "\t";
@@ -68,7 +67,7 @@
 
 sub print_combined_data()
 {
-	my @keys = natsort keys %data ;
+	my @keys = sort keys %data ;
 
 	foreach my $key ( @keys ) {
 		my @outputs;
@@ -247,7 +246,7 @@
  --filler X     Fill missing values with X.
                 (Default: '$filler').
 
- --labels       When printning output headers with '-h', instead of using the file name,
+ --labels       When printing output headers with '-h', instead of using the file name,
                 use specific labels.
 		Each file name must be followed by a name.
 
--- a/multijoin.xml	Fri Mar 18 15:17:27 2016 -0400
+++ b/multijoin.xml	Wed Nov 23 15:56:41 2016 -0500
@@ -3,13 +3,12 @@
     <macros>
         <import>macros.xml</import>
     </macros>
-    <expand macro="requirements">
+    <requirements>
         <requirement type="package" version="5.18.1">perl</requirement>
-        <requirement type="package" version="1.0">text_processing_perl_packages</requirement>
-    </expand>
-    <command interpreter="perl">
+    </requirements>
+    <command>
 <![CDATA[
-    multijoin
+    perl '$__tool_directory__/multijoin'
         --key '$key_column'
         --values '$value_columns'
         --filler '$filler'
@@ -54,7 +53,7 @@
             <param name="key_column" value="4" />
             <param name="value_columns" value="c7,c8,c9" />
             <param name="output_header" value="True" />
-            <output name="outfile" file="multijoin_result1.txt" />
+            <output name="outfile" file="multijoin_result1.txt" lines_diff="2" />
         </test>
     </tests>
     <help>
--- a/replace_text_in_column.xml	Fri Mar 18 15:17:27 2016 -0400
+++ b/replace_text_in_column.xml	Wed Nov 23 15:56:41 2016 -0500
@@ -3,9 +3,9 @@
     <macros>
         <import>macros.xml</import>
     </macros>
-    <expand macro="requirements">
-        <requirement type="package" version="4.1.0">gnu_awk</requirement>
-    </expand>
+    <requirements>
+        <requirement type="package" version="4.1.3">gawk</requirement>
+    </requirements>
     <version_command>awk --version | head -n 1</version_command>
     <command>
 <![CDATA[
--- a/replace_text_in_line.xml	Fri Mar 18 15:17:27 2016 -0400
+++ b/replace_text_in_line.xml	Wed Nov 23 15:56:41 2016 -0500
@@ -3,9 +3,9 @@
     <macros>
         <import>macros.xml</import>
     </macros>
-    <expand macro="requirements">
-        <requirement type="package" version="4.2.2-sandbox">gnu_sed</requirement>
-    </expand>
+    <requirements>
+        <requirement type="package" version="4.2.3.dev0">sed</requirement>
+    </requirements>
     <version_command>sed --version | head -n 1</version_command>
     <command>
 <![CDATA[
--- a/sed.xml	Fri Mar 18 15:17:27 2016 -0400
+++ b/sed.xml	Wed Nov 23 15:56:41 2016 -0500
@@ -3,9 +3,9 @@
     <macros>
         <import>macros.xml</import>
     </macros>
-    <expand macro="requirements">
-        <requirement type="package" version="4.2.2-sandbox">gnu_sed</requirement>
-    </expand>
+    <requirements>
+        <requirement type="package" version="4.2.3.dev0">sed</requirement>
+    </requirements>
     <version_command>sed --version | head -n 1</version_command>
     <command>
 <![CDATA[
@@ -20,6 +20,11 @@
         > '$output'
 ]]>
     </command>
+    <configfiles>
+        <configfile name="sed_script">
+          $code
+        </configfile>
+    </configfiles>
     <inputs>
         <param format="txt" name="infile" type="data" label="File to process" />
         <param name="code" type="text" area="true" size="5x35" label="SED Program" help="">
@@ -43,11 +48,6 @@
             </when>
         </conditional>
     </inputs>
-    <configfiles>
-        <configfile name="sed_script">
-          $code
-        </configfile>
-    </configfiles>
     <outputs>
         <data name="output" format_source="infile" metadata_source="infile" />
     </outputs>
@@ -84,7 +84,6 @@
 - Long sed tutorial (http://www.grymoire.com/Unix/Sed.html)
 - sed faq with good examples (http://sed.sourceforge.net/sedfaq.html)
 - sed cheat-sheet (http://www.catonmat.net/download/sed.stream.editor.cheat.sheet.pdf)
-- Collection of useful sed one-liners (http://student.northpark.edu/pemente/sed/sed1line.txt)
 
 -----
 
--- a/sort.xml	Fri Mar 18 15:17:27 2016 -0400
+++ b/sort.xml	Wed Nov 23 15:56:41 2016 -0500
@@ -4,7 +4,7 @@
         <import>macros.xml</import>
     </macros>
     <expand macro="requirements">
-        <requirement type="package" version="4.2.2-sandbox">gnu_sed</requirement>
+        <requirement type="package" version="4.2.3.dev0">sed</requirement>
     </expand>
     <version_command>sort --version | head -n 1</version_command>
     <command>
--- a/sorted_uniq.xml	Fri Mar 18 15:17:27 2016 -0400
+++ b/sorted_uniq.xml	Wed Nov 23 15:56:41 2016 -0500
@@ -4,7 +4,7 @@
         <import>macros.xml</import>
     </macros>
     <expand macro="requirements">
-        <requirement type="package" version="4.2.2-sandbox">gnu_sed</requirement>
+        <requirement type="package" version="4.2.3.dev0">sed</requirement>
     </expand>
     <version_command>uniq --version | head -n 1</version_command>
     <command>
--- a/test-data/grep_results2.html	Fri Mar 18 15:17:27 2016 -0400
+++ b/test-data/grep_results2.html	Wed Nov 23 15:56:41 2016 -0500
@@ -290,17 +290,11 @@
 <body class="f9 b9">
 <pre>
 GCTATAG<span class="bold"><span class="f4">AAATGT</span></span>TAACATCGAATGTACATTATAAC
-<span class="f6">--</span>
 CAGCTAACAATC<span class="bold"><span class="f4">AAGCGT</span></span>TACAGATTAGCCCCCCCC
-<span class="f6">--</span>
 GAACTTGCGTAACGTACAAAAATGCAAGCA<span class="bold"><span class="f4">AAAAGT</span></span>
-<span class="f6">--</span>
 GCTCTGTTAATCTAGA<span class="bold"><span class="f4">AAATGT</span></span>GTCTCCCCCCCCCC
-<span class="f6">--</span>
 <span class="bold"><span class="f4">AATCGT</span></span>ATAGCTCGGGCCGGATACTAGTACACCCCC
-<span class="f6">--</span>
 GATATAGTGGATAACTAATGCTCCCCCAG<span class="bold"><span class="f4">AACTGT</span></span>T
-<span class="f6">--</span>
 GAACGGACTATAGCCGGTATCCAAACAT<span class="bold"><span class="f4">AAATGT</span></span>TC
 </pre>
 </body>
--- a/tool_dependencies.xml	Fri Mar 18 15:17:27 2016 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<?xml version="1.0"?>
-<tool_dependency>
-    <package name="gnu_coreutils" version="8.22">
-        <repository changeset_revision="ac64dfe4b1fb" name="package_gnu_coreutils_8_22" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-    <package name="gnu_awk" version="4.1.0">
-        <repository changeset_revision="f145f856ec57" name="package_gnu_awk_4_1_0" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-    <package name="gnu_grep" version="2.14">
-        <repository changeset_revision="d4d4eb7a0123" name="package_gnu_grep_2_14" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-    <package name="gnu_sed" version="4.2.2-sandbox">
-        <repository changeset_revision="76cc52f79dd4" name="package_gnu_sed_4_2_2_sandbox" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-    <package name="perl" version="5.18.1">
-        <repository changeset_revision="35f117d7396b" name="package_perl_5_18" owner="iuc" prior_installation_required="True" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-    <package name="text_processing_perl_packages" version="1.0">
-        <install version="1.0">
-            <actions>
-                <action type="setup_perl_environment">
-                    <repository changeset_revision="35f117d7396b" name="package_perl_5_18" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu">
-                        <package name="perl" version="5.18.1" />
-                    </repository>
-                   <!-- allow downloading and installing an Perl package from cpan.org-->
-                   <package>https://cpan.metacpan.org/authors/id/S/SA/SALVA/Sort-Key-1.33.tar.gz</package>
-                </action>
-            </actions>
-        </install>
-        <readme>
-            Needed perl packages.
-        </readme>
-    </package>
-</tool_dependency>
--- a/unfold_column.xml	Fri Mar 18 15:17:27 2016 -0400
+++ b/unfold_column.xml	Wed Nov 23 15:56:41 2016 -0500
@@ -3,10 +3,12 @@
     <macros>
         <import>macros.xml</import>
     </macros>
-    <expand macro="requirements" />
-    <command interpreter="python">
+    <requirements>
+        <requirement type="package" version="2.7.12">python</requirement>
+    </requirements>
+    <command>
 <![CDATA[
-        unfold_column.py
+        python '$__tool_directory__/unfold_column.py'
             '${infile}'
             $column
             "${delimiter}"