Class BioAssayValueObject

java.lang.Object
ubic.gemma.model.common.IdentifiableValueObject<BioAssay>
ubic.gemma.model.expression.bioAssay.BioAssayValueObject
All Implemented Interfaces:
Serializable, Identifiable

public class BioAssayValueObject extends IdentifiableValueObject<BioAssay>
Author:
Paul
See Also:
  • Constructor Details

    • BioAssayValueObject

      public BioAssayValueObject()
      Required when using the class as a spring bean.
    • BioAssayValueObject

      public BioAssayValueObject(BioAssay bioAssay)
    • BioAssayValueObject

      public BioAssayValueObject(BioAssay bioAssay, boolean basic)
    • BioAssayValueObject

      public BioAssayValueObject(BioAssay bioAssay, boolean basic, boolean predictedOutlier)
    • BioAssayValueObject

      public BioAssayValueObject(BioAssay bioAssay, @Nullable Map<ArrayDesign, ArrayDesignValueObject> ad2vo, @Nullable BioAssay sourceBioAssay, boolean basic, boolean allFactorValues)
      Parameters:
      ad2vo - pre-populated array design VOs by array design, or null to ignore and the VOs will be initialized via ArrayDesignValueObject(ArrayDesign)
      sourceBioAssay - the source BioAssay if known, this corresponds to the assay of the source sample, but since there might be more than one, it must be picked explicitly based on the context
      basic - if true, produce basic factor values in the corresponding biomaterial, see BioMaterialValueObject(BioMaterial, boolean, boolean) for more details
      allFactorValues - include all FVs, including those inherited from the source biomaterial in the corresponding biomaterial
    • BioAssayValueObject

      public BioAssayValueObject(Long id)
  • Method Details

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class IdentifiableValueObject<BioAssay>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class IdentifiableValueObject<BioAssay>
    • toString

      public String toString()
      Overrides:
      toString in class IdentifiableValueObject<BioAssay>
    • getShortName

      @Nullable public String getShortName()
    • getName

      public String getName()
    • getDescription

      public String getDescription()
    • getMetadata

      public String getMetadata()
    • getAccession

      @Nullable public DatabaseEntryValueObject getAccession()
    • getArrayDesign

      public ArrayDesignValueObject getArrayDesign()
      The platform this assay was run on, serialized as ArrayDesignReferenceValueObject — id, shortName, name, technologyType.

      The full platform VO is byte-identical across every assay of a dataset and was serialized once per assay: on GET /datasets/3937/samples (278 assays) the two platform fields were 706,120 of 5,265,852 bytes, 13.4% of the response, most of it 278 copies of one platform's 1.4 kB description. GET /datasets/{id}/platforms?original=true serves the full object once for callers that want the rest of it.

      The Java type stays ArrayDesignValueObject because three in-JVM readers consume it — BioAssayDimensionValueObject, DoubleVectorValueObject and DoubleVectorValueObjectUtils#toArrayDesign, the last of which reads getTaxonObject(), absent from the reference shape. So this is a serialization projection, not a type change.

    • getOriginalPlatform

      @Nullable public ArrayDesignValueObject getOriginalPlatform()
      The platform this assay was originally run on before a platform switch, or null if it was never switched. Projected to ArrayDesignReferenceValueObject for the same reason as arrayDesign.
    • getProcessingDate

      public Date getProcessingDate()
    • getSample

      public BioMaterialValueObject getSample()
    • getExtractedMolecule

      @Nullable public ExtractedMolecule getExtractedMolecule()
      What was extracted from the sample and assayed — GEO's molecule. Null when the source did not say, and on everything imported before this field existed.

      🛑 The only thing that separates single-NUCLEUS from single-CELL RNA-seq: isSingleCell is true for both, and before this the distinction lived solely as one molecular entity characteristic among a sample's several, with no typed way to ask.

    • getLibrarySelection

      @Nullable public String getLibrarySelection()
      How the library was selected — GEO's library_selection (polyA, cDNA, RANDOM, …), verbatim.

      ⚠️ Read beside extractedMolecule, not instead of it: totalRNA with a polyA selection is common and the two together are the real answer.

    • getLibraryStrategy

      @Nullable public String getLibraryStrategy()
      What kind of library — GEO's library_strategy (RNA-Seq, scRNA-seq, Ribo-Seq, ATAC-seq, …). A string rather than an enum so a strategy nobody anticipated arrives intact instead of needing a schema change.
    • getSequencePairedReads

      public Boolean getSequencePairedReads()
    • getSequenceReadCount

      public Long getSequenceReadCount()
    • getSequenceReadLength

      public Integer getSequenceReadLength()
    • getNumberOfCells

      @Nullable public Integer getNumberOfCells()
    • getNumberOfDesignElements

      @Nullable public Integer getNumberOfDesignElements()
    • getNumberOfCellsByDesignElements

      @Nullable public Integer getNumberOfCellsByDesignElements()
    • isOutlier

      public boolean isOutlier()
    • getPredictedOutlier

      @Nullable public Boolean getPredictedOutlier()
      Whether the median-correlation algorithm flags this assay as a possible outlier.

      Null when it was not computed, which is the default: the calculation loads the dataset's whole sample-correlation matrix, so the sample-listing routes only do it when asked (?includePredictedOutliers=true). Absent therefore means "not computed" and is deliberately distinguishable from false, which means the algorithm ran and did not flag this assay. The curated outlier flag is always populated either way.

    • isUserFlaggedOutlier

      public boolean isUserFlaggedOutlier()
    • getSourceBioAssayId

      @Nullable public Long getSourceBioAssayId()
      If this BioAssay has a parent via BioMaterial.getSourceBioMaterial(), this is the ID.

      This is context-dependent because the parent depends on which BioAssaySet is under consideration. For example, an experiment could have two sets of EE subsets with distinct parents.

    • setShortName

      public void setShortName(@Nullable String shortName)
    • setName

      public void setName(String name)
    • setDescription

      public void setDescription(String description)
    • setMetadata

      public void setMetadata(String metadata)
    • setAccession

      public void setAccession(@Nullable DatabaseEntryValueObject accession)
    • setArrayDesign

      public void setArrayDesign(ArrayDesignValueObject arrayDesign)
      The platform this assay was run on, serialized as ArrayDesignReferenceValueObject — id, shortName, name, technologyType.

      The full platform VO is byte-identical across every assay of a dataset and was serialized once per assay: on GET /datasets/3937/samples (278 assays) the two platform fields were 706,120 of 5,265,852 bytes, 13.4% of the response, most of it 278 copies of one platform's 1.4 kB description. GET /datasets/{id}/platforms?original=true serves the full object once for callers that want the rest of it.

      The Java type stays ArrayDesignValueObject because three in-JVM readers consume it — BioAssayDimensionValueObject, DoubleVectorValueObject and DoubleVectorValueObjectUtils#toArrayDesign, the last of which reads getTaxonObject(), absent from the reference shape. So this is a serialization projection, not a type change.

    • setOriginalPlatform

      public void setOriginalPlatform(@Nullable ArrayDesignValueObject originalPlatform)
      The platform this assay was originally run on before a platform switch, or null if it was never switched. Projected to ArrayDesignReferenceValueObject for the same reason as arrayDesign.
    • setProcessingDate

      public void setProcessingDate(Date processingDate)
    • setSample

      public void setSample(BioMaterialValueObject sample)
    • setExtractedMolecule

      public void setExtractedMolecule(@Nullable ExtractedMolecule extractedMolecule)
      What was extracted from the sample and assayed — GEO's molecule. Null when the source did not say, and on everything imported before this field existed.

      🛑 The only thing that separates single-NUCLEUS from single-CELL RNA-seq: isSingleCell is true for both, and before this the distinction lived solely as one molecular entity characteristic among a sample's several, with no typed way to ask.

    • setLibrarySelection

      public void setLibrarySelection(@Nullable String librarySelection)
      How the library was selected — GEO's library_selection (polyA, cDNA, RANDOM, …), verbatim.

      ⚠️ Read beside extractedMolecule, not instead of it: totalRNA with a polyA selection is common and the two together are the real answer.

    • setLibraryStrategy

      public void setLibraryStrategy(@Nullable String libraryStrategy)
      What kind of library — GEO's library_strategy (RNA-Seq, scRNA-seq, Ribo-Seq, ATAC-seq, …). A string rather than an enum so a strategy nobody anticipated arrives intact instead of needing a schema change.
    • setSequencePairedReads

      public void setSequencePairedReads(Boolean sequencePairedReads)
    • setSequenceReadCount

      public void setSequenceReadCount(Long sequenceReadCount)
    • setSequenceReadLength

      public void setSequenceReadLength(Integer sequenceReadLength)
    • setNumberOfCells

      public void setNumberOfCells(@Nullable Integer numberOfCells)
    • setNumberOfDesignElements

      public void setNumberOfDesignElements(@Nullable Integer numberOfDesignElements)
    • setNumberOfCellsByDesignElements

      public void setNumberOfCellsByDesignElements(@Nullable Integer numberOfCellsByDesignElements)
    • setOutlier

      public void setOutlier(boolean outlier)
    • setPredictedOutlier

      public void setPredictedOutlier(@Nullable Boolean predictedOutlier)
      Whether the median-correlation algorithm flags this assay as a possible outlier.

      Null when it was not computed, which is the default: the calculation loads the dataset's whole sample-correlation matrix, so the sample-listing routes only do it when asked (?includePredictedOutliers=true). Absent therefore means "not computed" and is deliberately distinguishable from false, which means the algorithm ran and did not flag this assay. The curated outlier flag is always populated either way.

    • setUserFlaggedOutlier

      public void setUserFlaggedOutlier(boolean userFlaggedOutlier)
    • setSourceBioAssayId

      public void setSourceBioAssayId(@Nullable Long sourceBioAssayId)
      If this BioAssay has a parent via BioMaterial.getSourceBioMaterial(), this is the ID.

      This is context-dependent because the parent depends on which BioAssaySet is under consideration. For example, an experiment could have two sets of EE subsets with distinct parents.