pangea.contrib.treeoflife package¶
Submodules¶
pangea.contrib.treeoflife.admin module¶
pangea.contrib.treeoflife.apps module¶
pangea.contrib.treeoflife.constants module¶
pangea.contrib.treeoflife.mixins module¶
-
class
pangea.contrib.treeoflife.mixins.
BiotaMixin
(*args, **kwargs)[source]¶ Bases:
pangea.contrib.treeoflife.mixins.MicrobeMixin
Fields available in Bacteria, Archaea, & Fungi but not Virus.
-
biofilm_forming
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
halotolerance
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
salinity_concentration_range_w_v
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
class
pangea.contrib.treeoflife.mixins.
MicrobeMixin
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
Fields available in Bacteria, Archaea, Fungi, & Viruses.
-
animal_pathogen
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
antimicrobial_susceptibility
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
extreme_environment
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
human_commensal
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
optimal_ph
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
optimal_temperature
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
pathogenicity
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
plant_pathogen
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
spore_forming
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
class
pangea.contrib.treeoflife.mixins.
MoneraMixin
(*args, **kwargs)[source]¶ Bases:
pangea.contrib.treeoflife.mixins.BiotaMixin
Fields available in Bacteria & Archaea, but not Fungi or Virus.
-
drylands
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
gram_stain
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
high_ph
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
low_ph
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
low_productivity
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
psychrophilic
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
radiophilic
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
pangea.contrib.treeoflife.models module¶
-
class
pangea.contrib.treeoflife.models.
Archaea
(created_at, updated_at, human_commensal, antimicrobial_susceptibility, optimal_temperature, extreme_environment, optimal_ph, animal_pathogen, spore_forming, pathogenicity, plant_pathogen, salinity_concentration_range_w_v, biofilm_forming, halotolerance, low_ph, high_ph, drylands, low_productivity, gram_stain, psychrophilic, radiophilic, uuid, taxon_id, tree_node)[source]¶ Bases:
pangea.contrib.treeoflife.models.MicrobeDirectoryEntry
,pangea.contrib.treeoflife.mixins.MoneraMixin
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
objects
= <django.db.models.manager.Manager object>¶
-
tree_node
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
tree_node_id
¶
-
exception
-
class
pangea.contrib.treeoflife.models.
Bacteria
(created_at, updated_at, human_commensal, antimicrobial_susceptibility, optimal_temperature, extreme_environment, optimal_ph, animal_pathogen, spore_forming, pathogenicity, plant_pathogen, salinity_concentration_range_w_v, biofilm_forming, halotolerance, low_ph, high_ph, drylands, low_productivity, gram_stain, psychrophilic, radiophilic, uuid, taxon_id, tree_node)[source]¶ Bases:
pangea.contrib.treeoflife.models.MicrobeDirectoryEntry
,pangea.contrib.treeoflife.mixins.MoneraMixin
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
objects
= <django.db.models.manager.Manager object>¶
-
tree_node
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
tree_node_id
¶
-
exception
-
class
pangea.contrib.treeoflife.models.
Fungi
(created_at, updated_at, human_commensal, antimicrobial_susceptibility, optimal_temperature, extreme_environment, optimal_ph, animal_pathogen, spore_forming, pathogenicity, plant_pathogen, salinity_concentration_range_w_v, biofilm_forming, halotolerance, uuid, taxon_id, tree_node)[source]¶ Bases:
pangea.contrib.treeoflife.models.MicrobeDirectoryEntry
,pangea.contrib.treeoflife.mixins.BiotaMixin
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
objects
= <django.db.models.manager.Manager object>¶
-
tree_node
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
tree_node_id
¶
-
exception
-
class
pangea.contrib.treeoflife.models.
MicrobeDirectoryEntry
(*args, **kwargs)[source]¶ Bases:
pangea.core.mixins.AutoCreatedUpdatedMixin
-
taxon_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
uuid
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
-
class
pangea.contrib.treeoflife.models.
TaxonName
(created_at, updated_at, uuid, taxon_id, name, name_type)[source]¶ Bases:
pangea.core.mixins.AutoCreatedUpdatedMixin
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
name_type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.Manager object>¶
-
taxon_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
tree_node
¶
-
uuid
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
pangea.contrib.treeoflife.models.
TreeNode
(created_at, updated_at, uuid, taxon_id, parent, rank)[source]¶ Bases:
pangea.core.mixins.AutoCreatedUpdatedMixin
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
all_names
¶
-
ancestors
(reducer=<function TreeNode.<lambda>>)[source]¶ Return a list of TreeNodes that are ancestors of this node.
Start with this node.
-
annotation
¶
-
archaea_annotation_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
bacteria_annotation_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
canon_name
¶
-
children
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
fungi_annotation_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
is_root
¶
-
objects
= <django.db.models.manager.Manager object>¶
-
parent
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
parent_id
¶
-
rank
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
taxon_id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
uuid
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
virus_annotation_set
¶ Accessor to the related objects manager on the reverse side of a many-to-one relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Parent.children
is aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
pangea.contrib.treeoflife.models.
Virus
(created_at, updated_at, human_commensal, antimicrobial_susceptibility, optimal_temperature, extreme_environment, optimal_ph, animal_pathogen, spore_forming, pathogenicity, plant_pathogen, uuid, taxon_id, tree_node, virus_name, virus_lineage, kegg_genome, kegg_disease, disease, host_name, host_lineage)[source]¶ Bases:
pangea.contrib.treeoflife.models.MicrobeDirectoryEntry
,pangea.contrib.treeoflife.mixins.MicrobeMixin
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
disease
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
host_lineage
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
host_name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
kegg_disease
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
kegg_genome
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
objects
= <django.db.models.manager.Manager object>¶
-
tree_node
¶ Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.
In the example:
class Child(Model): parent = ForeignKey(Parent, related_name='children')
Child.parent
is aForwardManyToOneDescriptor
instance.
-
tree_node_id
¶
-
virus_lineage
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
virus_name
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
pangea.contrib.treeoflife.taxa_tree module¶
-
class
pangea.contrib.treeoflife.taxa_tree.
TaxaTree
[source]¶ Bases:
object
-
static
ancestor_rank
(rank, taxon, default=None)[source]¶ Return the ancestor of taxon at the given rank.
-
static
ancestors
(taxon)[source]¶ Return a list of all ancestors of the taxon starting with the taxon itself.
-
static
pangea.contrib.treeoflife.urls module¶
-
pangea.contrib.treeoflife.urls.
path
(route, view, kwargs=None, name=None, *, Pattern=<class 'django.urls.resolvers.RoutePattern'>)¶
pangea.contrib.treeoflife.utils module¶
pangea.contrib.treeoflife.views module¶
-
pangea.contrib.treeoflife.views.
annotate_taxa
(self, request, *args, **kwargs)[source]¶ Reply with annotations for the taxa.
-
pangea.contrib.treeoflife.views.
fuzzy_correct_taxa_names
(self, request, *args, **kwargs)[source]¶ Reply with alternate taxa names.