We'll be using a MockConnection object and some sampledata for this example. Please feel free to follow along with your local credentials and switching the ids with the relevant object-ids.
from transcriptic import connect
api = connect()
# If you receive an `Unable to find .transcriptic` file error, please try
# `transcriptic login` into the commandline.
For the rest of the demo, we'll be using the sampledata. If using your credentials, please do not execute the cell below.
from transcriptic import connect
api = connect(mocked=True)
## Initialized organization
api.organization_id
'sample-org'
## List projects
api.projects()
[{'id': 'p123', 'name': 'sample project', 'created_at': '2020-10-01T00:00:00.000-07:00', 'updated_at': '2020-10-01T00:59:59.100-07:00'}]
from transcriptic.sampledata import load_sample_project
my_project = load_sample_project()
## Bring up documentation
my_project?
my_project.name
'sample project'
## View runs in the project as a pandas DataFrame
my_project.runs()
id | Name | |
---|---|---|
0 | r123 | Sample Run |
Typically, you would initialize a project directly with the given Project-id.
from transcriptic.jupyter import Project
my_project = Project("p123")
from transcriptic.sampledata import load_sample_run
my_run = load_sample_run()
## Bring up documentation
my_run?
my_run.id
'r123'
my_run.project_id
'p123'
my_run.instructions
Name | Id | Started | Completed | Instructions | |
---|---|---|---|---|---|
0 | acoustic_transfer | i123 | 2020-06-01T15:39:50.873-07:00 | 2020-06-01T15:39:55.049-07:00 | <transcriptic.jupyter.objects.Instruction obje... |
1 | absorbance | i124 | 2020-06-01T15:40:50.873-07:00 | 2020-06-01T15:40:55.049-07:00 | <transcriptic.jupyter.objects.Instruction obje... |
# Access column of Instruction-objects
my_instructions = my_run.instructions.Instructions
# Access first instruction
my_inst = my_instructions.loc[0]
# Figure out execution device
my_inst.device_id
'wc1-echo1'
# Figure out started/completion time
print(f"{my_inst.started_at}, {my_inst.completed_at}")
2020-06-01T15:39:50.873-07:00, 2020-06-01T15:39:55.049-07:00
# Examine warp-specifics
my_inst.warps
Name | WarpId | Completed | Started | Params | |
---|---|---|---|---|---|
0 | AcousticLiquidHandler.Transfer | w123 | 2020-06-01T15:39:54.989-07:00 | 2020-06-01T15:39:50.791-07:00 | {'sourceContainer': {'id': 'ct123', 'cType': '... |
my_run.containers
Name | ContainerId | Type | Status | Storage Condition | Containers | |
---|---|---|---|---|---|---|
0 | Echo Source Plate | ct123 | 384-echo | available | cold_4 | Container(Echo Source Plate) |
1 | VbottomPlate | ct124 | 96-well-v-bottom | available | cold_4 | Container(VbottomPlate) |
# Access column of Containers
my_containers = my_run.containers.Containers
cont_123 = my_containers.loc[0]
cont_123
Container(Echo Source Plate)
# Examine aliqutos of this container
cont_123.aliquots
Name | Id | Volume | |
---|---|---|---|
Well Index | |||
0 | None | aq1egnpw5q5ythw | 99:microliter |
# View the autoprotocol container-type
cont_123.container_type
ContainerType(name='384-well Echo plate', is_tube=False, well_count=384, well_depth_mm=None, well_volume_ul=Unit(65.0, 'microliter'), well_coating=None, sterile=None, cover_types=['universal'], seal_types=['foil', 'ultra-clear'], capabilities=['liquid_handle', 'seal', 'spin', 'incubate', 'dispense', 'cover'], shortname='384-echo', col_count=24, dead_volume_ul=Unit(15, 'microliter'), safe_min_volume_ul=Unit(15, 'microliter'), true_max_vol_ul=Unit(135, 'microliter'), vendor='Labcyte', cat_no='PP-0200', prioritize_seal_or_cover='seal')
# View storage status
cont_123.storage
'cold_4'
my_run.data
Attempting to fetch 1 datasets...
Name | DataType | Operation | AnalysisTool | Datasets | |
---|---|---|---|---|---|
0 | OD600 | platereader | absorbance | None | <transcriptic.jupyter.objects.Dataset object a... |
You can also access the datasets directly via the .Datasets
attribute.
my_run.Datasets.loc[0].data
A1 | A2 | A3 | B1 | B2 | B3 | C1 | C2 | C3 | |
---|---|---|---|---|---|---|---|---|---|
0 | 0.05 | 0.04 | 0.06 | 1.21 | 1.13 | 1.32 | 2.22 | 2.15 | 2.37 |
Some basic analysis is supported on datasets. See the Analysis notebook for more examples.
from transcriptic.analysis.spectrophotometry import Absorbance
Absorbance?
abs_dataset = Absorbance(
my_run.Datasets.loc[0],
["control", "sample1", "sample2"],
group_wells = [[0,1,2], [12, 13, 14], [24, 25, 26]]
)
abs_dataset
<transcriptic.analysis.spectrophotometry.Absorbance at 0x7f5b952ab710>
abs_dataset.df
control | sample1 | sample2 | |
---|---|---|---|
0 | 0.05 | 1.21 | 2.22 |
1 | 0.04 | 1.13 | 2.15 |
2 | 0.06 | 1.32 | 2.37 |
abs_dataset.plot()
Typically, you would initialize a project directly with the given Run-id.
from transcriptic.jupyter import Run
# You can select your desired run-id from the project runs
my_run_id = my_project.runs().loc[0].id
my_run = Run(my_run_id)