@sjcrh/proteinpaint-types 2.99.1-2 → 2.99.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/dataset.ts +15 -23
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.99.1-2",
3
+ "version": "2.99.1",
4
4
  "type": "module",
5
5
  "description": "Shared type definitions between ProteinPaint server and client code",
6
6
  "main": "src/index.ts",
package/src/dataset.ts CHANGED
@@ -580,31 +580,23 @@ export type SingleCellGeneExpressionGdc = {
580
580
  src: 'gdcapi'
581
581
  }
582
582
 
583
- export type SingleCellSamplesNative = {
584
- src: 'native'
585
- /** kept to prevent tsc err */
586
- firstColumnName?: string
587
- /** any columns to be added to sample table. each is a term id */
588
- sampleColumns?: { termid: string }[]
589
- /** used on client but not on ds */
590
- experimentColumns?: { label: string }[]
591
- get?: (q: any) => any
592
- }
593
-
594
- export type SingleCellSamplesGdc = {
595
- src: 'gdcapi'
583
+ export type SingleCellSamples = {
596
584
  /** if missing refer to the samples as 'sample', this provides override e.g. 'case' */
597
585
  /** logic to decide sample table columns (the one shown on singlecell app ui, displaying a table of samples with sc data)
598
- a sample table will always have a sample column, to show sample.sample value
599
- firstColumnName allow to change name of 1st column from "Sample" to different, e.g. "Case" for gdc
600
- the other two properties allow to declare additional columns to be shown in table, that are for display only
601
- when sample.experiments[] are used, a last column of experiment id will be auto added
602
- */
586
+ a sample table will always have a sample column, to show sample.sample value
587
+ firstColumnName allow to change name of 1st column from "Sample" to different, e.g. "Case" for gdc
588
+ the other two properties allow to declare additional columns to be shown in table, that are for display only
589
+ when sample.experiments[] are used, a last column of experiment id will be auto added
590
+ */
603
591
  firstColumnName?: string
604
- /** same as SingleCellSamplesNative */
592
+ /** any columns to be added to sample table. each is a term id */
605
593
  sampleColumns?: { termid: string }[]
606
594
  /** used on client but not on ds */
607
595
  experimentColumns?: { label: string }[]
596
+ /** getter function to return list of samples with single-cell data
597
+ is either ds-supplied, to enclose ds-specific query details (gdc)
598
+ or is missing, to be added at launch with built-in logic (samples are found by looking through singleCell.data.plots[].folder)
599
+ */
608
600
  get?: (q: any) => any
609
601
  }
610
602
 
@@ -683,10 +675,10 @@ export type SingleCellDataNative = {
683
675
 
684
676
  export type SingleCellQuery = {
685
677
  /** methods to identify samples with singlecell data,
686
- this data allows client-side to display a table with these samples for user to choose from
687
- also, sampleView uses this to determine if to invoke the sc plot for a sample
688
- */
689
- samples: SingleCellSamplesGdc | SingleCellSamplesNative
678
+ this data allows client-side to display a table with these samples for user to choose from
679
+ also, sampleView uses this to determine if to invoke the sc plot for a sample
680
+ */
681
+ samples: SingleCellSamples
690
682
  /** defines tsne/umap type of clustering maps for each sample
691
683
  */
692
684
  data: SingleCellDataGdc | SingleCellDataNative