blend4php  v0.1
A PHP API for interacting with Galaxy
 All Classes Functions Variables Pages
GalaxyHistoryContents Class Reference

Public Member Functions

 __construct (GalaxyInstance $galaxy)
 
 create ($params)
 
 show ($params)
 
 update ($params)
 
 delete ($params)
 
 index ($params)
 

Constructor & Destructor Documentation

GalaxyHistoryContents::__construct ( GalaxyInstance  $galaxy)

The HistoryContents constructor.

Parameters
GalaxyInstance$galaxyA GalaxyInstance object.
Returns
An instance of a HistoryContents object.

Member Function Documentation

GalaxyHistoryContents::create (   $params)

Create a new HistoryContents component to a given history

Corresponds to the Galaxy API method at: POST /api/histories/{history_id}/contents/{type} Types will be "datasets" by default. The other option "dataset_collection" is currently not supported.

Parameters
$paramsAn associative array containing the input parameters for this function. The following parameters are available:
  • history_id: The id of the history to add contents to. To obtain history id's, please refer to the index() function of the history class.
  • source: Can be any one of the following source types: (i) library: Copy from library, would contain the id of the library dataset (ii) library_folder: Copy from library folder, conains the id of the library folder. (iii) hda: Copy from history dataset, would contain the id of the HDA (iv) hdca: Copy from history dataset collection, contains the HDCA. (v) new_collection: A list that contains the following parameters:
    • collection_type: Can be list, paired, list:paired
    • name: Name of the the new dataset collection
    • element_identifiers: List defining collection (the actual data for this new collection).
  • type(Optional): Type of history content, defaults to 'dataset', alternative is 'dataset_collection'
  • content: The id of the content associated to the selected source to add to the history. To obtian content (id's) please refer to this class's index() function.
Returns
An array containing information about the new History content component.
GalaxyHistoryContents::delete (   $params)

Delete the History content with the given id.

Corresponds to the galaxy API path at: DELETE /api/histories/{history_id}/contents/{id}

Parameters
$paramsAn associative array containing the input parameters for this function. The following parameters are available:
  • history_id: The id of the history content to delete.
  • id: The id of the content to delete from the history, to find the (dataset) id's go to: /api/histories/[history_id]/content, only 'ok' state datasets work Or use this classe's index() function.
  • purge: A value of TRUE will remove this history content from the deleted page as well.
Returns
An array containing detailed HDA (history dataset association) information.
GalaxyHistoryContents::index (   $params)

Displays a collection of history content components.

Corresponds to th Galaxy API path at: GET /api/histories/{history_id}/contents

Parameters
$paramsAn associative array containing the input parameters for this function. The following parameters are available:
  • history_id: The id of the history in order to view the contents.
  • ids: A comma separated string of encoded history content ids. If the history does not exist then all contents of the history will be included.
Returns
An array containing a summary or detailed HDA(history dataset association) of all the history contents.
GalaxyHistoryContents::show (   $params)

Retrieve detailed information about a specific hda.

Corresponds to the Galaxy API method and path: GET /api/histories/{history_id}/contents/{id}

Parameters
$paramsAn associative array containing the input parameters for this function. The following parameters are available:
  • id: The encoded history content id of the HDA to return please use the index() function for a list of content_id's.
  • history_id: The id of the history to present. To find, please refer to 'Histories' class index() funciton.
Returns
An array containing detailed HDA (history dataset association) information.
GalaxyHistoryContents::update (   $params)

Updates the values for the History content with the given id.

Corresponds to the Galaxy API method and path: PUT /api/histories/{history_id}/contents/{id}

Some functionality from original python function is not available.

Parameters
$paramsAn associative array containing the input parameters for this function. The following parameters are available:
  • history_id: The id of the history to update. To find, please refer to 'Histories' class index() function.
  • id: The id of the content to update the selected hda in the history, this can be a dataset. To find dataset id's go to: ./api/histories/[history_id]/content, only 'ok' state datasets work
  • annotation: The new annotation for the hda.

    **This was in the api docs but it does not seem to work. TODO: Figure out what this payload does during the update.

  • payload: An associative array that contains hda fields, to update the specified hda within the history. Can contain: (i) name: The new dataset name. (ii) history_id: An id to a history whose contents are to be manipulated. (iii) datset_id: A dataset to add to the provided history (giving content to the specified history. (iv) genome_build: The new genome build (a data base key). (v) annotation: The new genome annotation for the hda. (vi) deleted: A boolean value if the hda is deleted or not. (vii) visible: A boolean value if the hda is visible or not.
    Returns
    An array containing detailed HDA (history dataset association) information.

The documentation for this class was generated from the following file: