2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/55a425f1f2f3/ changeset: 55a425f1f2f3 branch: next-stable user: jgoecks date: 2013-03-21 17:19:14 summary: Add support for column ranges to Cut tool. Thank to John Chilton for this code. affected #: 2 files diff -r b76683ec3daaf3058a93b4aff00aee4e1c5f9331 -r 55a425f1f2f363f6e9fe94ab539bb58daeb8d136 tools/filters/cutWrapper.pl --- a/tools/filters/cutWrapper.pl +++ b/tools/filters/cutWrapper.pl @@ -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 b76683ec3daaf3058a93b4aff00aee4e1c5f9331 -r 55a425f1f2f363f6e9fe94ab539bb58daeb8d136 tools/filters/cutWrapper.xml --- a/tools/filters/cutWrapper.xml +++ b/tools/filters/cutWrapper.xml @@ -1,4 +1,4 @@ -<tool id="Cut1" name="Cut" version="1.0.1"> +<tool id="Cut1" name="Cut" version="1.0.2"><description>columns from a table</description><command interpreter="perl">cutWrapper.pl $input "$columnList" $delimiter $out_file1</command><inputs> @@ -141,6 +141,12 @@ <param name="input" value="1.bed"/><output name="out_file1" file="eq-cut.dat"/></test> + <test> + <param name="columnList" value="c1,c4,c2-c3" /> + <param name="delimiter" value="T" /> + <param name="input" value="1.bed" /> + <output name="out_file1" file="eq-cut.dat" /> + </test></tests><help> @@ -191,6 +197,11 @@ + 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:: https://bitbucket.org/galaxy/galaxy-central/commits/0ce683ac64b9/ changeset: 0ce683ac64b9 user: jgoecks date: 2013-03-21 17:19:45 summary: Merge in next-stable affected #: 2 files diff -r 3e43e8c42bc19eca2532989f83adbc8811062f62 -r 0ce683ac64b95a2d6f6738407e8f69c7087a6b30 tools/filters/cutWrapper.pl --- a/tools/filters/cutWrapper.pl +++ b/tools/filters/cutWrapper.pl @@ -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 3e43e8c42bc19eca2532989f83adbc8811062f62 -r 0ce683ac64b95a2d6f6738407e8f69c7087a6b30 tools/filters/cutWrapper.xml --- a/tools/filters/cutWrapper.xml +++ b/tools/filters/cutWrapper.xml @@ -1,4 +1,4 @@ -<tool id="Cut1" name="Cut" version="1.0.1"> +<tool id="Cut1" name="Cut" version="1.0.2"><description>columns from a table</description><command interpreter="perl">cutWrapper.pl $input "$columnList" $delimiter $out_file1</command><inputs> @@ -141,6 +141,12 @@ <param name="input" value="1.bed"/><output name="out_file1" file="eq-cut.dat"/></test> + <test> + <param name="columnList" value="c1,c4,c2-c3" /> + <param name="delimiter" value="T" /> + <param name="input" value="1.bed" /> + <output name="out_file1" file="eq-cut.dat" /> + </test></tests><help> @@ -191,6 +197,11 @@ + 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:: Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.