annotate regex.xml @ 5:96eb105e71d8 draft default tip

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 3eaa2a2bdaeedf1b0771b1b764a550106dcbc186
author galaxyp
date Thu, 02 Feb 2023 08:21:21 +0000
parents d72a404cef12
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5
96eb105e71d8 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 3eaa2a2bdaeedf1b0771b1b764a550106dcbc186
galaxyp
parents: 4
diff changeset
1 <tool id="regex1" name="Regex Find And Replace" version="1.0.3" profile="21.01">
0
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
2 <description></description>
2
6dcfb96bc8b0 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 8871a847daed1f996c0a2069c3e876685bf8d220"
galaxyp
parents: 1
diff changeset
3 <requirements>
6dcfb96bc8b0 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 8871a847daed1f996c0a2069c3e876685bf8d220"
galaxyp
parents: 1
diff changeset
4 <requirement type="package" version="3.7">python</requirement>
6dcfb96bc8b0 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 8871a847daed1f996c0a2069c3e876685bf8d220"
galaxyp
parents: 1
diff changeset
5 </requirements>
6dcfb96bc8b0 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 8871a847daed1f996c0a2069c3e876685bf8d220"
galaxyp
parents: 1
diff changeset
6 <command>
6dcfb96bc8b0 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 8871a847daed1f996c0a2069c3e876685bf8d220"
galaxyp
parents: 1
diff changeset
7 python '$__tool_directory__/regex.py'
6dcfb96bc8b0 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 8871a847daed1f996c0a2069c3e876685bf8d220"
galaxyp
parents: 1
diff changeset
8 --input '$input'
6dcfb96bc8b0 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 8871a847daed1f996c0a2069c3e876685bf8d220"
galaxyp
parents: 1
diff changeset
9 --output '$out_file1'
6dcfb96bc8b0 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 8871a847daed1f996c0a2069c3e876685bf8d220"
galaxyp
parents: 1
diff changeset
10 --input_display_name '$input.display_name'
0
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
11 #for $check in $checks:
2
6dcfb96bc8b0 "planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 8871a847daed1f996c0a2069c3e876685bf8d220"
galaxyp
parents: 1
diff changeset
12 --pattern='$check.pattern' --replacement='$check.replacement'
0
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
13 #end for
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
14 </command>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
15 <inputs>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
16 <param format="txt" name="input" type="data" label="Select lines from"/>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
17 <repeat name="checks" title="Check">
4
d72a404cef12 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit a9b01eafeefb50c416fbfe342b15298fe9321679
galaxyp
parents: 2
diff changeset
18 <param name="pattern" type="text" value="chr([0-9A-Za-z]+)" label="Find Regex" help="here you can enter text or regular expression (for syntax check lower part of this frame)">
0
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
19 <sanitizer>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
20 <valid>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
21 <add preset="string.printable"/>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
22 <remove value="&#92;" />
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
23 <remove value="&apos;" />
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
24 </valid>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
25 <mapping initial="none">
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
26 <add source="&#92;" target="__backslash__" />
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
27 <add source="&apos;" target="__sq__"/>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
28 </mapping>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
29 </sanitizer>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
30 </param>
4
d72a404cef12 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit a9b01eafeefb50c416fbfe342b15298fe9321679
galaxyp
parents: 2
diff changeset
31 <param name="replacement" type="text" value="newchr\1" label="Replacement">
0
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
32 <sanitizer>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
33 <valid>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
34 <add preset="string.printable"/>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
35 <remove value="&#92;" />
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
36 <remove value="&apos;" />
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
37 </valid>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
38 <mapping initial="none">
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
39 <add source="&#92;" target="__backslash__" />
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
40 <add source="&apos;" target="__sq__"/>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
41 </mapping>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
42 </sanitizer>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
43 </param>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
44 </repeat>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
45 </inputs>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
46 <outputs>
5
96eb105e71d8 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 3eaa2a2bdaeedf1b0771b1b764a550106dcbc186
galaxyp
parents: 4
diff changeset
47 <data format_source="input" name="out_file1" metadata_source="input"/>
0
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
48 </outputs>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
49 <tests>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
50 <test>
5
96eb105e71d8 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 3eaa2a2bdaeedf1b0771b1b764a550106dcbc186
galaxyp
parents: 4
diff changeset
51 <param name="input" value="find1.txt" ftype="txt"/>
0
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
52 <param name="pattern" value="(T\w+)"/>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
53 <param name="replacement" value="\1 \1" />
5
96eb105e71d8 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 3eaa2a2bdaeedf1b0771b1b764a550106dcbc186
galaxyp
parents: 4
diff changeset
54 <output name="out_file1" file="replace1.txt" ftype="txt"/>
0
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
55 </test>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
56 <test>
5
96eb105e71d8 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 3eaa2a2bdaeedf1b0771b1b764a550106dcbc186
galaxyp
parents: 4
diff changeset
57 <param name="input" value="find1.txt" ftype="txt"/>
0
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
58 <param name="pattern" value="f"/>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
59 <param name="replacement" value="'&quot;" />
5
96eb105e71d8 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 3eaa2a2bdaeedf1b0771b1b764a550106dcbc186
galaxyp
parents: 4
diff changeset
60 <output name="out_file1" file="replace2.txt" ftype="txt"/>
0
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
61 </test>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
62 <test>
5
96eb105e71d8 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 3eaa2a2bdaeedf1b0771b1b764a550106dcbc186
galaxyp
parents: 4
diff changeset
63 <param name="input" value="find1.txt" ftype="txt"/>
0
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
64 <param name="checks_0|pattern" value="a test file"/>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
65 <param name="checks_0|replacement" value="a file named #{input_name}" />
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
66 <param name="checks_1|pattern" value="see here"/>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
67 <param name="checks_1|replacement" value="see #{input_name}" />
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
68 <param name="checks_2|pattern" value="see (find1).txt"/>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
69 <param name="checks_2|replacement" value="see \1" />
5
96eb105e71d8 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 3eaa2a2bdaeedf1b0771b1b764a550106dcbc186
galaxyp
parents: 4
diff changeset
70 <output name="out_file1" file="replace3.txt" ftype="txt"/>
0
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
71 </test>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
72 </tests>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
73 <help>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
74 This tool goes line by line through the specified input file and
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
75 replaces text which matches the specified regular expression patterns
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
76 with its corresponding specified replacement.
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
77
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
78 This tool uses Python regular expressions. More information about
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
79 Python regular expressions can be found here:
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
80 http://docs.python.org/library/re.html.
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
81
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
82 To convert an Ilumina FATSQ sequence id from the CAVASA 8 format::
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
83
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
84 @EAS139:136:FC706VJ:2:2104:15343:197393 1:Y:18:ATCACG
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
85 GGGTGATGGCCGCTGCCGATGGCGTCAAATCCCACC
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
86 +EAS139:136:FC706VJ:2:2104:15343:197393 1:Y:18:ATCACG
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
87 IIIIIIIIIIIIIIIIIIIIIIIIIIIIII9IG9IC
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
88
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
89 To the CASAVA 7 format::
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
90
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
91 @EAS139_FC706VJ:2:2104:15343:197393#0/1
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
92 GGGTGATGGCCGCTGCCGATGGCGTCAAATCCCACC
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
93 +EAS139_FC706VJ:2:2104:15343:197393#0/1
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
94 IIIIIIIIIIIIIIIIIIIIIIIIIIIIII9IG9IC
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
95
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
96 Use Settings::
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
97
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
98 Find Regex: ^([@+][A-Z0-9]+):\d+:(\S+)\s(\d).*$
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
99 Replacement: \1_\2#0/\3
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
100
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
101 Note that the parentheses **()** capture patterns in the text that can be used in the replacement text by using a backslash-number reference: **\\1**
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
102
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
103 The regex **^([@+][A-Z0-9]+):\d+:(\S+) (\d).*$** means::
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
104
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
105 ^ - start the match at the beginning of the line of text
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
106 ( - start a group (1), that is a string of matched text, that can be back-referenced in the replacement as \1
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
107 [@+] - matches either a @ or + character
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
108 [A-Z0-9]+ - matches an uppercase letter or a digit, the plus sign means to match 1 or more such characters
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
109 ) - end a group (1), that is a string of matched text, that can be back-referenced in the replacement as \1
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
110 :\d+: - matches a colon followed by one or more digits followed by a colon character
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
111 (\S+) - matches one or more non-whitespace charcters, the enclosing parentheses make this a group (2) that can back-referenced in the replacement text as \2
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
112 \s - matches a whitespace character
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
113 (\d) - matches a single digit character, the enclosing parentheses make this a group (3) that can back-referenced in the replacement text as \3
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
114 .* - dot means match any character, asterisk means zero more more matches
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
115 $ - the regex must match to the end of the line of text
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
116
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
117 In the replacement pattern, use the special token #{input_name} to insert the input dataset's display name.
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
118 The name can be modified by a second find/replace check. Suppose you want to insert the sample id of your dataset,
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
119 named **Sample ABC123**, into the dataset itself, which currently contains the lines::
1
bf0c0905fd60 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 7283e44acd11cd11400a191d3b766885919956b4
galaxyp
parents: 0
diff changeset
120
bf0c0905fd60 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 7283e44acd11cd11400a191d3b766885919956b4
galaxyp
parents: 0
diff changeset
121 Data 1
bf0c0905fd60 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 7283e44acd11cd11400a191d3b766885919956b4
galaxyp
parents: 0
diff changeset
122 Data 2
bf0c0905fd60 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 7283e44acd11cd11400a191d3b766885919956b4
galaxyp
parents: 0
diff changeset
123 Data 3
0
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
124
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
125 You can use the following checks::
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
126
1
bf0c0905fd60 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 7283e44acd11cd11400a191d3b766885919956b4
galaxyp
parents: 0
diff changeset
127 Find Regex: Data
bf0c0905fd60 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 7283e44acd11cd11400a191d3b766885919956b4
galaxyp
parents: 0
diff changeset
128 Replacement: #{input_name} Data
bf0c0905fd60 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 7283e44acd11cd11400a191d3b766885919956b4
galaxyp
parents: 0
diff changeset
129
bf0c0905fd60 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 7283e44acd11cd11400a191d3b766885919956b4
galaxyp
parents: 0
diff changeset
130 Find Regex: Sample (\S+)
bf0c0905fd60 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 7283e44acd11cd11400a191d3b766885919956b4
galaxyp
parents: 0
diff changeset
131 Replacement: \1
0
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
132
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
133 The result will be::
1
bf0c0905fd60 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 7283e44acd11cd11400a191d3b766885919956b4
galaxyp
parents: 0
diff changeset
134
bf0c0905fd60 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 7283e44acd11cd11400a191d3b766885919956b4
galaxyp
parents: 0
diff changeset
135 ABC123 Data 1
bf0c0905fd60 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 7283e44acd11cd11400a191d3b766885919956b4
galaxyp
parents: 0
diff changeset
136 ABC123 Data 2
bf0c0905fd60 planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 7283e44acd11cd11400a191d3b766885919956b4
galaxyp
parents: 0
diff changeset
137 ABC123 Data 3
0
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
138
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
139
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
140
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
141 Galaxy aggressively escapes input supplied to tools, so if something
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
142 is not working please let us know and we can look into whether this is
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
143 the cause. Also if you would like help constructing regular
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
144 expressions for your inputs, please let us know at help@msi.umn.edu.
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
145 </help>
002f95cf9d6e planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/regex_find_replace commit 568a615b191482c54ecb31399ba27f78d6c71510
galaxyp
parents:
diff changeset
146 </tool>