Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
059006ab
Commit
059006ab
authored
7 years ago
by
piotr.kupczyk@id.ethz.ch
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-5738 pyBIS : Support for semantic annotations - documentation
parent
6fee3f0f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/python/PyBis/README.rst
+46
-8
46 additions, 8 deletions
src/python/PyBis/README.rst
with
46 additions
and
8 deletions
src/python/PyBis/README.rst
+
46
−
8
View file @
059006ab
...
@@ -59,9 +59,9 @@ Samples
...
@@ -59,9 +59,9 @@ Samples
::
::
sample = o.new_sample(
sample = o.new_sample(
type='YEAST',
type='YEAST',
space='MY_SPACE',
space='MY_SPACE',
parents=[parent_sample, '/MY_SPACE/YEA66'],
parents=[parent_sample, '/MY_SPACE/YEA66'],
children=[child_sample]
children=[child_sample]
)
)
sample.space
sample.space
...
@@ -119,9 +119,9 @@ Experiments
...
@@ -119,9 +119,9 @@ Experiments
)
)
o.get_experiments(
o.get_experiments(
project='YEASTS',
project='YEASTS',
space='MY_SPACE',
space='MY_SPACE',
type='DEFAULT_EXPERIMENT',
type='DEFAULT_EXPERIMENT',
tags='*',
tags='*',
finished_flag=False,
finished_flag=False,
props=['name', 'finished_flag']
props=['name', 'finished_flag']
)
)
...
@@ -163,11 +163,11 @@ Datasets
...
@@ -163,11 +163,11 @@ Datasets
ds.download(destination='/tmp', wait_until_finished=False)
ds.download(destination='/tmp', wait_until_finished=False)
ds_new = o.new_dataset(
ds_new = o.new_dataset(
type='ANALYZED_DATA',
type='ANALYZED_DATA',
experiment=exp,
experiment=exp,
sample= samp,
sample= samp,
parents=[my_dataset, '20160713173002405-212'],
parents=[my_dataset, '20160713173002405-212'],
files = ['my_analyzed_data.dat'],
files = ['my_analyzed_data.dat'],
props={'name': 'we give this dataset a name', 'notes': 'and we might need some notes, too'})
props={'name': 'we give this dataset a name', 'notes': 'and we might need some notes, too'})
)
)
ds_new.save()
ds_new.save()
...
@@ -191,6 +191,44 @@ Datasets
...
@@ -191,6 +191,44 @@ Datasets
for dataset in datasets:
for dataset in datasets:
print(ds.permID)
print(ds.permID)
Semantic Annotations
--------------------
::
# create semantic annotation for sample type
o.new_semantic_annotation(entityType = 'UNKNOWN')
# create sementic annotation for property type
o.new_semantic_annotation(propertyType = 'DESCRIPTION')
# create semantic annotation for sample property assignment
o.new_semantic_annotation(entityType = 'UNKNOWN', propertyType = 'DESCRIPTION')
# create semantic annotation with additional fields
o.new_semantic_annotation(entityType = 'UNKNOWN',
predicateOntologyId = 'po_id',
predicateOntologyVersion = 'po_version',
predicateAccessionId = 'pa_id',
descriptorOntologyId = 'do_id',
descriptorOntologyVersion = 'do_version',
descriptorAccessionId = 'da_id')
# get all semantic annotations
o.get_semantic_annotations()
# get semantic annotation by perm id
sa = o.get_semantic_annotation("20171015135637955-30")
# update semantic annotation
sa.predicateOntologyId = 'new_po_id'
sa.descriptorOntologyId = 'new_do_id'
sa.save()
# delete semantic annotation
sa.delete('reason')
Requirements and organization
Requirements and organization
=============================
=============================
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment