Mercurial > repos > devteam > cut_columns
comparison cutWrapper.xml @ 3:cec635fab700 draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-devteam/tree/master/tools/cut_columns commit e3d5231ad1ca93ad49117e9804266f371d863e82
| author | devteam |
|---|---|
| date | Fri, 05 Aug 2016 16:38:13 -0400 |
| parents | 842fab69c940 |
| children |
comparison
equal
deleted
inserted
replaced
| 2:842fab69c940 | 3:cec635fab700 |
|---|---|
| 1 <tool id="Cut1" name="Cut" version="1.0.1"> | 1 <tool id="Cut1" name="Cut" version="1.0.2"> |
| 2 <description>columns from a table</description> | 2 <description>columns from a table</description> |
| 3 <command interpreter="perl">cutWrapper.pl "${input}" "${columnList}" "${delimiter}" "${out_file1}"</command> | 3 <command> |
| 4 perl $__tool_directory__/cutWrapper.pl | |
| 5 "${input}" | |
| 6 "${columnList}" | |
| 7 "${delimiter}" | |
| 8 "${out_file1}" | |
| 9 </command> | |
| 4 <inputs> | 10 <inputs> |
| 5 <param name="columnList" type="text" value="c1,c2" label="Cut columns"/> | 11 <param name="columnList" type="text" value="c1,c2" label="Cut columns"/> |
| 6 <param name="delimiter" type="select" label="Delimited by"> | 12 <param name="delimiter" type="select" label="Delimited by"> |
| 7 <option value="T">Tab</option> | 13 <option value="T">Tab</option> |
| 8 <option value="Sp">Whitespace</option> | 14 <option value="Sp">Whitespace</option> |
| 21 <when value="T"> | 27 <when value="T"> |
| 22 <conditional name="input"> | 28 <conditional name="input"> |
| 23 <when datatype_isinstance="interval"> | 29 <when datatype_isinstance="interval"> |
| 24 <action type="format" default="tabular"> | 30 <action type="format" default="tabular"> |
| 25 <option type="from_param" name="columnList" column="0" offset="0"> <!-- chromCol is 1--> | 31 <option type="from_param" name="columnList" column="0" offset="0"> <!-- chromCol is 1--> |
| 26 | 32 |
| 27 <filter type="insert_column" column="0" value="interval"/> | 33 <filter type="insert_column" column="0" value="interval"/> |
| 28 | 34 |
| 29 <filter type="insert_column" ref="columnList" /> <!-- startCol --> | 35 <filter type="insert_column" ref="columnList" /> <!-- startCol --> |
| 30 | 36 |
| 31 <filter type="insert_column" ref="columnList" /> <!-- endCol --> | 37 <filter type="insert_column" ref="columnList" /> <!-- endCol --> |
| 32 | 38 |
| 33 <filter type="multiple_splitter" column="1" separator=","/> | 39 <filter type="multiple_splitter" column="1" separator=","/> |
| 34 <filter type="column_strip" column="1"/> <!-- get rid of all external whitespace --> | 40 <filter type="column_strip" column="1"/> <!-- get rid of all external whitespace --> |
| 35 <filter type="string_function" column="1" name="lower" /> | 41 <filter type="string_function" column="1" name="lower" /> |
| 36 <filter type="param_value" column="1" value="^c\d{1,}$" compare="re_search" keep="True"/> | 42 <filter type="param_value" column="1" value="^c\d{1,}$" compare="re_search" keep="True"/> |
| 37 <filter type="column_strip" column="1" strip="c"/> <!-- get rid of c's --> | 43 <filter type="column_strip" column="1" strip="c"/> <!-- get rid of c's --> |
| 38 <filter type="boolean" column="1" cast="int" /> | 44 <filter type="boolean" column="1" cast="int" /> |
| 39 | 45 |
| 40 <filter type="multiple_splitter" column="2" separator=","/> | 46 <filter type="multiple_splitter" column="2" separator=","/> |
| 41 <filter type="column_strip" column="2"/> <!-- get rid of all external whitespace --> | 47 <filter type="column_strip" column="2"/> <!-- get rid of all external whitespace --> |
| 42 <filter type="string_function" column="2" name="lower" /> | 48 <filter type="string_function" column="2" name="lower" /> |
| 43 <filter type="param_value" column="2" value="^c\d{1,}$" compare="re_search" keep="True"/> | 49 <filter type="param_value" column="2" value="^c\d{1,}$" compare="re_search" keep="True"/> |
| 44 <filter type="column_strip" column="2" strip="c"/> <!-- get rid of c's --> | 50 <filter type="column_strip" column="2" strip="c"/> <!-- get rid of c's --> |
| 45 <filter type="boolean" column="2" cast="int" /> | 51 <filter type="boolean" column="2" cast="int" /> |
| 46 | 52 |
| 47 <filter type="multiple_splitter" column="3" separator=","/> | 53 <filter type="multiple_splitter" column="3" separator=","/> |
| 48 <filter type="column_strip" column="3"/> <!-- get rid of all external whitespace --> | 54 <filter type="column_strip" column="3"/> <!-- get rid of all external whitespace --> |
| 49 <filter type="string_function" column="3" name="lower" /> | 55 <filter type="string_function" column="3" name="lower" /> |
| 50 <filter type="param_value" column="3" value="^c\d{1,}$" compare="re_search" keep="True"/> | 56 <filter type="param_value" column="3" value="^c\d{1,}$" compare="re_search" keep="True"/> |
| 51 <filter type="column_strip" column="3" strip="c"/> <!-- get rid of c's --> | 57 <filter type="column_strip" column="3" strip="c"/> <!-- get rid of c's --> |
| 52 <filter type="boolean" column="3" cast="int" /> | 58 <filter type="boolean" column="3" cast="int" /> |
| 53 | 59 |
| 54 <filter type="metadata_value" ref="input" name="chromCol" column="1" /> | 60 <filter type="metadata_value" ref="input" name="chromCol" column="1" /> |
| 55 <filter type="metadata_value" ref="input" name="startCol" column="2" /> | 61 <filter type="metadata_value" ref="input" name="startCol" column="2" /> |
| 56 <filter type="metadata_value" ref="input" name="endCol" column="3" /> | 62 <filter type="metadata_value" ref="input" name="endCol" column="3" /> |
| 57 | 63 |
| 58 </option> | 64 </option> |
| 59 </action> | 65 </action> |
| 60 | 66 |
| 61 <conditional name="out_file1"> | 67 <conditional name="out_file1"> |
| 62 <when datatype_isinstance="interval"> | 68 <when datatype_isinstance="interval"> |
| 63 <action type="metadata" name="chromCol"> | 69 <action type="metadata" name="chromCol"> |
| 64 <option type="from_param" name="columnList" column="0" offset="0"> <!-- chromCol is 0--> | 70 <option type="from_param" name="columnList" column="0" offset="0"> <!-- chromCol is 0--> |
| 65 <filter type="multiple_splitter" column="0" separator=","/> | 71 <filter type="multiple_splitter" column="0" separator=","/> |
| 66 <filter type="column_strip" column="0"/> <!-- get rid of all external whitespace --> | 72 <filter type="column_strip" column="0"/> <!-- get rid of all external whitespace --> |
| 67 <filter type="string_function" column="0" name="lower" /> | 73 <filter type="string_function" column="0" name="lower" /> |
| 68 <filter type="param_value" column="0" value="^c\d{1,}$" compare="re_search" keep="True"/> | 74 <filter type="param_value" column="0" value="^c\d{1,}$" compare="re_search" keep="True"/> |
| 69 <filter type="column_strip" column="0" strip="c"/> <!-- get rid of c's --> | 75 <filter type="column_strip" column="0" strip="c"/> <!-- get rid of c's --> |
| 70 <filter type="insert_column" value="1" iterate="True" column="0"/> | 76 <filter type="insert_column" value="1" iterate="True" column="0"/> |
| 71 <filter type="boolean" column="1" cast="int" /> | 77 <filter type="boolean" column="1" cast="int" /> |
| 72 <filter type="metadata_value" ref="input" name="chromCol" column="1" /> | 78 <filter type="metadata_value" ref="input" name="chromCol" column="1" /> |
| 73 </option> | 79 </option> |
| 74 </action> | 80 </action> |
| 75 | 81 |
| 76 <action type="metadata" name="startCol"> | 82 <action type="metadata" name="startCol"> |
| 77 <option type="from_param" name="columnList" column="0" offset="0"> <!-- startCol is 0--> | 83 <option type="from_param" name="columnList" column="0" offset="0"> <!-- startCol is 0--> |
| 78 <filter type="multiple_splitter" column="0" separator=","/> | 84 <filter type="multiple_splitter" column="0" separator=","/> |
| 79 <filter type="column_strip" column="0"/> <!-- get rid of all external whitespace --> | 85 <filter type="column_strip" column="0"/> <!-- get rid of all external whitespace --> |
| 80 <filter type="string_function" column="0" name="lower" /> | 86 <filter type="string_function" column="0" name="lower" /> |
| 83 <filter type="insert_column" value="1" iterate="True" column="0"/> | 89 <filter type="insert_column" value="1" iterate="True" column="0"/> |
| 84 <filter type="boolean" column="1" cast="int" /> | 90 <filter type="boolean" column="1" cast="int" /> |
| 85 <filter type="metadata_value" ref="input" name="startCol" column="1" /> | 91 <filter type="metadata_value" ref="input" name="startCol" column="1" /> |
| 86 </option> | 92 </option> |
| 87 </action> | 93 </action> |
| 88 | 94 |
| 89 <action type="metadata" name="endCol"> | 95 <action type="metadata" name="endCol"> |
| 90 <option type="from_param" name="columnList" column="0" offset="0"> <!-- endCol is 0--> | 96 <option type="from_param" name="columnList" column="0" offset="0"> <!-- endCol is 0--> |
| 91 <filter type="multiple_splitter" column="0" separator=","/> | 97 <filter type="multiple_splitter" column="0" separator=","/> |
| 92 <filter type="column_strip" column="0"/> <!-- get rid of all external whitespace --> | 98 <filter type="column_strip" column="0"/> <!-- get rid of all external whitespace --> |
| 93 <filter type="string_function" column="0" name="lower" /> | 99 <filter type="string_function" column="0" name="lower" /> |
| 96 <filter type="insert_column" value="1" iterate="True" column="0"/> | 102 <filter type="insert_column" value="1" iterate="True" column="0"/> |
| 97 <filter type="boolean" column="1" cast="int" /> | 103 <filter type="boolean" column="1" cast="int" /> |
| 98 <filter type="metadata_value" ref="input" name="endCol" column="1" /> | 104 <filter type="metadata_value" ref="input" name="endCol" column="1" /> |
| 99 </option> | 105 </option> |
| 100 </action> | 106 </action> |
| 101 | 107 |
| 102 <action type="metadata" name="nameCol" default="0"> | 108 <action type="metadata" name="nameCol" default="0"> |
| 103 <option type="from_param" name="columnList" column="0" offset="0"> <!-- nameCol is 0--> | 109 <option type="from_param" name="columnList" column="0" offset="0"> <!-- nameCol is 0--> |
| 104 <filter type="multiple_splitter" column="0" separator=","/> | 110 <filter type="multiple_splitter" column="0" separator=","/> |
| 105 <filter type="column_strip" column="0"/> <!-- get rid of all external whitespace --> | 111 <filter type="column_strip" column="0"/> <!-- get rid of all external whitespace --> |
| 106 <filter type="string_function" column="0" name="lower" /> | 112 <filter type="string_function" column="0" name="lower" /> |
| 109 <filter type="insert_column" value="1" iterate="True" column="0"/> | 115 <filter type="insert_column" value="1" iterate="True" column="0"/> |
| 110 <filter type="boolean" column="1" cast="int" /> | 116 <filter type="boolean" column="1" cast="int" /> |
| 111 <filter type="metadata_value" ref="input" name="nameCol" column="1" /> | 117 <filter type="metadata_value" ref="input" name="nameCol" column="1" /> |
| 112 </option> | 118 </option> |
| 113 </action> | 119 </action> |
| 114 | 120 |
| 115 <action type="metadata" name="strandCol" default="0"> | 121 <action type="metadata" name="strandCol" default="0"> |
| 116 <option type="from_param" name="columnList" column="0" offset="0"> <!-- strandCol is 0--> | 122 <option type="from_param" name="columnList" column="0" offset="0"> <!-- strandCol is 0--> |
| 117 <filter type="multiple_splitter" column="0" separator=","/> | 123 <filter type="multiple_splitter" column="0" separator=","/> |
| 118 <filter type="column_strip" column="0"/> <!-- get rid of all external whitespace --> | 124 <filter type="column_strip" column="0"/> <!-- get rid of all external whitespace --> |
| 119 <filter type="string_function" column="0" name="lower" /> | 125 <filter type="string_function" column="0" name="lower" /> |
| 121 <filter type="column_strip" column="0" strip="c"/> <!-- get rid of c's --> | 127 <filter type="column_strip" column="0" strip="c"/> <!-- get rid of c's --> |
| 122 <filter type="insert_column" value="1" iterate="True" column="0"/> | 128 <filter type="insert_column" value="1" iterate="True" column="0"/> |
| 123 <filter type="boolean" column="1" cast="int" /> | 129 <filter type="boolean" column="1" cast="int" /> |
| 124 <filter type="metadata_value" ref="input" name="strandCol" column="1" /> | 130 <filter type="metadata_value" ref="input" name="strandCol" column="1" /> |
| 125 </option> | 131 </option> |
| 126 </action> | 132 </action> |
| 127 </when> | 133 </when> |
| 128 </conditional> | 134 </conditional> |
| 129 | 135 |
| 130 </when> | 136 </when> |
| 131 </conditional> | 137 </conditional> |
| 132 </when> | 138 </when> |
| 133 </conditional> | 139 </conditional> |
| 134 </actions> | 140 </actions> |
| 139 <param name="columnList" value="c1,c4,c2,c3"/> | 145 <param name="columnList" value="c1,c4,c2,c3"/> |
| 140 <param name="delimiter" value="T"/> | 146 <param name="delimiter" value="T"/> |
| 141 <param name="input" value="1.bed"/> | 147 <param name="input" value="1.bed"/> |
| 142 <output name="out_file1" file="eq-cut.dat"/> | 148 <output name="out_file1" file="eq-cut.dat"/> |
| 143 </test> | 149 </test> |
| 150 <test> | |
| 151 <param name="columnList" value="c1,c4,c2-c3" /> | |
| 152 <param name="delimiter" value="T" /> | |
| 153 <param name="input" value="1.bed" /> | |
| 154 <output name="out_file1" file="eq-cut.dat" /> | |
| 155 </test> | |
| 144 </tests> | 156 </tests> |
| 145 <help> | 157 <help> |
| 146 | 158 |
| 147 .. class:: warningmark | 159 .. class:: warningmark |
| 148 | 160 |
| 154 | 166 |
| 155 Cutting columns 1 and 3 from:: | 167 Cutting columns 1 and 3 from:: |
| 156 | 168 |
| 157 apple,is,good | 169 apple,is,good |
| 158 windows,is,bad | 170 windows,is,bad |
| 171 linux,is,best | |
| 159 | 172 |
| 160 will give:: | 173 will give:: |
| 161 | 174 |
| 162 apple good | 175 apple good |
| 163 windows bad | 176 windows bad |
| 177 linux best | |
| 164 | 178 |
| 165 ----- | 179 ----- |
| 166 | 180 |
| 167 **What it does** | 181 **What it does** |
| 168 | 182 |
| 186 chr1 gene1 + | 200 chr1 gene1 + |
| 187 chr2 gene2 + | 201 chr2 gene2 + |
| 188 | 202 |
| 189 **cut** on columns "**c6,c5,c4,c1**" will return:: | 203 **cut** on columns "**c6,c5,c4,c1**" will return:: |
| 190 | 204 |
| 191 + 0 gene1 chr1 | 205 + 0 gene1 chr1 |
| 192 + 0 gene2 chr2 | 206 + 0 gene2 chr2 |
| 193 | 207 |
| 208 **cut** on columns "**c1-c3**" will return:: | |
| 209 | |
| 210 chr1 10 1000 | |
| 211 chr2 100 1500 | |
| 212 | |
| 194 | 213 |
| 195 **cut** on columns "**c8,c7,c4**" will return:: | 214 **cut** on columns "**c8,c7,c4**" will return:: |
| 196 | 215 |
| 197 . . gene1 | 216 . . gene1 |
| 198 . . gene2 | 217 . . gene2 |
| 199 | |
| 200 | |
| 201 </help> | 218 </help> |
| 202 </tool> | 219 </tool> |
