Next changeset 1:2f3c6f2dcf39 (2016-09-21) |
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/datamash commit 8a7a779896ce1b9b296557a2c31bd93f5fbb5462 |
added:
datamash-ops.xml macros.xml test-data/datamash_reverse_input.txt test-data/datamash_reverse_output.txt test-data/datamash_transpose_input.txt test-data/datamash_transpose_output.txt test-data/group_compute_input.txt test-data/group_compute_output.txt tool_dependencies.xml |
b |
diff -r 000000000000 -r c4611129661b datamash-ops.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/datamash-ops.xml Wed Oct 28 12:46:01 2015 -0400 |
[ |
@@ -0,0 +1,147 @@ +<?xml version="1.0"?> +<tool id="datamash_ops" name="Datamash" version="1.0.6"> + <description>(operations on tabular data)</description> + <macros> + <import>macros.xml</import> + </macros> + <expand macro="requirements" /> + <expand macro="stdio" /> + <command> + <![CDATA[ + datamash + $header_in + $header_out + $need_sort + $print_full_line + $ignore_case + #if str($grouping).strip() + --group '$grouping' + #end if + #for $oper in $operations + ${oper.op_name} + ${oper.op_column} + #end for + < $in_file > $out_file + ]]> + </command> + <expand macro="inputs_outputs"> + <param help="Example: to group by the first and fourth fields, use 1,4." label="Group by fields" name="grouping" type="text"> + <validator message="Invalid value in field. Allowed values are 0-9, space, comma." type="regex">^[0-9, ]*$</validator> + </param> + <param falsevalue="" help="--header-in" label="Input file has a header line" name="header_in" truevalue="--header-in" type="boolean" /> + <param falsevalue="" help="--header-out" label="Print header line" name="header_out" truevalue="--header-out" type="boolean" /> + <param falsevalue="" help="--sort" label="Sort input" name="need_sort" truevalue="--sort" type="boolean" /> + <param falsevalue="" help="--full" label="Print all fields from input file" name="print_full_line" truevalue="--full" type="boolean" /> + <param falsevalue="" help="--ignore-case" label="Ignore case when grouping" name="ignore_case" truevalue="--ignore-case" type="boolean" /> + <repeat default="1" min="1" name="operations" title="Operation to perform on each group"> + <param label="Type" name="op_name" type="select"> + <option value="count">count</option> + <option value="sum">sum</option> + <option value="min">minimum</option> + <option value="max">maximum</option> + <option value="absmin">Absolute minimum</option> + <option value="absmax">Absolute maximum</option> + <option value="mean">Mean</option> + <option value="pstdev">Population Standard deviantion</option> + <option value="sstdev">Sample Standard deviantion</option> + <option value="median">Median</option> + <option value="q1">1st quartile</option> + <option value="q3">3rd quartile</option> + <option value="iqr">Inter-quartile range</option> + <option value="mad">Median Absolute Deviation</option> + <option value="pvar">Variance (population)</option> + <option value="svar">Variance (sample)</option> + <option value="sskew">Skewness (sample)</option> + <option value="pskew">Skewness (population)</option> + <option value="skurt">Kurtosis (sample)</option> + <option value="pkurt">Kurtosis (population)</option> + <option value="jarque">Jarque-Bera Normality test</option> + <option value="dpo">DAgostino-Pearson Omnibus Normality Test</option> + <option value="mode">Mode</option> + <option value="antimode">Anti-Mode</option> + <option value="unique">Combine all unique values</option> + <option value="collapse">Combine all values</option> + <option value="countunique">Count Unique values</option> + </param> + <param data_ref="in_file" label="On column" name="op_column" type="data_column" /> + </repeat> + </expand> + <tests> + <test> + <param name="in_file" value="group_compute_input.txt" /> + <param name="grouping" value="2" /> + <param name="header_in" value="true" /> + <param name="header_out" value="true" /> + <param name="need_sort" value="true" /> + <param name="print_full_line" value="false" /> + <param name="op_column" value="3" /> + <param name="op_name" value="sum" /> + <param name="ignore_case" value="false" /> + <output file="group_compute_output.txt" name="out_file" /> + </test> + </tests> + <help> +<![CDATA[ +@HELP_HEADER@ + +**Syntax** + +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. + +----- + +**Example 1** + +- 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:: + + Name Major Score + Bryan Arts 68 + Isaiah Arts 80 + Gabriel Health-Medicine 100 + Tysza Business 92 + Zackery Engineering 54 + ... + ... + +- Grouping the input by the second column (*Major*), and performing operations **mean** and **sample standard deviation** on the third column (*Score*), gives:: + + GroupBy(Major) mean(Score) sstdev(Score) + Arts 68.9474 10.4215 + Business 87.3636 5.18214 + Engineering 66.5385 19.8814 + Health-Medicine 90.6154 9.22441 + Life-Sciences 55.3333 20.606 + Social-Sciences 60.2667 17.2273 + +This sample file is available at http://www.gnu.org/software/datamash . + +**Example 2** + +- Using the UCSC RefSeq Human Gene Track, available at: http://hgdownload.soe.ucsc.edu/goldenPath/hg38/database/refGene.txt.gz + +- 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:: + + GroupBy(field-13) count(field-2) collapse(field-2) + A1BG 1 NM_130786 + A1BG-AS1 1 NR_015380 + A1CF 6 NM_001198818,NM_001198819,NM_001198820,NM_014576,NM_138932,NM_138933 + A2M 1 NM_000014 + A2M-AS1 1 NR_026971 + A2ML1 2 NM_001282424,NM_144670 + ... + +- 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:: + + GroupBy(field-3) GroupBy(field-4) count(field-2) + chr1 + 2456 + chr1 - 2431 + chr2 + 1599 + chr2 - 1419 + chr3 + 1287 + chr3 - 1249 + ... + +@HELP_FOOTER@ +]]> + </help> +</tool> |
b |
diff -r 000000000000 -r c4611129661b macros.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/macros.xml Wed Oct 28 12:46:01 2015 -0400 |
b |
@@ -0,0 +1,40 @@ +<?xml version="1.0"?> +<macros> + <xml name="inputs_outputs"> + <inputs> + <param format="tabular" help="" label="Input tabular dataset" name="in_file" type="data" /> + <yield /> + </inputs> + <outputs> + <data format="tabular" name="out_file" label="${tool.name} on ${on_string}" /> + </outputs> + </xml> + <xml name="requirements"> + <requirements> + <requirement type="package" version="1.0.6">datamash</requirement> + </requirements> + </xml> + <xml name="stdio"> + <stdio> + <exit_code description="Error" level="fatal" range="1:" /> + </stdio> + </xml> + <token name="@HELP_FOOTER@"> +----- + +**GNU Datamash** is a Free and Open Source Software, see more details on the Datamash_ Website. + +**GNU Datamash** is also available as a command-line program, see http://www.gnu.org/software/datamash/download/ . + +For more details about supported statistical operations, see Datamash_ website. + +.. _Datamash: http://www.gnu.org/software/datamash/ + </token> + <token name="@HELP_HEADER@"> +.. class:: infomark + +**TIP:** Input data must be TAB delimited. If the desired dataset does not appear in the input list, use *Text Manipulation->Convert* to convert it to **Tabular** type. + +----- + </token> +</macros> \ No newline at end of file |
b |
diff -r 000000000000 -r c4611129661b test-data/datamash_reverse_input.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/datamash_reverse_input.txt Wed Oct 28 12:46:01 2015 -0400 |
b |
@@ -0,0 +1,4 @@ +Genes Sample Counts +NOX1 A1 514 +DcP A2 542 +HH B3 490 |
b |
diff -r 000000000000 -r c4611129661b test-data/datamash_reverse_output.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/datamash_reverse_output.txt Wed Oct 28 12:46:01 2015 -0400 |
b |
@@ -0,0 +1,4 @@ +Counts Sample Genes +514 A1 NOX1 +542 A2 DcP +490 B3 HH |
b |
diff -r 000000000000 -r c4611129661b test-data/datamash_transpose_input.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/datamash_transpose_input.txt Wed Oct 28 12:46:01 2015 -0400 |
b |
@@ -0,0 +1,3 @@ +Genes NOX1 DcP HH +Sample A1 A2 B3 +Counts 514 542 490 |
b |
diff -r 000000000000 -r c4611129661b test-data/datamash_transpose_output.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/datamash_transpose_output.txt Wed Oct 28 12:46:01 2015 -0400 |
b |
@@ -0,0 +1,4 @@ +Genes Sample Counts +NOX1 A1 514 +DcP A2 542 +HH B3 490 |
b |
diff -r 000000000000 -r c4611129661b test-data/group_compute_input.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/group_compute_input.txt Wed Oct 28 12:46:01 2015 -0400 |
b |
@@ -0,0 +1,84 @@ +Name Major Score +Ignatius Engineering 83 +Austin Life-Sciences 91 +Zackery Engineering 54 +Marques Arts 58 +Darren Business 94 +Darius Social-Sciences 51 +Thanh Engineering 53 +Joe'Quann Engineering 75 +Bryan Arts 68 +Devin Engineering 92 +Joseph Social-Sciences 61 +Joshua Life-Sciences 14 +Ja'Won Social-Sciences 37 +Tyreque Arts 74 +Sage Arts 55 +Antonio Engineering 88 +Michael Engineering 39 +Randy Social-Sciences 68 +Dilan Health-Medicine 84 +Omar Engineering 99 +Zachary Arts 80 +Faison Engineering 47 +Angel Health-Medicine 100 +Gabriel Health-Medicine 100 +John Life-Sciences 70 +Leonard Business 87 +Juan Business 79 +Jonathan Health-Medicine 100 +Christopher Life-Sciences 59 +Brandon Life-Sciences 72 +D'Angelo Health-Medicine 90 +Justin Social-Sciences 90 +Israel Health-Medicine 81 +William Arts 46 +David Social-Sciences 69 +Drake Social-Sciences 59 +Drake Social-Sciences 76 +Nathan Arts 71 +Trevon Arts 74 +Aaron Business 83 +Daniel Health-Medicine 91 +Kevin Health-Medicine 100 +Antonio Engineering 56 +Donovan Arts 75 +Kerris Business 82 +Andre Health-Medicine 72 +Dakota Business 83 +Aaron Life-Sciences 58 +Walter Arts 75 +Isaiah Arts 80 +Christian Life-Sciences 67 +Dalton Health-Medicine 100 +Jesse Social-Sciences 32 +Diego Health-Medicine 82 +Nathen Life-Sciences 46 +Anthony Life-Sciences 32 +Christian Business 88 +David Business 92 +Avery Engineering 51 +Paul Arts 63 +Derek Arts 60 +Levi Arts 76 +Lance Social-Sciences 65 +Sonny Engineering 50 +Shawn Arts 65 +Leonardo Engineering 78 +Yeng Life-Sciences 39 +Leroy Social-Sciences 74 +Gurnam Life-Sciences 66 +Fernando Arts 78 +Williams Social-Sciences 62 +Roberto Arts 65 +Teriuse Business 94 +Nathaniel Arts 88 +Chase Social-Sciences 27 +Caleb Business 87 +Tysza Business 92 +Nico Arts 59 +Manuel Social-Sciences 61 +Patrick Health-Medicine 92 +Peter Health-Medicine 86 +Allen Life-Sciences 50 +Joel Social-Sciences 72 |
b |
diff -r 000000000000 -r c4611129661b test-data/group_compute_output.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/group_compute_output.txt Wed Oct 28 12:46:01 2015 -0400 |
b |
@@ -0,0 +1,7 @@ +GroupBy(Major) sum(Score) +Arts 1310 +Business 961 +Engineering 865 +Health-Medicine 1178 +Life-Sciences 664 +Social-Sciences 904 |
b |
diff -r 000000000000 -r c4611129661b tool_dependencies.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tool_dependencies.xml Wed Oct 28 12:46:01 2015 -0400 |
b |
@@ -0,0 +1,6 @@ +<?xml version="1.0"?> +<tool_dependency> + <package name="datamash" version="1.0.6"> + <repository changeset_revision="414953c0168d" name="package_datamash_1_0_6" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" /> + </package> +</tool_dependency> |