# HG changeset patch
# User devteam
# Date 1470429477 14400
# Node ID f848742a0c1a43fb0c9dc1bf25b19a66dfdf8ba7
# Parent aa367513335f697766612f6158af778eb37f977e
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/cut_columns commit e3d5231ad1ca93ad49117e9804266f371d863e82
diff -r aa367513335f -r f848742a0c1a cutWrapper.pl
--- a/cutWrapper.pl Mon Nov 09 11:28:29 2015 -0500
+++ b/cutWrapper.pl Fri Aug 05 16:37:57 2016 -0400
@@ -9,6 +9,9 @@
my @out = ();
my $command = "";
my $field = 0;
+my $start = 0;
+my $end = 0;
+my $i = 0;
# a wrapper for cut for use in galaxy
# cutWrapper.pl [filename] [columns] [delim] [output]
@@ -20,6 +23,13 @@
if (m/^c\d{1,}$/i) {
push (@columns, $_);
$columns[@columns-1] =~s/c//ig;
+ } elsif (m/^c\d{1,}-c\d{1,}$/i) {
+ ($start, $end) = split(/-/, $_);
+ $start =~ s/c//ig;
+ $end =~ s/c//ig;
+ for $i ($start .. $end) {
+ push (@columns, $i);
+ }
}
}
diff -r aa367513335f -r f848742a0c1a cutWrapper.xml
--- a/cutWrapper.xml Mon Nov 09 11:28:29 2015 -0500
+++ b/cutWrapper.xml Fri Aug 05 16:37:57 2016 -0400
@@ -1,202 +1,219 @@
-
- columns from a table
- cutWrapper.pl "${input}" "${columnList}" "${delimiter}" "${out_file1}"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-.. class:: warningmark
-
-**WARNING: This tool breaks column assignments.** To re-establish column assignments run the tools and click on the pencil icon in the latest history item.
-
-.. class:: infomark
-
-The output of this tool is always in tabular format (e.g., if your original delimiters are commas, they will be replaced with tabs). For example:
-
- Cutting columns 1 and 3 from::
-
- apple,is,good
- windows,is,bad
-
- will give::
-
- apple good
- windows bad
-
------
-
-**What it does**
-
-This tool selects (cuts out) specified columns from the dataset.
-
-- Columns are specified as **c1**, **c2**, and so on. Column count begins with **1**
-- Columns can be specified in any order (e.g., **c2,c1,c6**)
-- If you specify more columns than actually present - empty spaces will be filled with dots
-
------
-
-**Example**
-
-Input dataset (six columns: c1, c2, c3, c4, c5, and c6)::
-
- chr1 10 1000 gene1 0 +
- chr2 100 1500 gene2 0 +
-
-**cut** on columns "**c1,c4,c6**" will return::
-
- chr1 gene1 +
- chr2 gene2 +
-
-**cut** on columns "**c6,c5,c4,c1**" will return::
-
- + 0 gene1 chr1
- + 0 gene2 chr2
-
-
-**cut** on columns "**c8,c7,c4**" will return::
-
- . . gene1
- . . gene2
-
-
-
-
+
+ columns from a table
+
+ perl $__tool_directory__/cutWrapper.pl
+ "${input}"
+ "${columnList}"
+ "${delimiter}"
+ "${out_file1}"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+.. class:: warningmark
+
+**WARNING: This tool breaks column assignments.** To re-establish column assignments run the tools and click on the pencil icon in the latest history item.
+
+.. class:: infomark
+
+The output of this tool is always in tabular format (e.g., if your original delimiters are commas, they will be replaced with tabs). For example:
+
+ Cutting columns 1 and 3 from::
+
+ apple,is,good
+ windows,is,bad
+ linux,is,best
+
+ will give::
+
+ apple good
+ windows bad
+ linux best
+
+-----
+
+**What it does**
+
+This tool selects (cuts out) specified columns from the dataset.
+
+- Columns are specified as **c1**, **c2**, and so on. Column count begins with **1**
+- Columns can be specified in any order (e.g., **c2,c1,c6**)
+- If you specify more columns than actually present - empty spaces will be filled with dots
+
+-----
+
+**Example**
+
+Input dataset (six columns: c1, c2, c3, c4, c5, and c6)::
+
+ chr1 10 1000 gene1 0 +
+ chr2 100 1500 gene2 0 +
+
+**cut** on columns "**c1,c4,c6**" will return::
+
+ chr1 gene1 +
+ chr2 gene2 +
+
+**cut** on columns "**c6,c5,c4,c1**" will return::
+
+ + 0 gene1 chr1
+ + 0 gene2 chr2
+
+**cut** on columns "**c1-c3**" will return::
+
+ chr1 10 1000
+ chr2 100 1500
+
+
+**cut** on columns "**c8,c7,c4**" will return::
+
+ . . gene1
+ . . gene2
+
+