Connection(email=None, token=None, organization_id=False, api_root='https://secure.transcriptic.com', organization=False, cookie=False, verbose=False, use_environ=True, analytics=True, user_id='default', feature_groups=)¶
A Connection object is the object used for communicating with Transcriptic.
Local usage: This is most easily instantiated by using the from_file function after calling transcriptic login from the command line.
$ transcriptic login Email: email@example.com Password: Logged in as firstname.lastname@example.org (example-lab)
from transcriptic.config import Connection api = Connection.from_file("~/.transcriptic")
For those using Jupyter notebooks on secure.transcriptic.com (beta), a Connection object is automatically instatianted as api.
from transcriptic import api
The api object can then be used for making any api calls. It is recommended to use the objects in transcriptic.objects since that wraps the response in a more friendly format.
If you have multiple organizations and would like to switch to a specific organization, or if you would like to auto-load certain projects, you can use the update_environment function call.
Analyze given protocol
Archive project with given project_id
Create package with given name and description
Create project with given title
Create quick launch object
Get dataset with given data_id
datasets(project_id=None, run_id=None, timeout=30.0)¶
Get datasets belonging to run
Delete package with given package_id
Delete project with given project_id
Loads connection from file
Get launch request id
Get particular organization
Get list of available protocols
Get quick launch object
get_release_status(package_id=None, release_id=None, timestamp=None)¶
Get status of current release upload
Helper function to automatically match and supply required arguments
Get zip file with given data_id. Downloads to memory and returns a Python ZipFile by default. When dealing with larger files where it may not be desired to load the entire file into memory, specifying file_path will enable the file to be downloaded locally.
small_zip_id = 'd12345' small_zip = api.get_zip(small_zip_id) my_big_zip_id = 'd99999' api.get_zip(my_big_zip_id, file_path='big_file.zip')
- data_id (data_id) – Data id of file to download
- file_path (Optional[str]) – Path to file which to save the response to. If specified, will not return ZipFile explicitly.
zip – A Python ZipFile is returned unless file_path is specified
inventory(query, timeout=30.0, page=0)¶
Launch protocol-id with params
monitoring_data(data_type, instruction_id=None, grouping=None, start_time=None, end_time=None)¶
Get list of organizations
Get package with given package_id
Get list of packages in organization
Create release with given data and package_id
Post protocol preview
Get particular project
Get list of projects in organization
Get raw image data
Get list of runs in project
Saves current connection into specified file, used for CLI
submit_launch_request(launch_request_id, project_id=None, protocol_id=None, title=None, test_mode=False, payment_method_id=None)¶
Submit specified launch request
submit_run(protocol, project_id=None, title=None, test_mode=False, payment_method_id=None)¶
Submit given protocol
Update environment variables. To remove an existing variable, set to None
Helper function to safely merge and update headers
url format helper