This notebook provides a few examples of working with the IDR data. Functions can be found in idr-py. Feel free to copy notebooks into the scratch space and edit as necessary. All changes should be considered temporary. Download a copy of notebooks and results when your session is complete.
The cell below will install dependencies if you choose to run the notebook in Google Colab.
%pip install idr-py
from IPython.display import display, Image
from IPython import get_ipython
from idr import connection
from idr import images_by_phenotype, attributes_by_attributes
from idr import simple_colocalisation
get_ipython().run_line_magic('matplotlib', 'inline')
conn = connection('idr.openmicroscopy.org')
No handlers could be found for logger "omero.gateway"
images = images_by_phenotype(conn, "CMPO_0000077")
display(*tuple([Image(img.getThumbnail()) for img in images[100:2500:500]]))
simple_colocalisation(images[999])
args = {
"name": "Gene Symbol",
"value": "cdc14",
"ns": "openmicroscopy.org/mapr/gene",
"ns2": "openmicroscopy.org/mapr/phenotype",
# "name2": "Phenotype Term Accession", # optional
}
attributes_by_attributes(conn, **args)
{('Gene Symbol', 'CDC14'): [('Phenotype Term Accession', 'CMPO_0000427'), ('Phenotype Term Accession', 'CMPO_0000397'), ('Phenotype', 'altered kinetochore foci'), ('Phenotype Term Name', 'protein localized in nucleolus phenotype'), ('Phenotype Term Name', 'kinetochore phenotype'), ('Phenotype Term Accession URL', 'http://www.ebi.ac.uk/cmpo/CMPO_0000397'), ('Phenotype', 'GFP localization: nucleolus'), ('Phenotype Term Accession URL', 'http://www.ebi.ac.uk/cmpo/CMPO_0000427')], ('Gene Symbol', 'cdc14'): [('Phenotype Term Accession', 'CMPO_0000416'), ('Phenotype Term Accession URL', 'http://www.ebi.ac.uk/cmpo/CMPO_0000416'), ('Phenotype', 'defective cell-cell aggregation'), ('Phenotype Term Name', 'fewer aggregated cells in population phenotype')]}
conn.close()
Copyright (C) 2016-2021 University of Dundee. All Rights Reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.