Mercurial > repos > iuc > datamash
comparison datamash-ops.xml @ 0:72c4ad16a2ed draft default tip
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/datamash commit c196ca939107154dbcfa84ed34fb01655f4fc59f-dirty
| author | iuc |
|---|---|
| date | Wed, 14 Oct 2015 16:19:37 -0400 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:72c4ad16a2ed |
|---|---|
| 1 <?xml version="1.0"?> | |
| 2 <tool id="DatamashOps" name="Datamash" version="1.0.6"> | |
| 3 <description>(operations on tabular data)</description> | |
| 4 <macros> | |
| 5 <import>macros.xml</import> | |
| 6 </macros> | |
| 7 <expand macro="requirements" /> | |
| 8 <expand macro="stdio" /> | |
| 9 <command> | |
| 10 <![CDATA[ | |
| 11 datamash | |
| 12 $header_in | |
| 13 $header_out | |
| 14 $need_sort | |
| 15 $print_full_line | |
| 16 $ignore_case | |
| 17 #if str($grouping).strip() | |
| 18 --group '$grouping' | |
| 19 #end if | |
| 20 #for $oper in $operations | |
| 21 ${oper.op_name} | |
| 22 ${oper.op_column} | |
| 23 #end for | |
| 24 < $in_file > $out_file | |
| 25 ]]> | |
| 26 </command> | |
| 27 <expand macro="inputs_outputs"> | |
| 28 <param help="Example: to group by the first and fourth fields, use 1,4." label="Group by fields" name="grouping" type="text"> | |
| 29 <validator message="Invalid value in field. Allowed values are 0-9, space, comma." type="regex">^[0-9, ]*$</validator> | |
| 30 </param> | |
| 31 <param falsevalue="" help="--header-in" label="Input file has a header line" name="header_in" truevalue="--header-in" type="boolean" /> | |
| 32 <param falsevalue="" help="--header-out" label="Print header line" name="header_out" truevalue="--header-out" type="boolean" /> | |
| 33 <param falsevalue="" help="--sort" label="Sort input" name="need_sort" truevalue="--sort" type="boolean" /> | |
| 34 <param falsevalue="" help="--full" label="Print all fields from input file" name="print_full_line" truevalue="--full" type="boolean" /> | |
| 35 <param falsevalue="" help="--ignore-case" label="Ignore case when grouping" name="ignore_case" truevalue="--ignore-case" type="boolean" /> | |
| 36 <repeat default="1" min="1" name="operations" title="Operation to perform on each group"> | |
| 37 <param label="Type" name="op_name" type="select"> | |
| 38 <option value="count">count</option> | |
| 39 <option value="sum">sum</option> | |
| 40 <option value="min">minimum</option> | |
| 41 <option value="max">maximum</option> | |
| 42 <option value="absmin">Absolute minimum</option> | |
| 43 <option value="absmax">Absolute maximum</option> | |
| 44 <option value="mean">Mean</option> | |
| 45 <option value="pstdev">Population Standard deviantion</option> | |
| 46 <option value="sstdev">Sample Standard deviantion</option> | |
| 47 <option value="median">Median</option> | |
| 48 <option value="q1">1st quartile</option> | |
| 49 <option value="q3">3rd quartile</option> | |
| 50 <option value="iqr">Inter-quartile range</option> | |
| 51 <option value="mad">Median Absolute Deviation</option> | |
| 52 <option value="pvar">Variance (population)</option> | |
| 53 <option value="svar">Variance (sample)</option> | |
| 54 <option value="sskew">Skewness (sample)</option> | |
| 55 <option value="pskew">Skewness (population)</option> | |
| 56 <option value="skurt">Kurtosis (sample)</option> | |
| 57 <option value="pkurt">Kurtosis (population)</option> | |
| 58 <option value="jarque">Jarque-Bera Normality test</option> | |
| 59 <option value="dpo">DAgostino-Pearson Omnibus Normality Test</option> | |
| 60 <option value="mode">Mode</option> | |
| 61 <option value="antimode">Anti-Mode</option> | |
| 62 <option value="unique">Combine all unique values</option> | |
| 63 <option value="collapse">Combine all values</option> | |
| 64 <option value="countunique">Count Unique values</option> | |
| 65 </param> | |
| 66 <param data_ref="in_file" label="On column" name="op_column" type="data_column" /> | |
| 67 </repeat> | |
| 68 </expand> | |
| 69 <tests> | |
| 70 <test> | |
| 71 <param name="in_file" value="group_compute_input.txt" /> | |
| 72 <param name="grouping" value="2" /> | |
| 73 <param name="header_in" value="true" /> | |
| 74 <param name="header_out" value="true" /> | |
| 75 <param name="need_sort" value="true" /> | |
| 76 <param name="print_full_line" value="false" /> | |
| 77 <param name="op_column" value="3" /> | |
| 78 <param name="op_name" value="sum" /> | |
| 79 <param name="ignore_case" value="false" /> | |
| 80 <output file="group_compute_output.txt" name="out_file" /> | |
| 81 </test> | |
| 82 </tests> | |
| 83 <help> | |
| 84 <![CDATA[ | |
| 85 @HELP_HEADER@ | |
| 86 | |
| 87 **Syntax** | |
| 88 | |
| 89 This tools performs common operations (such as summing, counting, mean, standard-deviation) on input file, based on tabular data. The tool can also optionaly group the input based on a given field. | |
| 90 | |
| 91 ----- | |
| 92 | |
| 93 **Example 1** | |
| 94 | |
| 95 - Find the average score in statistics course of college students, grouped by their college major. The input file has three fields (Name,Major,Score) and a header line:: | |
| 96 | |
| 97 Name Major Score | |
| 98 Bryan Arts 68 | |
| 99 Isaiah Arts 80 | |
| 100 Gabriel Health-Medicine 100 | |
| 101 Tysza Business 92 | |
| 102 Zackery Engineering 54 | |
| 103 ... | |
| 104 ... | |
| 105 | |
| 106 - Grouping the input by the second column (*Major*), and performing operations **mean** and **sample standard deviation** on the third column (*Score*), gives:: | |
| 107 | |
| 108 GroupBy(Major) mean(Score) sstdev(Score) | |
| 109 Arts 68.9474 10.4215 | |
| 110 Business 87.3636 5.18214 | |
| 111 Engineering 66.5385 19.8814 | |
| 112 Health-Medicine 90.6154 9.22441 | |
| 113 Life-Sciences 55.3333 20.606 | |
| 114 Social-Sciences 60.2667 17.2273 | |
| 115 | |
| 116 This sample file is available at http://www.gnu.org/software/datamash . | |
| 117 | |
| 118 **Example 2** | |
| 119 | |
| 120 - Using the UCSC RefSeq Human Gene Track, available at: http://hgdownload.soe.ucsc.edu/goldenPath/hg38/database/refGene.txt.gz | |
| 121 | |
| 122 - List the number and identifiers of isoforms per gene. The gene identifier is in column 13, the isoform/transcript identifier is in column 2. Grouping by column 13 and performing **count** and **Combine all values** on column 2, gives:: | |
| 123 | |
| 124 GroupBy(field-13) count(field-2) collapse(field-2) | |
| 125 A1BG 1 NM_130786 | |
| 126 A1BG-AS1 1 NR_015380 | |
| 127 A1CF 6 NM_001198818,NM_001198819,NM_001198820,NM_014576,NM_138932,NM_138933 | |
| 128 A2M 1 NM_000014 | |
| 129 A2M-AS1 1 NR_026971 | |
| 130 A2ML1 2 NM_001282424,NM_144670 | |
| 131 ... | |
| 132 | |
| 133 - Count how many transcripts are listed for each chromosome and strand. Chromosome is on column 3, Strand is in column 4. Transcript identifiers are in column 2. Grouping by columns **3,4** and performing operation **count** on column 2, gives:: | |
| 134 | |
| 135 GroupBy(field-3) GroupBy(field-4) count(field-2) | |
| 136 chr1 + 2456 | |
| 137 chr1 - 2431 | |
| 138 chr2 + 1599 | |
| 139 chr2 - 1419 | |
| 140 chr3 + 1287 | |
| 141 chr3 - 1249 | |
| 142 ... | |
| 143 | |
| 144 @HELP_FOOTER@ | |
| 145 ]]> | |
| 146 </help> | |
| 147 </tool> |
