These functions provide shorthand functional interfaces for actions such as getting a DXDataObject handler from an ID or link, or creating a link from a handler. In addition, there are functions for performing simple actions with an ID or link as input without creating a full object handler.
Parameters: |
|
---|---|
Returns: | A dict formatted as a symbolic DNAnexus object reference |
Return type: | dict |
Creates a DXLink to the specified object.
If object_id is already a link, it is returned without modification.
If object_id is a `~dxpy.bindings.DXDataObject, the object ID is retrieved via its get_id() method.
If field is not None, object_id is expected to be of class ‘job’ and the link created is a Job Based Object Reference (JBOR), which is of the form:
{'$dnanexus_link': {'job': object_id, 'field': field}}
If field is None and project_id is not None, the link created is a project-specific link of the form:
{'$dnanexus_link': {'project': project_id, 'id': object_id}}
Parameters: | x – A potential DNAnexus link |
---|
Returns whether x appears to be a DNAnexus link (is a dict with key "$dnanexus_link") with a referenced data object.
Parameters: | link (dict) – A DNAnexus link |
---|---|
Returns: | (Object ID, Project ID) if the link is to a data object (or None if no project specified in the link), or (Job ID, Field) if the link is a job-based object reference (JBOR). |
Return type: | tuple |
Get the object ID and detail from a link. There are three types of links:
Parameters: |
|
---|---|
Return type: | DXObject, DXApp, or DXGlobalWorkflow |
Parses a string or DXLink dict. Creates and returns an object handler for it.
Example:
get_handler("file-1234")
Parameters: | id_or_link – String containing an object ID or dict containing a DXLink, or a list of object IDs or dicts containing a DXLink. |
---|
Given an object ID, calls describe() on the object.
Example:
describe("file-1234")
Given a list of object IDs, calls system_describe_data_objects().
Example:
describe(["file-1234", "workflow-5678"])
Note: If id_or_link is a list and **kwargs contains a “fields” parameter, these fields will be returned in the response for each data object in addition to the fields included by default. Additionally, describe options can be provided for each data object class in the “classDescribeOptions” kwargs argument. See https://documentation.dnanexus.com/developer/api/system-methods#api-method-system-describedataobjects for input parameters used with the multiple object describe method.
Parameters: | id_or_link – String containing an object ID or dict containing a DXLink |
---|
Given an object ID, calls get_details() on the object.
Example:
get_details("file-1234")