-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: add a little warning for <param ... multiple="true"> #930
Merged
jmchilton
merged 9 commits into
galaxyproject:master
from
bernt-matthias:topic/doc-multiple-true
May 15, 2019
Merged
Changes from 7 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
88379b5
doc: add a little warning for <param ... multiple="true">
bernt-matthias 2544911
Update docs/_writing_collections.rst
nsoranzo 0a618f4
doc: small addition to multiple=true
bernt-matthias 07358ca
Update docs/_writing_collections.rst
nsoranzo c6834eb
Update docs/_writing_collections.rst
nsoranzo 1a7b3d7
added another drawback
bernt-matthias 6776e6d
Merge branch 'topic/doc-multiple-true' of https://github.com/bernt-ma…
bernt-matthias 48919d8
Update _writing_collections.rst
bernt-matthias 7b02a40
Update docs/_writing_collections.rst
bernt-matthias File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,8 +10,8 @@ types - ``list`` and ``paired``. | |
* A **list** is a collection of datasets (or other collections) where | ||
each element has an ``identifier``. Unlike Galaxy dataset names which are | ||
transformed throughout complex analyses - the ``identifier`` is generally | ||
perserved and can be used for concepts such as ``sample`` name that one wants to | ||
perserve in the earlier mapping steps of a workflow and use it | ||
preserved and can be used for concepts such as ``sample`` name that one wants to | ||
preserve in the earlier mapping steps of a workflow and use it | ||
during reduction steps and reporting later. | ||
|
||
* The **paired** collection type is much simpler and more specific to sequencing | ||
|
@@ -29,7 +29,7 @@ dataset having a list idenifier, each pair of datasets does. | |
Consuming Collections | ||
------------------------------- | ||
|
||
Many Galaxy tools can be used without modification in conjuction with collections. | ||
Many Galaxy tools can be used without modification in conjunction with collections. | ||
Galaxy users can take a collection and `map over` any tool that | ||
consumes individual datasets. For instance, early in typical bioinformatics | ||
workflows you may have steps that filter raw data, convert to standard | ||
|
@@ -48,7 +48,7 @@ identifier and index for the output entries match those of the supplied input. | |
If a tool's functionality can be applied to individual files in isolation, the | ||
implicit mapping described above should be sufficient and no knowledge of collections | ||
by tools should be needed. However, tools may need to process multiple | ||
files at once - in this case explict collection consumption is required. This | ||
files at once - in this case explicit collection consumption is required. This | ||
document outlines three cases: | ||
|
||
* consuming pairs of datasets | ||
|
@@ -125,13 +125,22 @@ Processing Lists (Reductions) | |
------------------------------- | ||
|
||
The ``data_collection`` parameter type can specify a ``collection_type`` or | ||
``list`` but whenever possible, it is actually better to not explicitly | ||
``list`` but whenever possible, it might actually be better to not explicitly | ||
consume lists as a tool author. Parameters of type ``data`` can include a | ||
``multiple="True"`` attribute to allow many datasets to be selected | ||
simultaneously. While the default UI will then have Galaxy users pick | ||
individual datsets, they can choose a collections as the tool can | ||
individual datasets, they can choose a collections as the tool can | ||
process both. This has the benefit of allowing tools to | ||
process either individual datasets or collections. | ||
A noteworthy difference is that if ``multiple="True"`` is used the elements of | ||
the collection are passed to the tool as a (Python) list, i.e. it is not | ||
possible: | ||
|
||
- to find out if a collection was passed, | ||
- to access properties of the collection (name,...), or | ||
- to write tests that pass a collection to the parameter (which would allow to name the elements explicitly). | ||
|
||
Another drawback is that the `${on_string}` of the label contains the list of data sets in the collection (which can be confusing, since these data sets are in most cases hidden) and not the name of the collection. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
.. code-block:: xml | ||
|
||
|
@@ -177,7 +186,7 @@ Processing Identifiers | |
Collection elements have identifiers that can be used for various kinds of sample | ||
tracking. These identifiers are set when the collection is first created - either | ||
explicitly in the UI (or API), through mapping over collections that preserves input | ||
identifers, or as the ``identifier`` when dynamically discovering collection outputs | ||
identifiers, or as the ``identifier`` when dynamically discovering collection outputs | ||
described below. | ||
|
||
During reduction steps one may likely want to use these - for | ||
|
@@ -321,7 +330,7 @@ input - a structured_like attribute can be defined on the collection tag. | |
|
||
<collection name="list_output" type="list" label="Duplicate List" structured_like="input1" inherit_format="true" /> | ||
|
||
Templates can then loop over ``input1`` or ``list_output`` when buliding up command-line | ||
Templates can then loop over ``input1`` or ``list_output`` when building up command-line | ||
expressions. See ``test/functional/tools/collection_creates_list.xml`` for an example. | ||
|
||
``format``, ``format_source``, and ``metadata_source`` can be defined for such collections if the | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This represented an IUC recommendation... I think I agree with the language changes here - but I was always more pro-collection inputs then everyone else. So I'm nervous about making this less of a recommendation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. I changed the wording to "it is recommended".