Previous changeset 4:37a53100b67e (2021-02-25) Next changeset 6:ff2a81aa3f08 (2022-07-19) |
Commit message:
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/text_processing/split_file_on_column commit df81dd26ed1cf67a0d95b9614738b1d59667773f |
modified:
split_file_on_column.xml |
added:
static/images/split_by_group.svg |
b |
diff -r 37a53100b67e -r d4b5b70e82cb split_file_on_column.xml --- a/split_file_on_column.xml Thu Feb 25 15:54:13 2021 +0000 +++ b/split_file_on_column.xml Mon Jul 04 12:26:46 2022 +0000 |
[ |
@@ -1,5 +1,4 @@ -<tool id="tp_split_on_column" name="Split file" version="0.4"> - <description>according to the values of a column</description> +<tool id="tp_split_on_column" name="Split by group" version="0.5"> <requirements> <requirement type="package" version="5.0.1">gawk</requirement> </requirements> @@ -14,14 +13,14 @@ ]]> </command> <inputs> - <param format="tabular" name="infile" type="data" label="File to select" /> + <param format="tabular" name="infile" type="data" label="File to split" /> <param name="column" label="on column" type="data_column" data_ref="infile" accept_default="true" /> - <param name="include_header" type="boolean" label="Include the header in all splitted files?" - help="Include the first line (the assumed header line) in all splitted files." /> + <param name="include_header" type="boolean" label="Include header in splits?" + help="Include the first line (the assumed header line) to all split files." /> </inputs> <outputs> - <collection name="split_output" type="list" label="Table split on first column"> + <collection name="split_output" type="list" label="Split by group collection"> <discover_datasets pattern="__name_and_ext__" directory="tmp_out" /> </collection> </outputs> @@ -85,11 +84,19 @@ <help> <![CDATA[ -**What it does** +======== +Synopsis +======== + +Given a single input dataset this tool splits the file on unique values from a specified column. -This tool splits a file into different smaller files using a specific column. -It will work like the group tool, but every group is saved to its own file. -You have the option to include the header (first line) in all splitted files. +=========== +Description +=========== + +This tool splits a file into a collection based on unique values of a speific column. +It performs a grouping operation with every group saved as a separate collection element. +You have the option to include the header (first line) to all splits. If you have a header and don't want keep it, please remove it before you use this tool. For example with the "Remove beginning of a file" tool. @@ -97,23 +104,28 @@ **Example** -Splitting a file without header on column 5 from this:: +Splitting this file on column 1:: - chr7 56632 56652 cluster 1 - chr7 56736 56756 cluster 1 - chr7 56761 56781 cluster 2 - chr7 56772 56792 cluster 2 - chr7 56775 56795 cluster 2 - -will produce 2 files with different clusters:: - - chr7 56632 56652 cluster 1 - chr7 56736 56756 cluster 1 + chr1 10 20 + chr1 30 40 + chr2 40 70 + chr4 60 80 - chr7 56761 56781 cluster 2 - chr7 56772 56792 cluster 2 - chr7 56775 56795 cluster 2 +will produce a collectiion with 4 elements:: + + chr1 10 20 + chr1 30 40 + + chr2 40 70 + + chr4 60 80 + +------ + +.. image:: $PATH_TO_IMAGES/split_by_group.svg + :width: 800 + :alt: Split by group ]]> </help> |
b |
diff -r 37a53100b67e -r d4b5b70e82cb static/images/split_by_group.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/static/images/split_by_group.svg Mon Jul 04 12:26:46 2022 +0000 |
b |
b'@@ -0,0 +1,1 @@\n+<svg version="1.1" viewBox="0.0 0.0 629.49343832021 304.1469816272966" fill="none" stroke="none" stroke-linecap="square" stroke-miterlimit="10" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg"><clipPath id="p.0"><path d="m0 0l629.4934 0l0 304.14697l-629.4934 0l0 -304.14697z" clip-rule="nonzero"/></clipPath><g clip-path="url(#p.0)"><path fill="#000000" fill-opacity="0.0" d="m0 0l629.4934 0l0 304.14697l-629.4934 0z" fill-rule="evenodd"/><g filter="url(#shadowFilter-p.1)"><use xlink:href="#p.1" transform="matrix(1.0 0.0 0.0 1.0 0.0 2.0)"/></g><defs><filter id="shadowFilter-p.1" filterUnits="userSpaceOnUse"><feGaussianBlur in="SourceAlpha" stdDeviation="2.0" result="blur"/><feComponentTransfer in="blur" color-interpolation-filters="sRGB"><feFuncR type="linear" slope="0" intercept="0.0"/><feFuncG type="linear" slope="0" intercept="0.0"/><feFuncB type="linear" slope="0" intercept="0.0"/><feFuncA type="linear" slope="0.5" intercept="0"/></feComponentTransfer></filter></defs><g id="p.1"><path fill="#d9ead3" d="m388.6457 18.50773l0 0c0 -3.2578526 2.6410217 -5.8988647 5.8988647 -5.8988647l218.44684 0c1.5644531 0 3.0648804 0.6214857 4.1711426 1.7277374c1.1062622 1.1062517 1.7277222 2.6066513 1.7277222 4.1711273l0 270.5342c0 3.257843 -2.6409912 5.8988647 -5.8988647 5.8988647l-218.44684 0c-3.257843 0 -5.8988647 -2.6410217 -5.8988647 -5.8988647z" fill-rule="evenodd"/><path stroke="#000000" stroke-width="1.0" stroke-linejoin="round" stroke-linecap="butt" d="m388.6457 18.50773l0 0c0 -3.2578526 2.6410217 -5.8988647 5.8988647 -5.8988647l218.44684 0c1.5644531 0 3.0648804 0.6214857 4.1711426 1.7277374c1.1062622 1.1062517 1.7277222 2.6066513 1.7277222 4.1711273l0 270.5342c0 3.257843 -2.6409912 5.8988647 -5.8988647 5.8988647l-218.44684 0c-3.257843 0 -5.8988647 -2.6410217 -5.8988647 -5.8988647z" fill-rule="evenodd"/><path fill="#000000" d="m463.53693 44.066586q-1.75 0 -3.21875 -0.796875q-1.46875 -0.8125 -2.359375 -2.40625q-0.875 -1.59375 -0.875 -3.921875q0 -2.296875 0.90625 -3.921875q0.90625 -1.6406269 2.40625 -2.500002q1.5 -0.859375 3.25 -0.859375q1.34375 0 2.40625 0.546875q1.078125 0.53125 1.78125 1.265625l-1.671875 2.000002q-0.53125 -0.484375 -1.125 -0.796875q-0.578125 -0.3125 -1.328125 -0.3125q-0.9375 0 -1.71875 0.53125q-0.765625 0.53125 -1.234375 1.546875q-0.453125 1.0 -0.453125 2.40625q0 2.125 0.90625 3.328125q0.921875 1.1875 2.46875 1.1875q0.84375 0 1.515625 -0.375q0.671875 -0.390625 1.1875 -0.921875l1.65625 1.953125q-1.75 2.046875 -4.5 2.046875zm10.8974 0q-1.34375 0 -2.53125 -0.640625q-1.171875 -0.65625 -1.90625 -1.90625q-0.71875 -1.25 -0.71875 -3.0q0 -1.765625 0.71875 -3.0q0.734375 -1.234375 1.90625 -1.875q1.1875 -0.65625 2.53125 -0.65625q1.34375 0 2.515625 0.65625q1.1875 0.640625 1.90625 1.875q0.71875 1.234375 0.71875 3.0q0 1.75 -0.71875 3.0q-0.71875 1.25 -1.90625 1.90625q-1.171875 0.640625 -2.515625 0.640625zm0 -2.53125q0.96875 0 1.453125 -0.8125q0.5 -0.828125 0.5 -2.203125q0 -1.375 -0.5 -2.1875q-0.484375 -0.8125 -1.453125 -0.8125q-0.96875 0 -1.453125 0.8125q-0.484375 0.8125 -0.484375 2.1875q0 1.375 0.484375 2.203125q0.484375 0.8125 1.453125 0.8125zm10.180908 2.53125q-1.625 0 -2.25 -0.96875q-0.625 -0.96875 -0.625 -2.5625l0 -11.671877l3.125 0l0 11.796877q0 0.484375 0.1875 0.6875q0.1875 0.1875 0.375 0.1875q0.109375 0 0.171875 0q0.078125 -0.015625 0.203125 -0.046875l0.390625 2.328125q-0.25 0.109375 -0.65625 0.171875q-0.390625 0.078125 -0.921875 0.078125zm6.099884 0q-1.625 0 -2.25 -0.96875q-0.625 -0.96875 -0.625 -2.5625l0 -11.671877l3.125 0l0 11.796877q0 0.484375 0.1875 0.6875q0.1875 0.1875 0.375 0.1875q0.109375 0 0.171875 0q0.078125 -0.015625 0.203125 -0.046875l0.390625 2.328125q-0.25 0.109375 -0.65625 0.171875q-0.390625 0.078125 -0.921875 0.078125zm7.9592285 0q-1.515625 0 -2.734375 -0.65625q-1.21875 -0.65625 -1.921875 -1.890625q-0.703125 -1.25 -0.703125 -3.0q0 -1.71875 0.71875 -2.953125q0.71875 -1.234375 1.859375 -1.90625q1.15625 -0.671875 2.421875 -0.671875q1.5 0 2.484375 0.671875q1.0 0.671875'..b'2.046875q0 -0.859375 0.34375 -1.578125q0.25 -0.5625 0.671875 -0.984375q0.4375 -0.4375 1.015625 -0.703125q0.578125 -0.28125 1.234375 -0.28125q0.453125 0 0.75 0.1875q0.140625 0.078125 0.140625 0.21875q0 0.09375 -0.0625 0.15625q-0.0625 0.0625 -0.15625 0.0625q-0.0625 0 -0.15625 -0.0625q-0.234375 -0.109375 -0.5625 -0.109375q-1.046875 0 -1.90625 0.90625q-0.859375 0.90625 -0.859375 2.140625q0 0.171875 0.03125 0.546875zm0.109375 0.75q0.203125 0.984375 0.640625 1.40625q0.4375 0.40625 1.03125 0.40625q0.59375 0 1.015625 -0.46875q0.4375 -0.46875 0.4375 -1.21875q0 -0.703125 -0.4375 -1.15625q-0.421875 -0.46875 -0.96875 -0.46875q-0.515625 0 -1.0 0.453125q-0.328125 0.28125 -0.71875 1.046875zm9.913574 -1.8125l0 1.109375q0 1.453125 -0.703125 2.3125q-0.53125 0.65625 -1.359375 0.65625q-0.40625 0 -0.765625 -0.15625q-0.34375 -0.15625 -0.59375 -0.4375q-0.140625 -0.1875 -0.328125 -0.578125q-0.1875 -0.390625 -0.265625 -0.71875q-0.125 -0.453125 -0.125 -1.078125l0 -1.109375q0 -1.46875 0.6875 -2.3125q0.546875 -0.671875 1.375 -0.671875q0.40625 0 0.75 0.171875q0.34375 0.15625 0.59375 0.4375q0.15625 0.171875 0.34375 0.578125q0.1875 0.390625 0.265625 0.703125q0.125 0.46875 0.125 1.09375zm-0.453125 0.046875q0 -0.625 -0.1875 -1.171875q-0.171875 -0.5625 -0.40625 -0.890625q-0.125 -0.1875 -0.34375 -0.3125q-0.3125 -0.203125 -0.6875 -0.203125q-0.75 0 -1.1875 0.78125q-0.421875 0.765625 -0.421875 1.796875l0 1.0q0 0.640625 0.171875 1.203125q0.1875 0.546875 0.40625 0.875q0.140625 0.171875 0.34375 0.3125q0.3125 0.1875 0.703125 0.1875q0.75 0 1.171875 -0.765625q0.4375 -0.78125 0.4375 -1.8125l0 -1.0zm12.514648 0.375q0.5625 0.28125 0.84375 0.734375q0.28125 0.4375 0.28125 0.953125q0 0.796875 -0.609375 1.390625q-0.59375 0.578125 -1.453125 0.578125q-0.859375 0 -1.46875 -0.578125q-0.59375 -0.59375 -0.59375 -1.390625q0 -0.515625 0.28125 -0.953125q0.296875 -0.453125 0.875 -0.734375q-0.5 -0.28125 -0.71875 -0.59375q-0.3125 -0.421875 -0.3125 -0.953125q0 -0.75 0.5625 -1.296875q0.578125 -0.5625 1.375 -0.5625q0.8125 0 1.375 0.5625q0.578125 0.546875 0.578125 1.296875q0 0.53125 -0.3125 0.953125q-0.21875 0.3125 -0.703125 0.59375zm0.5625 -1.53125q0 -0.578125 -0.4375 -1.0q-0.4375 -0.421875 -1.0625 -0.421875q-0.625 0 -1.0625 0.421875q-0.421875 0.421875 -0.421875 1.0q0 0.515625 0.421875 0.921875q0.4375 0.390625 1.0625 0.390625q0.640625 0 1.0625 -0.390625q0.4375 -0.40625 0.4375 -0.921875zm0.125 3.234375q0 -0.59375 -0.46875 -1.03125q-0.46875 -0.453125 -1.15625 -0.453125q-0.6875 0 -1.15625 0.453125q-0.453125 0.4375 -0.453125 1.015625q0 0.625 0.46875 1.078125q0.46875 0.4375 1.140625 0.4375q0.6875 0 1.15625 -0.4375q0.46875 -0.453125 0.46875 -1.0625zm7.054199 -2.125l0 1.109375q0 1.453125 -0.703125 2.3125q-0.53125 0.65625 -1.359375 0.65625q-0.40625 0 -0.765625 -0.15625q-0.34375 -0.15625 -0.59375 -0.4375q-0.140625 -0.1875 -0.328125 -0.578125q-0.1875 -0.390625 -0.265625 -0.71875q-0.125 -0.453125 -0.125 -1.078125l0 -1.109375q0 -1.46875 0.6875 -2.3125q0.546875 -0.671875 1.375 -0.671875q0.40625 0 0.75 0.171875q0.34375 0.15625 0.59375 0.4375q0.15625 0.171875 0.34375 0.578125q0.1875 0.390625 0.265625 0.703125q0.125 0.46875 0.125 1.09375zm-0.453125 0.046875q0 -0.625 -0.1875 -1.171875q-0.171875 -0.5625 -0.40625 -0.890625q-0.125 -0.1875 -0.34375 -0.3125q-0.3125 -0.203125 -0.6875 -0.203125q-0.75 0 -1.1875 0.78125q-0.421875 0.765625 -0.421875 1.796875l0 1.0q0 0.640625 0.171875 1.203125q0.1875 0.546875 0.40625 0.875q0.140625 0.171875 0.34375 0.3125q0.3125 0.1875 0.703125 0.1875q0.75 0 1.171875 -0.765625q0.4375 -0.78125 0.4375 -1.8125l0 -1.0z" fill-rule="nonzero"/></g><path fill="#000000" fill-opacity="0.0" d="m248.86617 153.77483l139.77953 0" fill-rule="evenodd"/><path stroke="#000000" stroke-width="4.0" stroke-linejoin="round" stroke-linecap="butt" d="m248.86617 153.77483l115.77956 0" fill-rule="evenodd"/><path fill="#000000" stroke="#000000" stroke-width="4.0" stroke-linecap="butt" d="m364.64572 160.38174l18.152374 -6.6069183l-18.152374 -6.6069336z" fill-rule="evenodd"/></g></svg>\n\\ No newline at end of file\n' |