This module provides methods for finding existing objects and entities in the DNAnexus Platform. The find_data_objects() function provides search functionality over all data objects in the system. The find_jobs() function can be used to find jobs (whether they are running, failed, or done).
Parameters: |
|
---|---|
Returns: | List of results parallel to input objects, where each entry is a list containing 0 or more dicts, each corresponding to a resolved object |
Return type: | List of lists of dictionaries |
Each returned element is a list of dictionaries with keys “project” and “id”. The number of dictionaries for each element may be 0, 1, or more.
Parameters: |
|
---|---|
Return type: | generator |
Returns a generator that yields all data objects matching the query, up to limit objects. It transparently handles paging through the result set if necessary. For all parameters that are omitted, the search is not restricted by the corresponding field.
Note
All timestamps must be supplied as one of the following:
The following examples both find all items that were created more than 1 week ago:
items1 = list(find_data_objects(created_before="-1w"))
items2 = list(find_data_objects(created_before=-7*24*60*60*1000))
This example iterates through all files with property “project” set to “cancer project” and prints their object IDs:
- for result in find_data_objects(classname=”file”, properties={“project”: “cancer project”}):
- print “Found a file with object id ” + result[“id”]
Parameters: |
|
---|---|
Return type: | generator |
Returns a generator that yields all executions (jobs or analyses) that match the query. It transparently handles paging through the result set if necessary. For all parameters that are omitted, the search is not restricted by the corresponding field.
The following example iterates through all finished jobs and analyses in a particular project that were launched in the last two days:
for result in find_executions(state="done", project=proj_id, created_after="-2d"):
print "Found job or analysis with object id " + result["id"]
This method is identical to find_executions() with the class constraint set to “job”.
This method is identical to find_executions() with the class constraint set to “analysis”.
Parameters: |
|
---|---|
Return type: | generator |
Returns a generator that yields all projects that match the query. It transparently handles paging through the result set if necessary. For all parameters that are omitted, the search is not restricted by the corresponding field.
You can use the level parameter to find projects that the user has at least a specific level of access to (e.g. “CONTRIBUTE”).
Parameters: |
|
---|---|
Return type: | generator |
Returns a generator that yields all global executables (either apps or global workflows) that match the query. It transparently handles paging through the result set if necessary. For all parameters that are omitted, the search is not restricted by the corresponding field.
This method is identical to find_global_executables() with the API method used: system_find_apps().
This method is identical to find_global_executables() with the API method used: system_find_global_workflows().
Parameters: |
|
---|
Returns one data object that satisfies the supplied constraints, or None if none exist (provided zero_ok is True). Supports all search constraint arguments supported by find_data_objects().
Parameters: |
|
---|
Returns one project that satisfies the supplied constraints, or None if none exist (provided zero_ok is True). Supports all search constraint arguments supported by find_projects().
Parameters: |
|
---|
Returns one app that satisfies the supplied constraints, or None if none exist (provided zero_ok is True). Supports all search constraint arguments supported by find_apps().
Parameters: |
|
---|
Returns a generator that yields all org members that match the query formed by intersecting all specified constraints. The search is not restricted by any parameters that were unspecified.
Parameters: |
|
---|---|
Return type: | generator |
Returns a generator that yields all projects that match the query formed by intersecting all specified constraints. The search is not restricted by any parameters that were unspecified.
Parameters: |
|
---|---|
Return type: | generator |
Returns a generator that yields all apps that match the query. It transparently handles paging through the result set if necessary. For all parameters that are omitted, the search is not restricted by the corresponding field.
Parameters: |
|
---|---|
Return type: | generator |
Returns a generator that yields all orgs matching the specified query. Will transparently handle pagination as necessary.