diff --git a/lib/galaxy/tools/relabel_from_file.xml b/lib/galaxy/tools/relabel_from_file.xml index 7fff171e77a..156737d26cb 100644 --- a/lib/galaxy/tools/relabel_from_file.xml +++ b/lib/galaxy/tools/relabel_from_file.xml @@ -182,71 +182,71 @@ Synopsis ======== -Changes identifiers of datasets within a collection using identifiers from a supplied file. +Renames collection element identifiers using a mapping from a file. =========== Description =========== -New identifiers can be supplied as either a simple list or a tab-delimited file mapping old identifiers to new ones. This is controlled using **How should the new identifiers be specified?** drop-down: +This tool changes the element identifiers (names) in a collection without modifying the datasets themselves. The new identifiers are read from a file you provide. -**Use lines in a simple text file as new identifiers** +Three mapping modes are available: -Given a collection:: +======== +Examples +======== - Collection: [Dataset A] - [Dataset B] - [Dataset X] +**Simple text file — positional renaming** -and a simple text file:: +Each line in the text file replaces the identifier at the same position in the collection. Given a collection:: - Alpha - Beta - Gamma + List: sampleA, sampleB, sampleC -the tool will return:: +and a text file:: - Collection: [Dataset Alpha] - [Dataset Beta] - [Dataset Gamma] + Alpha + Beta + Gamma + +the output is:: + + List: Alpha, Beta, Gamma .. class:: infomark -**Note** that the order and number of entries in the text file must match the order of the items you want to rename in your dataset collection. +The text file must have exactly as many lines as the collection has elements (when **Ensure strict mapping** is enabled). ------- -**Map original identifiers to new ones using a two-column table** +**Two-column tabular file — lookup renaming** -Given a collection:: +The first column contains the current identifier, the second column the new one. Order does not matter:: - Collection: [Dataset A] - [Dataset B] - [Dataset X] + sampleB Beta + sampleC Gamma + sampleA Alpha -and a simple tabular file (you can see that entries do not have to be in order here):: +Output:: - B Beta - X Gamma - A Alpha - -the tool will return:: - - Collection: [Dataset Alpha] - [Dataset Beta] - [Dataset Gamma] + List: Alpha, Beta, Gamma ------- -**Use any two columns of a table for identifier mapping** +**Extended tabular — choose which columns to use** -This mode works exactly as the previous one, but the tabular mapping file is allowed to have more than two columns, and you can specify which of them holds the original and new element identifiers, respectively. +Works like the two-column mode, but the file may have additional columns. You select which column holds the original identifiers and which holds the new ones. ------ +------- + +.. image:: ${static_path}/images/tools/collection_ops/relabel.svg + :alt: Relabel collection element identifiers from a file + :width: 500 + +------- .. class:: warningmark -Valid identifiers must contain only characters (a-z, A-Z), numbers (0-9), dash (-), underscore (_), dot (.), space ( ) and comma (,). Other characters are not allowed. +Valid identifiers must contain only letters (a-z, A-Z), numbers (0-9), dash (-), underscore (_), dot (.), space ( ) and comma (,). Other characters are not allowed. .. class:: infomark diff --git a/lib/galaxy/tools/sort_collection_list.xml b/lib/galaxy/tools/sort_collection_list.xml index e39b2ce6962..630c684b258 100644 --- a/lib/galaxy/tools/sort_collection_list.xml +++ b/lib/galaxy/tools/sort_collection_list.xml @@ -149,53 +149,53 @@ Synopsis ======== -Sorts dataset collection alphabetically, numerically, or using predetermined order from a supplied file. +Reorders elements of a collection alphabetically, numerically, or using a custom order from a file. =========== Description =========== +This tool takes a collection and produces a new collection with the same elements in a different order. The datasets themselves are not modified — only the element ordering changes. + +Three sort modes are available: + +======== +Examples +======== + **Alphabetical sort** -When *alphabetical* sort is chosen, the tool sorts elements by their identifiers in ascending alphabetical order. +Elements are sorted by their identifiers in ascending alphabetical (lexicographic) order:: + + Input: sampleC, sampleA, sampleB + Output: sampleA, sampleB, sampleC ------- **Numeric sort** -When *numeric* sort is chosen, the tool sorts elements in ascending order and ignores non-numeric characters. For example, if a collection contains the following elements:: +Non-numeric characters are stripped from each identifier, and elements are sorted by the resulting number in ascending order:: - Collection: [Horse123] - [Donkey543] - [Mule176] - -The tool will output:: - - Collection: [Horse123] - [Mule176] - [Donkey543] + Input: sample100, sample3, sample20 + Output: sample3, sample20, sample100 ------- -**Sorting from file** +**Sort from file** -Alternatively, you can supply a single-column text file containing element identifiers in the desired sort order. For example, suppose there is a collection:: +You supply a single-column text file listing identifiers in the desired order. The file must contain every element identifier exactly once:: - Collection: [Horse123] - [Donkey543] - [Mule176] + Text file: Output: -and a file specifying sort order:: + sampleB sampleB + sampleC sampleC + sampleA sampleA - Donkey543 - Horse123 - Mule176 - -the output will predictably look like this:: +------- - Collection: [Donkey543] - [Horse123] - [Mule176] +.. image:: ${static_path}/images/tools/collection_ops/sort.svg + :alt: Sort collection elements + :width: 500 ------- @@ -203,5 +203,5 @@ the output will predictably look like this:: @QUOTA_USAGE_NOTE@ - ]]> + ]]> diff --git a/lib/galaxy/tools/split_paired_and_unpaired.xml b/lib/galaxy/tools/split_paired_and_unpaired.xml index 10b7f0e4934..d1d05c88158 100644 --- a/lib/galaxy/tools/split_paired_and_unpaired.xml +++ b/lib/galaxy/tools/split_paired_and_unpaired.xml @@ -121,33 +121,51 @@ Synopsis ======== -Splits a collection into two output collections: one containing paired elements and one containing unpaired (single) elements. +Splits a collection into separate paired and unpaired output collections. =========== Description =========== -This tool is designed to separate mixed collections that may contain both paired-end and single-end datasets. It accepts a ``list``, ``list:paired``, or ``list:paired_or_unpaired`` collection and produces two outputs: +This tool separates a collection that may contain a mix of paired-end and single-end datasets into two output collections: -- **Paired output**: A ``list:paired`` collection containing all elements that have both forward and reverse components. -- **Unpaired output**: A ``list`` collection containing all single (unpaired) elements. +- **Paired output** (``list:paired``) — elements that have both forward and reverse components. +- **Unpaired output** (``list``) — single (unpaired) elements. -For example, given a ``list:paired_or_unpaired`` collection:: +The tool accepts ``list``, ``list:paired``, or ``list:paired_or_unpaired`` input collections. If the input is a plain ``list`` (all unpaired), all elements go to the unpaired output and the paired output is empty. If the input is ``list:paired`` (all paired), all elements go to the paired output and the unpaired output is empty. - Input: [el1: forward + reverse] - [el2: single dataset] - [el3: single dataset] +======== +Examples +======== + +**Split a mixed collection** + +Given a ``list:paired_or_unpaired`` collection:: + + Input: + + sample1 → forward + reverse (paired) + sample2 → single dataset (unpaired) + sample3 → single dataset (unpaired) The tool produces:: - Paired: [el1: forward + reverse] + Paired output (list:paired): - Unpaired: [el2] - [el3] + sample1 → forward + reverse -If the input is a plain ``list`` (all unpaired), all elements go to the unpaired output. If the input is a ``list:paired`` (all paired), all elements go to the paired output. + Unpaired output (list): ------ + sample2 → Dataset 1 + sample3 → Dataset 2 + +------- + +.. image:: ${static_path}/images/tools/collection_ops/split_paired_unpaired.svg + :alt: Split paired and unpaired elements + :width: 620 + +------- .. class:: infomark diff --git a/lib/galaxy/tools/tag_collection_from_file.xml b/lib/galaxy/tools/tag_collection_from_file.xml index 880a49209bf..888846091d2 100644 --- a/lib/galaxy/tools/tag_collection_from_file.xml +++ b/lib/galaxy/tools/tag_collection_from_file.xml @@ -87,27 +87,87 @@ Synopsis ======== -Adds tags (including name: and group: tags) to collection elements. +Assigns tags to collection elements based on a tabular mapping file. =========== Description =========== -The relationship between element names and tags is specified in a two column tab-delimited file. This file may contain fewer entries than elements in the collection. In that case only matching list identifiers will be tagged. +This tool reads a two-column tab-delimited file and applies tags to the matching elements of a collection. The first column contains the element identifier, the second column contains one or more comma-separated tags. -To create name: or group: tags prepend them with ``#`` (you can also use ``name:``) or ``group:``, respectively. +The file does not need to list every element — only elements with a matching identifier will be tagged. Elements not listed keep their existing tags unchanged. -=============== -More about tags -=============== +Three tag update modes are available: -Galaxy allows tagging datasets to facilitate analyses. There are several types of tags including simple tags, name tags, and group tags. **Simple** tags allow you to attach an alternative label to a dataset, which will make it easier to find it later. **Name** tags allow you to track propagation of a dataset through the analyses: all datasets derived from the initial dataset labeled with a name tag will inherit it. Finally, **group** tags allow you to label groups of datasets. This is useful, for example, for differential expression analysis where you can have two groups of datasets labeled as "treatment" and "control". +- **Add** — new tags are added alongside any existing tags. +- **Set** — existing tags are removed and replaced with the new tags. +- **Remove** — the listed tags are removed from matching elements. -To learn more about tags go to `our training site`_. +======== +Examples +======== -.. _our training site: https://training.galaxyproject.org/training-material/search?query=tags +**Add group tags for differential expression** ------ +Given a collection with three samples, and a tag file:: + + sample1 group:treatment + sample2 group:control + sample3 group:treatment + +After running with mode **Add**, each element will carry the specified group tag while keeping any tags it already had. + +------- + +.. image:: ${static_path}/images/tools/collection_ops/tag_from_file.svg + :alt: Tag collection elements from a tabular file + :width: 500 + +========= +Tag types +========= + +Galaxy supports three types of tags: + +**Simple tags** + +A plain keyword such as ``mytag`` or ``important``. Simple tags act as labels that help you find and organize datasets in your history. They do not have any special behavior — they are just searchable labels. In the tag file, write the tag name directly:: + + sample1 important + sample2 batch2,rerun + +------- + +**Name tags** + +A tag prefixed with ``#`` or ``name:`` (e.g. ``#patient42`` or ``name:patient42``). Name tags are *hereditary* — when a dataset with a name tag is used as input to a tool, the output dataset automatically inherits the same name tag. This lets you trace the origin of a dataset through a long analysis. In the tag file:: + + sample1 #patient42 + sample2 name:patient99 + +------- + +**Group tags** + +A tag prefixed with ``group:`` (e.g. ``group:treatment`` or ``group:control``). Group tags are used by tools that compare conditions — for example, **DESeq2** reads group tags to determine which samples belong to which experimental condition. In the tag file:: + + sample1 group:treatment + sample2 group:control + sample3 group:treatment + +------- + +You can combine multiple tags of any type by separating them with commas:: + + sample1 #patient42,group:treatment,batch1 + +------- + +To learn more about tags, visit `the Galaxy Training Network`_. + +.. _the Galaxy Training Network: https://training.galaxyproject.org/training-material/search?query=tags + +------- .. class:: infomark diff --git a/lib/galaxy/tools/unzip_collection.xml b/lib/galaxy/tools/unzip_collection.xml index d3e332c1616..b574f31349e 100644 --- a/lib/galaxy/tools/unzip_collection.xml +++ b/lib/galaxy/tools/unzip_collection.xml @@ -25,19 +25,41 @@ Synopsis ======== -Takes a paired collection and "unzips" it into two simple dataset collections (lists of datasets). +Splits a paired dataset into two individual datasets (forward and reverse). =========== Description =========== -Given a paired collection of forward and reverse reads this tool will "unzip" it into two collections containing forward and reverse reads, respectively: +This tool takes a single ``paired`` collection and extracts its two components — the **forward** and the **reverse** dataset — as separate output datasets. + +This is the inverse of **Zip collections**, which combines two datasets into a pair. + +======== +Examples +======== + +**Unzip a paired collection** + +Input ``paired`` collection:: + + Paired: "Sample 1" + + forward → reads_R1.fastq + reverse → reads_R2.fastq + +Outputs:: + + Forward dataset: reads_R1.fastq + Reverse dataset: reads_R2.fastq + +------- .. image:: ${static_path}/images/tools/collection_ops/unzip.svg - :alt: Unzipping operation + :alt: Unzip a paired collection into forward and reverse datasets :width: 500 ------ +------- .. class:: infomark diff --git a/lib/galaxy/tools/zip_collection.xml b/lib/galaxy/tools/zip_collection.xml index fd2d3f035b1..ee6bc96bfba 100644 --- a/lib/galaxy/tools/zip_collection.xml +++ b/lib/galaxy/tools/zip_collection.xml @@ -28,21 +28,42 @@ Synopsis ======== -Takes two collections and creates a paired collection from them. +Combines two datasets into a single paired collection (forward + reverse). =========== Description =========== -If you have one collection containing only forward reads and one containing only reverse, this tool will "zip" them together into a simple paired collection. For example, given two collections with `forward` and `reverse` reads they can be "zipped" into a single paired collection: +This tool takes two individual datasets and packages them into a ``paired`` collection, labeling the first as **forward** and the second as **reverse**. + +This is the inverse of **Unzip collection**, which splits a pair back into two separate datasets. + +======== +Examples +======== + +**Zip two datasets into a pair** + +Inputs:: + + Input 1 (forward): reads_R1.fastq + Input 2 (reverse): reads_R2.fastq + +Output ``paired`` collection:: + + Paired: "reads (zipped)" + + forward → reads_R1.fastq + reverse → reads_R2.fastq + +------- .. image:: ${static_path}/images/tools/collection_ops/zip.svg - :alt: Zipping operation + :alt: Zip two datasets into a paired collection :width: 500 +------- ------ - .. class:: infomark @QUOTA_USAGE_NOTE@ diff --git a/static/images/tools/collection_ops/relabel.svg b/static/images/tools/collection_ops/relabel.svg new file mode 100644 index 00000000000..bdec46fa689 --- /dev/null +++ b/static/images/tools/collection_ops/relabel.svg @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + List + + + sampleA + + + sampleB + + + sampleC + + + + sampleA Alpha + sampleB Beta + sampleC Gamma + + + + Relabel + + + + List (relabelled) + + + Alpha + + + Beta + + + Gamma + + diff --git a/static/images/tools/collection_ops/sort.svg b/static/images/tools/collection_ops/sort.svg new file mode 100644 index 00000000000..e189ee649b6 --- /dev/null +++ b/static/images/tools/collection_ops/sort.svg @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + List + + + sampleC + + + sampleA + + + sampleB + + unsorted + + + + Sort + alphabetical + + + + List (sorted) + + + sampleA + + + sampleB + + + sampleC + + A, B, C order + + diff --git a/static/images/tools/collection_ops/split_paired_unpaired.svg b/static/images/tools/collection_ops/split_paired_unpaired.svg new file mode 100644 index 00000000000..63de001f9ea --- /dev/null +++ b/static/images/tools/collection_ops/split_paired_unpaired.svg @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + list : paired_or_unpaired + + + + sample1 (paired) + + + forward + + + reverse + + + + sample2 (unpaired) + + + + sample3 (unpaired) + + mixed paired + unpaired + + + + Split + + + + Paired output + + + sample1 + + + forward + + + reverse + + + + Unpaired output + + + sample2 + + + sample3 + + diff --git a/static/images/tools/collection_ops/tag_from_file.svg b/static/images/tools/collection_ops/tag_from_file.svg new file mode 100644 index 00000000000..6d14379b82a --- /dev/null +++ b/static/images/tools/collection_ops/tag_from_file.svg @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + List + + + sample1 + + + sample2 + + + sample3 + + + + sample1 group:treat + sample2 group:ctrl + sample3 group:treat + + + + Tag + + + + List (tagged) + + + sample1 + + treat + + + sample2 + + ctrl + + + sample3 + + treat + + diff --git a/static/images/tools/collection_ops/unzip.svg b/static/images/tools/collection_ops/unzip.svg index 25047d07b37..6f93499de90 100644 --- a/static/images/tools/collection_ops/unzip.svg +++ b/static/images/tools/collection_ops/unzip.svg @@ -1,1081 +1,85 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Paired collection + + + + sample1 + + + forward + + + reverse + + + + sample2 + + + forward + + + reverse + + + + sample3 + + + forward + + + reverse + + 3 paired elements + + + + Unzip + + + + Forward datasets + + + sample1_R1.fastq + + + sample2_R1.fastq + + + sample3_R1.fastq + + + + Reverse datasets + + + sample1_R2.fastq + + + sample2_R2.fastq + + + sample3_R2.fastq + diff --git a/static/images/tools/collection_ops/zip.svg b/static/images/tools/collection_ops/zip.svg index 1b037278606..b2a49b8fdc1 100644 --- a/static/images/tools/collection_ops/zip.svg +++ b/static/images/tools/collection_ops/zip.svg @@ -1,1081 +1,85 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + Forward datasets + + + sample1_R1.fastq + + + sample2_R1.fastq + + + sample3_R1.fastq + + + + Reverse datasets + + + sample1_R2.fastq + + + sample2_R2.fastq + + + sample3_R2.fastq + + + + Zip + + + + Paired collection + + + + sample1 + + + forward + + + reverse + + + + sample2 + + + forward + + + reverse + + + + sample3 + + + forward + + + reverse + + matched by position +