Class DatasetVisualizationWebService

java.lang.Object
ubic.gemma.rest.DatasetVisualizationWebService

@Service @Path("/datasets") public class DatasetVisualizationWebService extends Object
Dataset visualization endpoints. Carved out of DatasetsWebService (already 4000+ LOC) for the client-side heatmap rewrite. Sits alongside /datasets/{id}/svd and /datasets/{id}/data/processed; ships raw matrix + meta with NO server-side ordering decisions, NO colour assignment, NO legend assembly.

Locked decisions for the session-2 scaffold:

  • Single-EE endpoint (client batches if needed; mirrors /svd).
  • Continuous factors carry their per-sample measurements on the factors[] entry, keyed by bioAssayId.
  • JSON number[][] encoding by default; ?encoding=base64f32 opt-in for large matrices.
  • Diffex requests set rows[].pvalue and rows[].validated; non-diffex requests leave both null.
Author:
claude
  • Constructor Details

    • DatasetVisualizationWebService

      public DatasetVisualizationWebService()
  • Method Details

    • getDatasetHeatmapData

      @GET @GZIP @Path("/{dataset}/heatmap-data") @Produces("application/json") public ResponseDataObject<HeatmapDataValueObject> getDatasetHeatmapData(@PathParam("dataset") DatasetArg<?> datasetArg, @QueryParam("genes") @Nullable String genesCsv, @QueryParam("probes") @Nullable String probesCsv, @QueryParam("resultSet") @Nullable Long resultSetId, @QueryParam("threshold") @Nullable Double threshold, @QueryParam("pcaComponent") @Nullable Integer pcaComponent, @QueryParam("pcaCount") @Nullable Integer pcaCount, @QueryParam("sampleSize") @Nullable Integer sampleSize, @QueryParam("encoding") @DefaultValue("json") String encoding, @QueryParam("subSet") @Nullable Long subSetId, @QueryParam("quantitationType") @Nullable QuantitationTypeArg<?> quantitationTypeArg, @QueryParam("maskOutliers") @DefaultValue("true") boolean maskOutliers)
      Resolve raw matrix + metadata for a client-rendered heatmap. See class-level Javadoc.
      Parameters:
      datasetArg - dataset id or short name; ACL-gated by the standard mechanism.
      genesCsv - CSV of gene IDs (mutually exclusive with the other selection modes; takes precedence over them).
      probesCsv - CSV of probe (composite sequence) IDs.
      resultSetId - differential analysis result-set id; the endpoint returns top hits below threshold.
      threshold - p-value threshold for diffex mode. Default 0.01.
      pcaComponent - PCA component (1-based); the endpoint returns the top-loaded probes for that component.
      pcaCount - how many top-loaded probes per PCA component. Default 20.
      sampleSize - fallback random sample size when no other selection mode is given. Default 20, max 200.
      encoding - "json" (default) or "base64f32".
      subSetId - optional ExpressionExperimentSubSet id; when present, the response is restricted to the subset's sample columns.
      quantitationTypeArg - optional quantitation-type selector (id or name). When omitted the processed QT is used (current behaviour). A non-processed QT is served from its raw vectors and supports the genes / probes selection modes and the random-sample fallback (sampleSize); resultSet / pcaComponent are rejected.
      maskOutliers - when true (default) values for assays flagged as outliers are masked to NaN; when false their stored expression values are returned instead. Always effective for a non-processed quantitationType (raw vectors). For the processed QT it returns whatever is on disk: processed data is currently masked at creation time, so the flag is usually a no-op there today.