Repository revision
20:fbf99087e067

Repository 'text_processing'
hg clone https://toolshed.g2.bx.psu.edu/repos/bgruening/text_processing

Replace tool metadata
Miscellaneous
Replace
parts of text
tp_find_and_replace
toolshed.g2.bx.psu.edu/repos/bgruening/text_processing/tp_find_and_replace/9.3+galaxy1
9.3+galaxy1
None
True
Version lineage of this tool (guids ordered most recent to oldest)
toolshed.g2.bx.psu.edu/repos/bgruening/text_processing/tp_find_and_replace/9.3+galaxy1 (this tool)
toolshed.g2.bx.psu.edu/repos/bgruening/text_processing/tp_find_and_replace/1.0.0
tp_find_and_replace
Requirements (dependencies defined in the <requirements> tag set)
name version type
perl 5.32 package
Additional information about this tool
#for $i, $el in enumerate($find_and_replace)
            #if $i == (len($find_and_replace) - 1)
                #set $join = ""
            #else 
                #set $join = "|"
            #end if
            perl '$__tool_directory__/find_and_replace'
                #if $el.searchwhere.searchwhere_select == "column":
                    -c $el.searchwhere.column
                #end if
                #if $i == (len($find_and_replace) - 1)
                    -o '$outfile'
                #end if
                $el.global
                $el.caseinsensitive
                $el.wholewords
                $el.skip_first_line
                $el.is_regex
                '$el.find_pattern'
                '$el.replace_pattern'
                #if $i == 0
                    '$infile'
                #end if
                $join
        #end for        

    
None
False
Functional tests
name inputs outputs required files
Test-1 infile: find_and_replace1.txt
find_and_replace_0|find_pattern: day
find_and_replace_0|replace_pattern: great day
find_and_replace_0|is_regex: False
find_and_replace_0|global: True
find_and_replace_0|caseinsensitive: False
find_and_replace_0|wholewords: True
name: value
find_and_replace1.txt
value
Test-2 infile: find_and_replace1.txt
find_and_replace_0|find_pattern: day
find_and_replace_0|replace_pattern: great day
find_and_replace_0|is_regex: False
find_and_replace_0|global: True
find_and_replace_0|caseinsensitive: False
find_and_replace_0|wholewords: True
find_and_replace_0|searchwhere|column: 1
find_and_replace_0|searchwhere|searchwhere_select: column
name: value
find_and_replace1.txt
value
Test-3 infile: find_and_replace2.txt
find_and_replace_0|find_pattern: ^chr
find_and_replace_0|replace_pattern:
find_and_replace_0|is_regex: True
find_and_replace_0|caseinsensitive: False
find_and_replace_0|wholewords: False
find_and_replace_0|searchwhere|column: 3
find_and_replace_0|searchwhere|searchwhere_select: column
name: value
find_and_replace2.txt
value
Test-4 infile: find_and_replace1.txt
find_and_replace_0|find_pattern: day
find_and_replace_0|replace_pattern: great day
find_and_replace_0|is_regex: False
find_and_replace_0|global: True
find_and_replace_0|caseinsensitive: False
find_and_replace_0|wholewords: True
find_and_replace_1|find_pattern: great
find_and_replace_1|replace_pattern: best
find_and_replace_1|is_regex: False
find_and_replace_1|global: False
find_and_replace_1|caseinsensitive: False
find_and_replace_1|wholewords: True
name: value
find_and_replace1.txt
value