commit/galaxy-central: jmchilton: Add some quick docs for creating dataset collections through API.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/c9c07643e04e/ Changeset: c9c07643e04e User: jmchilton Date: 2014-06-13 16:08:56 Summary: Add some quick docs for creating dataset collections through API. For full worked examples see bioblend and API tests. Affected #: 1 file diff -r 05500f5c6710816865536335a42eb9e00caf6f03 -r c9c07643e04ece14e27c07c4aa73b3578202c47b lib/galaxy/webapps/galaxy/api/history_contents.py --- a/lib/galaxy/webapps/galaxy/api/history_contents.py +++ b/lib/galaxy/webapps/galaxy/api/history_contents.py @@ -217,27 +217,54 @@ def create( self, trans, history_id, payload, **kwd ): """ create( self, trans, history_id, payload, **kwd ) - * POST /api/histories/{history_id}/contents + * POST /api/histories/{history_id}/contents/{type} create a new HDA by copying an accessible LibraryDataset :type history_id: str :param history_id: encoded id string of the new HDA's History + :type type: str + :param type: Type of history content - 'dataset' (default) or + 'dataset_collection'. :type payload: dict :param payload: dictionary structure containing:: - copy from library: + copy from library (for type 'dataset'): 'source' = 'library' 'content' = [the encoded id from the library dataset] - copy from HDA: + copy from history dataset (for type 'dataset'): 'source' = 'hda' 'content' = [the encoded id from the HDA] + copy from history dataset collection (for type 'dataset_collection') + 'source' = 'hdca' + 'content' = [the encoded id from the HDCA] + + create new history dataset collection (for type 'dataset_collection') + 'source' = 'new_collection' + 'collection_type' = For example, "list", "paired", "list:paired". + 'name' = Name of new dataset collection. + 'element_identifiers' = Recursive list structure defining collection. + Each element must have 'src' which can be + 'hda', 'ldda', 'hdca', or 'new_collection', + as well as a 'name' which is the name of + element (e.g. "forward" or "reverse" for + paired datasets, or arbitrary sample names + for instance for lists). For all src's except + 'new_collection' - a encoded 'id' attribute + must be included wiht element as well. + 'new_collection' sources must defined a + 'collection_type' and their own list of + (potentially) nested 'element_identifiers'. + ..note: Currently, a user can only copy an HDA from a history that the user owns. :rtype: dict :returns: dictionary containing detailed information for the new HDA """ + # TODO: Flush out create new collection documentation above, need some + # examples. See also bioblend and API tests for specific examples. + # get the history, if anon user and requesting current history - allow it if( ( trans.user == None ) and ( history_id == trans.security.encode_id( trans.history.id ) ) ): Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org