-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
628 additions
and
15 deletions.
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
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
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
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
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
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
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
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
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
30 changes: 30 additions & 0 deletions
30
lib/galaxy/model/dataset_collections/types/sample_sheet.py
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
from galaxy.exceptions import RequestParameterMissingException | ||
from galaxy.model import DatasetCollectionElement | ||
from . import BaseDatasetCollectionType | ||
from .sample_sheet_util import validate_row | ||
|
||
|
||
class SampleSheetDatasetCollectionType(BaseDatasetCollectionType): | ||
"""A flat list of named elements starting rows with column metadata.""" | ||
|
||
collection_type = "sample_sheet" | ||
|
||
def generate_elements(self, dataset_instances, **kwds): | ||
rows = kwds.get("rows", None) | ||
column_definitions = kwds.get("column_definitions", None) | ||
if rows is None: | ||
raise RequestParameterMissingException( | ||
"Missing or null parameter 'rows' required for 'sample_sheet' collection types." | ||
) | ||
if len(dataset_instances) != len(rows): | ||
self._validation_failed("Supplied element do not match 'rows'.") | ||
|
||
for identifier, element in dataset_instances.items(): | ||
columns = rows[identifier] | ||
validate_row(columns, column_definitions) | ||
association = DatasetCollectionElement( | ||
element=element, | ||
element_identifier=identifier, | ||
columns=columns, | ||
) | ||
yield association |
Oops, something went wrong.