Class Proteoform
This class extends SequenceType
and provides functionality to manage relationships between the proteoform and associated
alleles.
-
Field Summary
Fields inherited from class model.SequenceType
_id
-
Constructor Summary
ConstructorsConstructorDescriptionProteoform
(List<Variant.Stub> variants) Constructs aProteoform
instance with the specified variants. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRelation
(String alleleIdentifier) Associates an allele with this proteoform.boolean
Compares this proteoform to another object for equality.Retrieves a collection of allele identifiers associated with this proteoform.int
hashCode()
Computes the hash code for this proteoform.boolean
hasRelation
(String identifier) Checks if this proteoform is associated with a specific allele by its identifier.boolean
Determines if the proteoform is disrupted based on its sequence ontology (SO) effects.toString()
Converts the proteoform to its string representation.Methods inherited from class model.SequenceType
getStubs, getVariant, getVariants, hasVariant, hasVariantAt
Methods inherited from class model.Attributes
attributesAsString, attributesAsString, clearAttributes, extendAttribute, extendAttributes, getAttribute, getAttributeOrDefault, getAttributes, getAttributeSet, hasAnyAttribute, hasAttribute, removeAttribute, setAttribute, setAttributeIfAbsent, setAttributes, setAttributesIfAbsent
-
Constructor Details
-
Proteoform
Constructs aProteoform
instance with the specified variants.This constructor initializes the proteoform by processing a list of
Variant.Stub
objects.- Parameters:
variants
- AList
ofVariant.Stub
objects representing the variants that define this proteoform.
-
-
Method Details
-
hasRelation
Checks if this proteoform is associated with a specific allele by its identifier.- Parameters:
identifier
- The unique identifier of the allele to check.- Returns:
true
if the allele is associated with this proteoform,false
otherwise.
-
getRelatedAlleles
Retrieves a collection of allele identifiers associated with this proteoform.This method returns an unmodifiable view of the set of allele identifiers associated with the proteoform. The unmodifiable set ensures that the original set cannot be modified externally, preserving data integrity.
- Returns:
- A
Set
of allele identifiers related to this proteoform.
-
addRelation
Associates an allele with this proteoform.- Parameters:
alleleIdentifier
- The unique identifier of the allele to associate with this proteoform.
-
isDisrupted
public boolean isDisrupted()Determines if the proteoform is disrupted based on its sequence ontology (SO) effects.- Returns:
true
if the proteoform is disrupted (i.e., has "start_lost" or "stop_gained" SO effects),false
otherwise.
-
toString
Converts the proteoform to its string representation.This method returns the unique identifier of the proteoform as its string representation.
-
hashCode
public int hashCode()Computes the hash code for this proteoform.This method calculates the hash code of the proteoform based on its string representation.
-
equals
Compares this proteoform to another object for equality.This method checks if the provided object is the same instance as this proteoform. If not, it verifies that the object is of the same class and compares their string representations for equality.
- Overrides:
equals
in classObject
- Parameters:
obj
- The object to compare with thisProteoform
instance.- Returns:
true
if the objects are the same instance or if their string representations are equal;false
otherwise.
-