Genome

sealed interface Genome : Parent

Inheritors

Types

Link copied to clipboard
object Companion

PLANNED:

Properties

Link copied to clipboard
open val children: List<Feature>

All children of this parent

Link copied to clipboard

If true, then a Feature within the Genome may have multiple parents. If false, no Feature in the Genome may have multiple parents. Recommended to be false as multiple parentage can lead to unintuitive results.

Functions

Link copied to clipboard
abstract fun byID(id: String): Feature?
Link copied to clipboard
abstract fun byName(name: String): List<Feature>
Link copied to clipboard
abstract fun children(type: String? = null): List<Feature>

All children of this parent of type type (including its synonyms), or all children if type is null.

Link copied to clipboard
abstract fun containsID(id: String): Boolean

True iff a feature with id property id exists in this genome.

Link copied to clipboard
abstract fun containsName(name: String): Boolean

True iff a feature with name property name exists in this genome.

Link copied to clipboard
abstract fun containsType(type: String): Boolean

True iff type is in the type schema.

Link copied to clipboard
abstract fun copy(): Genome

Creates a deep copy of this Genome. If this is MutableGenome, the copy will be mutable. It will be immutable otherwise.

Link copied to clipboard
abstract fun descendants(type: String? = null): Sequence<Feature>

All descendants of this parent of type type (including its synonyms) in depth-first order, or all descendants if type is null. Iterating over the descendants while modifying the topology of the tree will produce a ConcurrentModificationException (non-topological modifications are permissible). Multiple parentage will result in duplicate values

Link copied to clipboard
abstract fun immutable(): Genome

Creates an immutable deep copy of this genome

Link copied to clipboard
abstract fun isA(subType: String, superType: String): Boolean

True any type associated with the name subType is transitively a subtype of any type associated with the name superType

Link copied to clipboard
abstract fun isRoughSynonym(name: String, vararg other: String): Boolean

True iff all elements of other are rough synonyms of name. Always false if name is not in the schema.

Link copied to clipboard
abstract fun isSynonym(name: String, vararg other: String): Boolean

True iff all elements of other are exact synonyms of name. Always false if name is not in the schema.

Link copied to clipboard
open operator fun iterator(): Iterator<Feature>

Iterates over children

Link copied to clipboard
abstract fun mutable(): MutableGenome

Creates mutable deep copy of this genome

Link copied to clipboard
abstract fun parentString(): String
Link copied to clipboard
abstract fun partOf(child: String, parent: String): Boolean

True iff child has a part-of relationship to parent, either from the Sequence Ontology or due to manual definition of PLANNED: Implementation of TypeSchema the type (MutableGenome.defineType or MutableGenome.addPartOf).

Link copied to clipboard
abstract fun roughSynonyms(type: String): Set<String>

All rough and exact synonyms of type

Link copied to clipboard
abstract fun synonyms(type: String): Set<String>

All exact synonyms of type.

Link copied to clipboard
abstract fun visualizeSchema(): String

DOT format representation of the type schema where nodes represent a type and edges represent a part-Of relationship. Can be visualized with DOT visualization tools, such as Graphviz.