Class CellTypeAssignmentValueObject

All Implemented Interfaces:
Serializable, Identifiable

public class CellTypeAssignmentValueObject extends AnalysisValueObject<CellTypeAssignment>
Author:
poirigui
See Also:
  • Constructor Details

    • CellTypeAssignmentValueObject

      public CellTypeAssignmentValueObject(CellTypeAssignment cellTypeAssignment, boolean excludeCellTypeIds)
  • Method Details

    • getCellTypes

      public Set<CharacteristicValueObject> getCellTypes()
      A set of cell types that are assigned to individual cells.
    • getCellTypeIds

      public List<Long> getCellTypeIds()
      A list of IDs, one-per-cell, that refers to one of the cell type labels in cellTypes.

      null is used to indicate an unknown cell type.

    • getNumberOfAssignedCells

      @Nullable public Integer getNumberOfAssignedCells()
      Indicate how many cells have an assigned cell type, or null if this information is not available.
    • getNumberOfAssignedCellsByCellType

      @Nullable public Map<Long,Integer> getNumberOfAssignedCellsByCellType()
      How many cells carry each cell type, keyed by the id of the entry in cellTypes. null when the indices are unavailable.

      The tally comes off the same cellTypeIndices array cellTypeIds is built from, so it costs one extra pass and no extra query. It exists because the per-cell array was the only way to answer "how many astrocytes" — 89,700 entries and 809 KB on one dataset to recover ten numbers (uib, 2026-09-03) — and a client that only needs the tally can now exclude the array outright.

    • isPreferred

      public boolean isPreferred()
      Indicate if this assignment is the preferred one.
    • setCellTypes

      public void setCellTypes(Set<CharacteristicValueObject> cellTypes)
      A set of cell types that are assigned to individual cells.
    • setCellTypeIds

      public void setCellTypeIds(List<Long> cellTypeIds)
      A list of IDs, one-per-cell, that refers to one of the cell type labels in cellTypes.

      null is used to indicate an unknown cell type.

    • setNumberOfAssignedCells

      public void setNumberOfAssignedCells(@Nullable Integer numberOfAssignedCells)
      Indicate how many cells have an assigned cell type, or null if this information is not available.
    • setNumberOfAssignedCellsByCellType

      public void setNumberOfAssignedCellsByCellType(@Nullable Map<Long,Integer> numberOfAssignedCellsByCellType)
      How many cells carry each cell type, keyed by the id of the entry in cellTypes. null when the indices are unavailable.

      The tally comes off the same cellTypeIndices array cellTypeIds is built from, so it costs one extra pass and no extra query. It exists because the per-cell array was the only way to answer "how many astrocytes" — 89,700 entries and 809 KB on one dataset to recover ten numbers (uib, 2026-09-03) — and a client that only needs the tally can now exclude the array outright.

    • setPreferred

      public void setPreferred(boolean isPreferred)
      Indicate if this assignment is the preferred one.
    • toString

      public String toString()
      Overrides:
      toString in class IdentifiableValueObject<CellTypeAssignment>
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class IdentifiableValueObject<CellTypeAssignment>
    • canEqual

      protected boolean canEqual(Object other)
      Overrides:
      canEqual in class IdentifiableValueObject<CellTypeAssignment>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class IdentifiableValueObject<CellTypeAssignment>