Zooma App

Zooma app deals with ontology annotations of missing terms. It relies on zooma.helpers functions, which tries to annotate missing terms relying on zooma tools. Only ontologies with an high confidence are used to annotate terms, lower confidences are discarded. Zooma annotations are performed by zooma.tasks after each data import and by weekley Routine Tasks. Annotations can be also started by the user by clicking on Annotate buttons inside zooma.views.OntologiesReportView

zooma.helpers

zooma.helpers module contents

Created on Mon May 7 15:49:04 2018

@author: Paolo Cozzi <paolo.cozzi@ptp.it>

Functions adapted from Jun Fan misc.py and use_zooma.py python scripts

zooma.helpers.annotate_breed(breed_obj)[source]

Annotate breed objects using Zooma

zooma.helpers.annotate_country(country_obj)[source]

Annotate country objects using Zooma

zooma.helpers.annotate_develstage(dictdevelstage_obj)[source]

Annotate developmental stage objects using Zooma

zooma.helpers.annotate_generic(model, zooma_type)[source]

Annotate missing terms from a generic DictTable

Parameters
  • model (uid.models.DictBase) – A DictBase istance

  • zooma_type (str) – the type of zooma annotation (country, species, …)

zooma.helpers.annotate_organismpart(uberon_obj)[source]

Annotate organism part objects using Zooma

zooma.helpers.annotate_physiostage(dictphysiostage_obj)[source]

Annotate physiological stage objects using Zooma

zooma.helpers.annotate_specie(specie_obj)[source]

Annotate specie objects using Zooma

zooma.helpers.call_zooma(label, zooma_type)[source]

Wrapper around use_zooma: call zooma or catch exception

Parameters
  • label (str) – Zooma query temr.

  • zooma_type (str) – Zooma query type (species, breed, …).

Returns

result – The results of use_zooma or None

Return type

dict

zooma.tasks

zooma.tasks module contents

Created on Thu Oct 25 11:27:52 2018

@author: Paolo Cozzi <cozzi@ibba.cnr.it>

class zooma.tasks.AnnotateAll(*args, **kwargs)[source]

Bases: common.tasks.BaseTask

description = 'Annotate all dict tables using Zooma'
name = 'Annotate All'
run(**kwargs)

The body of the task executed by workers.

class zooma.tasks.AnnotateBreeds(*args, **kwargs)[source]

Bases: zooma.tasks.AnnotateTaskMixin, common.tasks.BaseTask

static annotate_func(breed_obj)

Annotate breed objects using Zooma

description = 'Annotate breeds with ontologies using Zooma tools'
model

alias of uid.models.DictBreed

name = 'Annotate Breeds'
run(**kwargs)

This function is called when delay is called

class zooma.tasks.AnnotateCountries(*args, **kwargs)[source]

Bases: zooma.tasks.AnnotateTaskMixin, common.tasks.BaseTask

static annotate_func(country_obj)

Annotate country objects using Zooma

description = 'Annotate countries with ontologies using Zooma tools'
model

alias of uid.models.DictCountry

name = 'Annotate Countries'
run(**kwargs)

This function is called when delay is called

class zooma.tasks.AnnotateDevelStage(*args, **kwargs)[source]

Bases: zooma.tasks.AnnotateTaskMixin, common.tasks.BaseTask

static annotate_func(dictdevelstage_obj)

Annotate developmental stage objects using Zooma

description = 'Annotate developmental stages with ontologies using Zooma tools'
model

alias of uid.models.DictDevelStage

name = 'Annotate DevelStage'
run(**kwargs)

This function is called when delay is called

class zooma.tasks.AnnotateOrganismPart(*args, **kwargs)[source]

Bases: zooma.tasks.AnnotateTaskMixin, common.tasks.BaseTask

static annotate_func(uberon_obj)

Annotate organism part objects using Zooma

description = 'Annotate organism parts with ontologies using Zooma tools'
lock_id = 'AnnotateOrganismPart'
model

alias of uid.models.DictUberon

name = 'Annotate OrganismPart'
run(**kwargs)

