Mercurial > repos > bgruening > text_processing
annotate easyjoin.xml @ 12:062ed2bb4f2e draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit f8896018f5b980a456c4ceaffe0ed457dc80b5a8
| author | bgruening |
|---|---|
| date | Thu, 02 Jun 2016 08:58:39 -0400 |
| parents | c78b1767db2b |
| children | 3c685c4106b3 |
| rev | line source |
|---|---|
| 4 | 1 <tool id="tp_easyjoin_tool" name="Join" version="@BASE_VERSION@.0"> |
| 0 | 2 <description>two files</description> |
| 4 | 3 <macros> |
| 4 <import>macros.xml</import> | |
| 5 </macros> | |
|
8
fa7f88da29d7
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 369e40078146d00608d52205bb8cee66ae735b76-dirty
bgruening
parents:
6
diff
changeset
|
6 <expand macro="requirements" /> |
| 4 | 7 <version_command>join --version | head -n 1</version_command> |
| 8 <command> | |
| 9 <![CDATA[ | |
|
8
fa7f88da29d7
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 369e40078146d00608d52205bb8cee66ae735b76-dirty
bgruening
parents:
6
diff
changeset
|
10 cp $__tool_directory__/sort-header ./ && |
| 4 | 11 chmod +x sort-header && |
|
8
fa7f88da29d7
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 369e40078146d00608d52205bb8cee66ae735b76-dirty
bgruening
parents:
6
diff
changeset
|
12 perl $__tool_directory__/easyjoin |
| 4 | 13 $jointype |
| 14 -t ' ' | |
| 15 $header | |
| 16 -e '$empty_string_filler' | |
| 17 -o auto | |
| 18 $ignore_case | |
| 19 -1 '$column1' | |
| 20 -2 '$column2' | |
| 21 "$infile1" | |
| 22 "$infile2" | |
| 23 > '$output' | |
| 24 ]]> | |
| 0 | 25 </command> |
| 4 | 26 <inputs> |
| 27 <param name="infile1" format="tabular" type="data" label="1st file" /> | |
| 28 <param name="column1" label="Column to use from 1st file" type="data_column" data_ref="infile1" accept_default="true" /> | |
| 0 | 29 |
| 4 | 30 <param name="infile2" format="txt" type="data" label="2nd File" /> |
| 31 <param name="column2" label="Column to use from 2nd file" type="data_column" data_ref="infile2" accept_default="true" /> | |
| 0 | 32 |
| 33 <param name="jointype" type="select" label="Output lines appearing in"> | |
| 4 | 34 <option value=" " selected="True">Both 1st & 2nd file.</option> |
| 35 <option value="-v 1">1st but not in 2nd file. (-v 1)</option> | |
| 36 <option value="-v 2">2nd but not in 1st file. (-v 2)</option> | |
| 37 <option value="-a 1">Both 1st & 2nd file, plus unpairable lines from 1st file. (-a 1)</option> | |
| 38 <option value="-a 2">Both 1st & 2nd file, plus unpairable lines from 2st file. (-a 2)</option> | |
| 39 <option value="-a 1 -a 2">All lines [-a 1 -a 2]</option> | |
| 0 | 40 <option value="-v 1 -v 2">All unpairable lines [-v 1 -v 2]</option> |
| 41 </param> | |
| 42 | |
| 4 | 43 <param name="header" type="boolean" checked="false" truevalue="--header" falsevalue="" |
| 44 label="First line is a header line" help="Use if first line contains column headers. It will not be sorted." /> | |
| 45 <param name="ignore_case" type="boolean" checked="false" truevalue="-i" falsevalue="" | |
| 46 label="Ignore case" help="Sort and Join key column values regardless of upper/lower case letters." /> | |
|
10
c78b1767db2b
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/text_processing commit 10052765d6b712cf7d38356af4251fcc38a339b6-dirty
bgruening
parents:
8
diff
changeset
|
47 <param name="empty_string_filler" type="text" value="0" label="Value to put in unpaired (empty) fields"> |
| 0 | 48 <sanitizer> |
| 49 <valid initial="string.printable"> | |
| 50 <remove value="'"/> | |
| 51 </valid> | |
| 52 </sanitizer> | |
| 53 </param> | |
| 4 | 54 </inputs> |
| 55 <outputs> | |
| 6 | 56 <data name="output" format_source="infile1" metadata_source="infile1"/> |
| 4 | 57 </outputs> |
| 58 <tests> | |
| 59 <test> | |
| 60 <param name="infile1" value="easyjoin1.tabular" /> | |
| 61 <param name="column1" value="1" /> | |
| 62 <param name="infile2" value="easyjoin2.tabular" /> | |
| 63 <param name="column2" value="1" /> | |
| 64 <param name="header" value="True" /> | |
| 65 <param name="jointype" value="-a 1 -a 2" /> | |
| 66 <output name="output" file="easyjoin_result1.tabular" /> | |
| 67 </test> | |
| 68 </tests> | |
| 69 <help> | |
| 70 <![CDATA[ | |
| 0 | 71 **What it does** |
| 72 | |
| 73 This tool joins two tabular files based on a common key column. | |
| 74 | |
| 75 ----- | |
| 76 | |
| 77 **Example** | |
| 78 | |
| 79 **First file**:: | |
| 80 | |
| 81 Fruit Color | |
| 82 Apple red | |
| 83 Banana yellow | |
| 84 Orange orange | |
| 85 Melon green | |
| 86 | |
| 87 **Second File**:: | |
| 88 | |
| 89 Fruit Price | |
| 90 Orange 7 | |
| 91 Avocado 8 | |
| 92 Apple 4 | |
| 93 Banana 3 | |
| 94 | |
| 95 **Joining** both files, using **key column 1** and a **header line**, will return:: | |
| 96 | |
| 97 Fruit Color Price | |
| 98 Apple red 4 | |
| 99 Avocado . 8 | |
| 100 Banana yellow 3 | |
| 101 Melon green . | |
| 102 Orange orange 7 | |
| 103 | |
| 4 | 104 .. class:: infomark |
| 0 | 105 |
| 4 | 106 * Input files need not be sorted. |
| 107 * The header line (**Fruit Color Price**) was joined and kept as first line. | |
| 108 * Missing values ( Avocado's color, missing from the first file ) are replaced with a period character. | |
| 0 | 109 |
| 4 | 110 @REFERENCES@ |
| 111 ]]> | |
| 112 </help> | |
| 0 | 113 </tool> |
