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.
%matplotlib inline
import matplotlib.pyplot as plt
from IPython.display import display, Image
from idr import connection
from idr import images_by_phenotype, attributes_by_attributes
from idr import simple_colocalisation
conn = connection()
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()