Newer
Older
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Working with pybis"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## connect to openBIS\n",
"(using stored session token ~/.pybis/localhost.token)"
]
},
{
"cell_type": "code",
"execution_count": 86,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"'vermeul-170213105629815x0CF2F2467FF08E65E79A1E25E0334BC3'"
"execution_count": 86,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from pybis import Openbis\n",
"o = Openbis(url='https://localhost:8443', verify_certificates=False)\n",
"o.token"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"check if session is still active:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/plain": [
"True"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"o.is_session_active()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"login with a password if the token is no longer valid - and store the token"
]
},
{
"cell_type": "code",
"execution_count": 85,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"········\n"
]
},
{
"data": {
"text/plain": [
"'vermeul-170213105629815x0CF2F2467FF08E65E79A1E25E0334BC3'"
"execution_count": 85,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"o = Openbis('https://localhost:8443', verify_certificates=False)\n",
"password = getpass.getpass()\n",
"o.login('vermeul',password, save_token=True)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"you can connect to another openBIS instance if you like to:"
]
},
{
"cell_type": "code",
"execution_count": 82,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"········\n"
]
},
{
"data": {
"text/plain": [
"'vermeul-170213105248365xBB06092567F9EE09864C78CDBDB14CA9'"
]
},
"execution_count": 82,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from pybis import Openbis\n",
"import getpass\n",
"o2 = Openbis('https://sprint-openbis.ethz.ch:8443', verify_certificates=False)\n",
"password = getpass.getpass()\n",
"o2.login('vermeul',password)\n",
"o2.token"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"disconnnect (or rather: make the session key invalid):"
]
},
{
"cell_type": "code",
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"o2.logout()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## get general information about openBIS"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Data Store Servers (DSS)"
]
},
{
"cell_type": "code",
"execution_count": 9,
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>code</th>\n",
" <th>downloadUrl</th>\n",
" <th>hostUrl</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>DSS1</td>\n",
" <td>https://localhost:8444/datastore_server</td>\n",
" <td>https://localhost:8444</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" code downloadUrl hostUrl\n",
"0 DSS1 https://localhost:8444/datastore_server https://localhost:8444"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"o.get_datastores()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"list all available spaces:"
]
},
{
"cell_type": "code",
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>code</th>\n",
" <th>description</th>\n",
" <th>registrationDate</th>\n",
" <th>modificationDate</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>ANOTHER_SPACE_NAME</td>\n",
" <td>another space description</td>\n",
" <td>2016-07-15 02:54:45</td>\n",
" <td>2016-07-15 02:54:45</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>MATERIALS</td>\n",
" <td>None</td>\n",
" <td>2016-06-24 11:47:52</td>\n",
" <td>2016-06-24 11:47:52</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>METHODS</td>\n",
" <td>None</td>\n",
" <td>2016-06-24 11:47:53</td>\n",
" <td>2016-06-24 11:47:53</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>MY_NEW_SPACE</td>\n",
" <td>this is yet another space</td>\n",
" <td>2016-07-15 03:02:14</td>\n",
" <td>2016-07-15 03:02:14</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>VERMEUL</td>\n",
" <td>Space for user vermeul</td>\n",
" <td>2016-06-24 11:50:48</td>\n",
" <td>2016-06-24 11:50:48</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
"<pybis.pybis.Things at 0x7f7ff39e4fd0>"
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"o.get_spaces()"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"\n",
" <table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th>attribute</th>\n",
" <th>value</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr> <td>code</td> <td>MY_NEW_SPACE</td> </tr><tr> <td>permId</td> <td>MY_NEW_SPACE</td> </tr><tr> <td>description</td> <td>this is yet another space</td> </tr><tr> <td>registrator</td> <td>vermeul</td> </tr><tr> <td>registrationDate</td> <td>2016-07-15 03:02:14</td> </tr><tr> <td>modificationDate</td> <td>2016-07-15 03:02:14</td> </tr>\n",
" </tbody>\n",
" </table>\n",
" "
],
"text/plain": [
"<pybis.pybis.Space at 0x7f7ff5194898>"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"sp = o.get_space('my_new_space')\n",
"# another way: get space number 3 from the list above.\n",
"# sp = o.get_spaces()[3]\n",
"# sp = o.get_spaces()['MY_NEW_SPACE']\n",
{
"cell_type": "markdown",
"metadata": {},
"source": [
"list all the projects within that space"
]
},
{
"cell_type": "code",
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>identifier</th>\n",
" <th>permId</th>\n",
" <th>leader</th>\n",
" <th>registrator</th>\n",
" <th>registrationDate</th>\n",
" <th>modifier</th>\n",
" <th>modificationDate</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>/MY_NEW_SPACE/VERMEUL_PROJECT</td>\n",
" <td>20160926234755430-363</td>\n",
" <td>None</td>\n",
" <td>vermeul</td>\n",
" <td>2016-09-26 23:47:55</td>\n",
" <td>admin</td>\n",
" <td>2017-01-20 23:57:45</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
"<pybis.pybis.Things at 0x7f7ff39e8940>"
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"get details of the first project in this list"
]
},
{
"cell_type": "code",
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"\n",
" <table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th>attribute</th>\n",
" <th>value</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr> <td>code</td> <td>VERMEUL_PROJECT</td> </tr><tr> <td>description</td> <td>my first project in my space...</td> </tr><tr> <td>permId</td> <td>20160926234755430-363</td> </tr><tr> <td>identifier</td> <td>/MY_NEW_SPACE/VERMEUL_PROJECT</td> </tr><tr> <td>space</td> <td>MY_NEW_SPACE</td> </tr><tr> <td>leader</td> <td></td> </tr><tr> <td>registrator</td> <td>vermeul</td> </tr><tr> <td>registrationDate</td> <td>2016-09-26 23:47:55</td> </tr><tr> <td>modifier</td> <td>admin</td> </tr><tr> <td>modificationDate</td> <td>2017-01-20 23:57:45</td> </tr><tr><td>attachments</td><td>pybis.pdf</td></tr>\n",
" </tbody>\n",
" </table>\n",
" "
],
"text/plain": [
"<pybis.pybis.Project at 0x7f6a2776dbe0>"
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pr = sp.get_projects()[0]\n",
"# this works too:\n",
"# pr = sp.get_projects()['/MY_NEW_SPACE/VERMEUL_PROJECT']\n",
"pr"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**TAB completion**: list all possible attributes and methods by hitting the TAB key"
]
},
{
"cell_type": "code",
},
"outputs": [],
"source": [
"# try it: put the cursor after the dot and press TAB\n",
"pr."
"cell_type": "markdown",
"metadata": {},
"Fetch the experiments that belong to a project"
]
},
{
"cell_type": "code",
"execution_count": 87,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"pr = o.get_project('/MY_NEW_SPACE/VERMEUL_PROJECT')"
]
},
{
"cell_type": "code",
"execution_count": 88,
"collapsed": false,
"scrolled": true
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>identifier</th>\n",
" <th>permId</th>\n",
" <th>project</th>\n",
" <th>type</th>\n",
" <th>registrator</th>\n",
" <th>registrationDate</th>\n",
" <th>modifier</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>/MY_NEW_SPACE/VERMEUL_PROJECT/EXP_NEW</td>\n",
" <td>20170127005816666-430</td>\n",
" <td>VERMEUL_PROJECT</td>\n",
" <td>None</td>\n",
" <td>vermeul</td>\n",
" <td>2017-01-27 00:58:17</td>\n",
" <td>vermeul</td>\n",
" <td>2017-01-27 00:58:17</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>/MY_NEW_SPACE/VERMEUL_PROJECT/MY_EXPERIMENT4</td>\n",
" <td>20160924020719018-358</td>\n",
" <td>VERMEUL_PROJECT</td>\n",
" <td>None</td>\n",
" <td>vermeul</td>\n",
" <td>2016-09-24 02:07:19</td>\n",
" <td>vermeul</td>\n",
" <td>2017-01-09 00:05:43</td>\n",
" </tr>\n",
" <tr>\n",
" <td>/MY_NEW_SPACE/VERMEUL_PROJECT/MY_SPECIAL_EXPER...</td>\n",
" <td>20161121013609807-402</td>\n",
" <td>VERMEUL_PROJECT</td>\n",
" <td>None</td>\n",
" <td>vermeul</td>\n",
" <td>2016-11-21 01:36:10</td>\n",
" <td>vermeul</td>\n",
" <td>2017-01-20 23:41:42</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
"0\t/MY_NEW_SPACE/VERMEUL_PROJECT/EXP_NEW\n",
"1\t/MY_NEW_SPACE/VERMEUL_PROJECT/MY_EXPERIMENT4\n",
"2\t/MY_NEW_SPACE/VERMEUL_PROJECT/MY_SPECIAL_EXPERIMENT"
"execution_count": 88,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"exs = pr.get_experiments()\n",
"exs"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"... using a different approach"
]
},
{
"cell_type": "code",
"execution_count": 90,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th>identifier</th>\n",
" <th>permId</th>\n",
" <th>project</th>\n",
" <th>type</th>\n",
" <th>registrator</th>\n",
" <th>registrationDate</th>\n",
" <th>modifier</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <td>/MY_NEW_SPACE/VERMEUL_PROJECT/EXP_NEW</td>\n",
" <td>20170127005816666-430</td>\n",
" <td>VERMEUL_PROJECT</td>\n",
" <td>None</td>\n",
" <td>2017-01-27 00:58:17</td>\n",
" <td>2017-01-27 00:58:17</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>/MY_NEW_SPACE/VERMEUL_PROJECT/MY_EXPERIMENT4</td>\n",
" <td>20160924020719018-358</td>\n",
" <td>VERMEUL_PROJECT</td>\n",
" <td>None</td>\n",
" <td>2016-09-24 02:07:19</td>\n",
" <td>2017-01-09 00:05:43</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>/MY_NEW_SPACE/VERMEUL_PROJECT/MY_SPECIAL_EXPER...</td>\n",
" <td>20161121013609807-402</td>\n",
" <td>VERMEUL_PROJECT</td>\n",
" <td>None</td>\n",
" <td>2016-11-21 01:36:10</td>\n",
" <td>vermeul</td>\n",
" <td>2017-01-20 23:41:42</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
"0\t/MY_NEW_SPACE/VERMEUL_PROJECT/EXP_NEW\n",
"1\t/MY_NEW_SPACE/VERMEUL_PROJECT/MY_EXPERIMENT4\n",
"2\t/MY_NEW_SPACE/VERMEUL_PROJECT/MY_SPECIAL_EXPERIMENT"
"execution_count": 90,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"o.get_experiments(project='/MY_NEW_SPACE/VERMEUL_PROJECT')"
"cell_type": "markdown",
"metadata": {},
"**get vocabulary terms**"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"\n",
" <table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th>vocabulary term</th>\n",
" <th>label</th>\n",
" <th>description</th>\n",
" <th>vocabulary</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr> <td>PBLUESCRIPT_II_KS_PLUS</td> <td>pBluescript II KS +</td> <td>Commercial vector for cloning in bacteria (Stratagene)</td> <td>BACKBONE</td> </tr><tr> <td>PSPPOLY_A</td> <td>pSPpoly(A)</td> <td>Standard cloning vector. It can be used for in vitro trascription from SP6 promoter. It contains a poly(A) to generate poly(A)+ transcripts in vitro (Promega)</td> <td>BACKBONE</td> </tr><tr> <td>PRS30Y</td> <td>pRS30y</td> <td>Integrative yeast shuttle vector from Sikorski et al, 1989</td> <td>BACKBONE</td> </tr><tr> <td>PRS31Y</td> <td>pRS31y</td> <td>Centromeric yeast shuttle vector from Sikorski et al, 1989</td> <td>BACKBONE</td> </tr><tr> <td>PRS40Y</td> <td>pRS40y</td> <td>Integrative yeast shuttle vector from Sikorski et al, 1992</td> <td>BACKBONE</td> </tr><tr> <td>PRS41Y</td> <td>pRS41y</td> <td>Centromeric yeast shuttle vector from Sikorski et al, 1992</td> <td>BACKBONE</td> </tr><tr> <td>PRS42Y</td> <td>pRS42y</td> <td>2-micron-based yeast shuttle vector from Sikorski et al, 1992</td> <td>BACKBONE</td> </tr><tr> <td>UNKNOWN</td> <td>unknown</td> <td>unknown vector</td> <td>BACKBONE</td> </tr><tr> <td>PGEX4T1</td> <td>pGEX4T1</td> <td>Vector for bacterial expression</td> <td>BACKBONE</td> </tr>\n",
" </tbody>\n",
" </table>\n",
" "
],
"text/plain": [
"<pybis.masterdata.Vocabulary at 0x7f3140fafeb8>"
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"x = o.get_terms('Backbone')\n",
"x"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## get information about general types"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"OpenBIS categorizes some of its entities in «types»:\n",
"\n",
"* sample type\n",
"* experiment type\n",
"* material type\n",
"* dataset type\n",
"\n",
"The types define the collection of **properties** that can be later assigned to a sample, experiment or dataset."
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>code</th>\n",
" <th>description</th>\n",
" <th>modificationDate</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>DEFAULT_EXPERIMENT</td>\n",
" <td>Default Experiment</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>MATERIALS</td>\n",
" <td>Folder used to organize samples in the Invento...</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>METHODS</td>\n",
" <td>Folder used to organize samples in the Invento...</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>BOARDS</td>\n",
" <td>Folder used to organize boards</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>UNKNOWN</td>\n",
" <td>Unknown</td>\n",
" <td>2016-06-24 10:47:01</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
"<pybis.pybis.Things at 0x7f7ff3996a20>"
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"o.get_experiment_types()"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>code</th>\n",
" <th>description</th>\n",
" <th>generatedCodePrefix</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>ANTIBODY</td>\n",
" <td>ANT</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>CHEMICAL</td>\n",
" <td>CHE</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>ENZYME</td>\n",
" <td>ENZ</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>MEDIA</td>\n",
" <td>MED</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>SOLUTION_BUFFER</td>\n",
" <td>SOL</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>OLIGO</td>\n",
" <td>OLI</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>RNA</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>PLASMID</td>\n",
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
" <td>PLA</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>BACTERIA</td>\n",
" <td></td>\n",
" <td>BAC</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>YEAST</td>\n",
" <td></td>\n",
" <td>YEA</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>CELL_LINE</td>\n",
" <td></td>\n",
" <td>CEL</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>FLY</td>\n",
" <td></td>\n",
" <td>FLY</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>EXPERIMENTAL_STEP</td>\n",
" <td></td>\n",
" <td>EXP</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>GENERAL_PROTOCOL</td>\n",
" <td></td>\n",
" <td>GEN</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>PCR_PROTOCOL</td>\n",
" <td></td>\n",
" <td>PCR</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>WESTERN_BLOTTING_PROTOCOL</td>\n",
" <td></td>\n",
" <td>WES</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>DRAWING_BOARD</td>\n",
" <td></td>\n",
" <td>DRA</td>\n",
" <td>2016-06-24 10:48:02</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>UNKNOWN</td>\n",
" <td>Unknown</td>\n",
" <td>S</td>\n",
" <td>2016-06-24 10:47:01</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
"<pybis.pybis.Things at 0x7f7ff399dbe0>"
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"o.get_sample_types()"
"execution_count": 14,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>code</th>\n",
" <th>description</th>\n",
" <th>modificationDate</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>MY_VERY_EXCITING_MATERIAL</td>\n",
" <td>looks like dirt and probably is dirt</td>\n",
" <td>2016-09-24 00:46:19</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
"<pybis.pybis.Things at 0x7f7ff399d518>"
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}