Mercurial > repos > bgruening > text_processing
changeset 14:fb4ff3c42cd3 draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 09b22cceacb34dd4c6c1b42890f93232df128208"
author | bgruening |
---|---|
date | Sat, 21 Mar 2020 13:49:11 -0400 |
parents | 0a8c6b61f0f4 |
children | 9ff72e942410 |
files | easyjoin.xml find_and_replace find_and_replace.xml |
diffstat | 3 files changed, 22 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/easyjoin.xml Wed Apr 03 13:56:01 2019 -0400 +++ b/easyjoin.xml Sat Mar 21 13:49:11 2020 -0400 @@ -1,4 +1,4 @@ -<tool id="tp_easyjoin_tool" name="Join" version="@BASE_VERSION@.1"> +<tool id="tp_easyjoin_tool" name="Join" version="@BASE_VERSION@.2"> <description>two files</description> <macros> <import>macros.xml</import> @@ -13,7 +13,7 @@ chmod +x sort-header && perl $__tool_directory__/easyjoin $jointype - -t ' ' + -t $'\t' $header -e '$empty_string_filler' -o auto @@ -29,7 +29,7 @@ <param name="infile1" format="tabular" type="data" label="1st file" /> <param name="column1" label="Column to use from 1st file" type="data_column" data_ref="infile1" accept_default="true" /> - <param name="infile2" format="txt" type="data" label="2nd File" /> + <param name="infile2" format="tabular" type="data" label="2nd File" /> <param name="column2" label="Column to use from 2nd file" type="data_column" data_ref="infile2" accept_default="true" /> <param name="jointype" type="select" label="Output lines appearing in">
--- a/find_and_replace Wed Apr 03 13:56:01 2019 -0400 +++ b/find_and_replace Sat Mar 21 13:49:11 2020 -0400 @@ -65,7 +65,7 @@ $perl_program = <<EOF; while ( <STDIN> ) { chomp ; - my \@columns = split ; + my \@columns = split /\t/; #not enough columns in this line - skip it next if ( \@columns < $find_in_specific_column ) ;
--- a/find_and_replace.xml Wed Apr 03 13:56:01 2019 -0400 +++ b/find_and_replace.xml Sat Mar 21 13:49:11 2020 -0400 @@ -1,4 +1,4 @@ -<tool id="tp_find_and_replace" name="Replace" version="@BASE_VERSION@.2"> +<tool id="tp_find_and_replace" name="Replace" version="@BASE_VERSION@.3"> <description>parts of text</description> <macros> <import>macros.xml</import> @@ -80,6 +80,23 @@ <param name="wholewords" value="True" /> <output name="outfile" file="find_and_replace_results1.txt" /> </test> + <!-- test that columns are split by tab not space. input has no tab loads of spaces + .. therefore the ftype needs to be set. + result should be the same as in test 1 which works on whole line --> + <test> + <param name="infile" value="find_and_replace1.txt" ftype="tabular" /> + <param name="find_pattern" value="day" /> + <param name="replace_pattern" value="great day" /> + <param name="is_regex" value="False" /> + <param name="global" value="true" /> + <param name="caseinsensitive" value="False" /> + <param name="wholewords" value="True" /> + <conditional name="searchwhere"> + <param name="searchwhere_select" value="column"/> + <param name="column" value="1" /> + </conditional> + <output name="outfile" file="find_and_replace_results1.txt" /> + </test> <test> <param name="infile" value="find_and_replace2.txt" /> <param name="find_pattern" value="^chr" />