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 aProteoforminstance with the specified variants. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRelation(String alleleIdentifier) Associates an allele with this proteoform.booleanCompares this proteoform to another object for equality.Retrieves a collection of allele identifiers associated with this proteoform.inthashCode()Computes the hash code for this proteoform.booleanhasRelation(String identifier) Checks if this proteoform is associated with a specific allele by its identifier.booleanDetermines 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, hasVariantAtMethods 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 aProteoforminstance with the specified variants.This constructor initializes the proteoform by processing a list of
Variant.Stubobjects.- Parameters:
variants- AListofVariant.Stubobjects 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:
trueif the allele is associated with this proteoform,falseotherwise.
-
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
Setof 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:
trueif the proteoform is disrupted (i.e., has "start_lost" or "stop_gained" SO effects),falseotherwise.
-
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:
equalsin classObject- Parameters:
obj- The object to compare with thisProteoforminstance.- Returns:
trueif the objects are the same instance or if their string representations are equal;falseotherwise.
-