This function is called when delay is called

class zooma.tasks.AnnotatePhysioStage(*args, **kwargs)[source]

Bases: zooma.tasks.AnnotateTaskMixin, common.tasks.BaseTask

static annotate_func(dictphysiostage_obj)

Annotate physiological stage objects using Zooma

description = 'Annotate physiological stages with ontologies using Zooma tools'
model

alias of uid.models.DictPhysioStage

name = 'Annotate PhysioStage'
run(**kwargs)

This function is called when delay is called

class zooma.tasks.AnnotateSpecies(*args, **kwargs)[source]

Bases: zooma.tasks.AnnotateTaskMixin, common.tasks.BaseTask

static annotate_func(specie_obj)

Annotate specie objects using Zooma

description = 'Annotate species with ontologies using Zooma tools'
model

alias of uid.models.DictSpecie

name = 'Annotate Species'
run(**kwargs)

This function is called when delay is called

class zooma.tasks.AnnotateTaskMixin[source]

Bases: common.tasks.NotifyAdminTaskMixin

annotate_func = None
descripttion = None
model = None
name = None
run()[source]

This function is called when delay is called

zooma.views

zooma.views module contents

Created on Fri Sep 27 15:39:30 2019

@author: Paolo Cozzi <cozzi@ibba.cnr.it>

class zooma.views.AnnotateBreedsView(**kwargs)[source]

Bases: zooma.views.AnnotateViewMixin, django.contrib.auth.mixins.LoginRequiredMixin, common.views.AjaxTemplateView

dict_class

alias of uid.models.DictBreed

task_class

alias of zooma.tasks.AnnotateBreeds

task_name = 'Annotate Breeds'
class zooma.views.AnnotateCountriesView(**kwargs)[source]

Bases: zooma.views.AnnotateViewMixin, django.contrib.auth.mixins.LoginRequiredMixin, common.views.AjaxTemplateView

dict_class

alias of uid.models.DictCountry

task_class

alias of zooma.tasks.AnnotateCountries

task_name = 'Annotate Countries'
class zooma.views.AnnotateDevelStageView(**kwargs)[source]

Bases: zooma.views.AnnotateViewMixin, django.contrib.auth.mixins.LoginRequiredMixin, common.views.AjaxTemplateView

dict_class

alias of uid.models.DictDevelStage

task_class

alias of zooma.tasks.AnnotateDevelStage

task_name = 'Annotate Developmental Stages'
class zooma.views.AnnotateOrganismPartView(**kwargs)[source]

Bases: zooma.views.AnnotateViewMixin, django.contrib.auth.mixins.LoginRequiredMixin, common.views.AjaxTemplateView

dict_class

alias of uid.models.DictUberon

task_class

alias of zooma.tasks.AnnotateOrganismPart

task_name = 'Annotate Organism Parts'
class zooma.views.AnnotatePhysioStageView(**kwargs)[source]

Bases: zooma.views.AnnotateViewMixin, django.contrib.auth.mixins.LoginRequiredMixin, common.views.AjaxTemplateView

dict_class

alias of uid.models.DictPhysioStage

task_class

alias of zooma.tasks.AnnotatePhysioStage

task_name = 'Annotate Physiological Stages'
class zooma.views.AnnotateSpeciesView(**kwargs)[source]

Bases: zooma.views.AnnotateViewMixin, django.contrib.auth.mixins.LoginRequiredMixin, common.views.AjaxTemplateView

dict_class

alias of uid.models.DictSpecie

task_class

alias of zooma.tasks.AnnotateSpecies

task_name = 'Annotate Species'
class zooma.views.AnnotateViewMixin[source]

Bases: object

dict_class = None
get(request)[source]
http_method_names = ['post', 'get']
post(request)[source]
task_class = None
task_name = None
class zooma.views.OntologiesReportView(**kwargs)[source]

Bases: django.contrib.auth.mixins.LoginRequiredMixin, django.views.generic.base.TemplateView

get_context_data(**kwargs)[source]
template_name = 'zooma/ontologies_report.html'