Mercurial > repos > bgruening > replace_column_by_key_value_file
annotate replaceColumn.xml @ 0:cc18bac5afdb draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
author | bgruening |
---|---|
date | Fri, 24 Feb 2017 10:14:15 -0500 |
parents | |
children | d533e4b75800 |
rev | line source |
---|---|
0
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
1 <tool id="replace_column_with_key_value_file" name="Replace column" version="0.1"> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
2 <description>by values which are defined in a convert file</description> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
3 <command> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
4 <![CDATA[ |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
5 python '$replaceColumnScript' |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
6 ]]> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
7 </command> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
8 <configfiles> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
9 <configfile name="replaceColumnScript"> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
10 <![CDATA[ |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
11 import sys |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
12 |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
13 replace_file = '$replace_information' |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
14 original_file = '$original_file' |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
15 column = int("$column_replace") - 1 |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
16 ignore_start_lines = int("$skip_lines") |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
17 delimiter_local = "\t" if str("$delimiter") == "" else str("$delimiter") |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
18 |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
19 ## read conversion information to index |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
20 conversion = {} |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
21 |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
22 with open(replace_file, 'r') as conversion_file: |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
23 for line in conversion_file: |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
24 conv_key_value = line.strip().split() |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
25 if len(conv_key_value) == 2: |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
26 conversion[conv_key_value[0]] = conv_key_value[1] |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
27 |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
28 ## read file line by line, search for column entry if it can be replaced. Otherwise it will be skipped. |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
29 with open("output_file", 'w') as output: |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
30 with open(original_file) as original: |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
31 for i, line in enumerate(original): |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
32 if i < ignore_start_lines: |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
33 output.write(line) |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
34 continue |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
35 |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
36 if str("$delimiter") == "": |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
37 line_content = line.split() |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
38 else: |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
39 line_content = line.split(str("$delimiter")) |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
40 |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
41 out = list() |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
42 for j, line_content_column in enumerate(line_content): |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
43 if j == column: |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
44 if line_content_column in conversion: |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
45 out.append(conversion[line_content_column]) |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
46 else: |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
47 out.append(line_content_column) |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
48 |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
49 if len(out) == len(line_content): |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
50 output.write('%s\n' % delimiter_local.join(out)) |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
51 |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
52 ]]> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
53 </configfile> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
54 </configfiles> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
55 <inputs> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
56 <param name="original_file" type="data" format="tabular" |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
57 label="File in which you want to replace some values" |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
58 help="The entries of a specific column are replaced by the information given by the next input file." /> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
59 <param name="replace_information" type="data" format="tabular" |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
60 label="Replace information file" |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
61 help="This file contains in the first column the entries that should be replaced by the values of the second column." /> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
62 <param name="column_replace" type="data_column" data_ref="original_file" multiple="false" |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
63 label="Which column should be replaced?" /> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
64 <param name="skip_lines" type='integer' value='0' label="Skip this many starting lines" /> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
65 <param name="delimiter" type="select" label="Delimited by"> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
66 <option value="" selected="True">Tab</option> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
67 <option value=" ">Whitespace</option> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
68 <option value=".">Dot</option> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
69 <option value=",">Comma</option> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
70 <option value="-">Dash</option> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
71 <option value="_">Underscore</option> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
72 <option value="|">Pipe</option> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
73 </param> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
74 </inputs> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
75 <outputs> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
76 <data name="outfile_replace" format="txt" from_work_dir="output_file"/> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
77 </outputs> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
78 <tests> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
79 <test> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
80 <param name="replace_information" value="GRCh38_ensembl2UCSC.txt" ftype="tabular" /> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
81 <param name="original_file" value="original_file" ftype="tabular" /> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
82 <param name="column_replace" value="1"/> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
83 <param name="skip_lines" value="1"/> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
84 <param name="delimiter" value="" /> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
85 <output name="outfile_replace" file="result_file"/> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
86 </test> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
87 <test> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
88 <param name="replace_information" value="GRCh38_ensembl2UCSC.txt" ftype="tabular" /> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
89 <param name="original_file" value="empty_mapping" ftype="tabular" /> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
90 <param name="column_replace" value="1"/> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
91 <param name="skip_lines" value="1"/> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
92 <param name="delimiter" value="" /> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
93 <output name="outfile_replace" file="result_file_empty_mapping"/> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
94 </test> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
95 </tests> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
96 <help> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
97 <![CDATA[ |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
98 **What it does** |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
99 |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
100 This tool replaces the entries of a defined column with entries given by a replacement file. |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
101 For example the replacement file holds the information of the naming scheme of ensembl annotated chromosomes in the frist column and in the second the UCSC annotation. |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
102 A file which is having information about chromosomes in ensembl notation in column x can now be converted to a file which holds the same information but in UCSC annotation. |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
103 |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
104 A useful repository for ensembl and UCSC chromosomes mapping is: https://github.com/dpryan79/ChromosomeMappings |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
105 ]]> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
106 </help> |
cc18bac5afdb
planemo upload for repository https://github.com/bgruening/galaxytools/tree/replaceColumn/tools/replaceColumn commit 045006e0b2fe5b4fe96583949b0c757eb6a734a4
bgruening
parents:
diff
changeset
|
107 </tool> |