@vitessce/types 3.4.14 → 3.5.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.
@@ -0,0 +1,42 @@
1
+ export type KgNodeType = 'gene' | 'protein' | 'pathway' | 'cell-type';
2
+ export type TargetModalityType = 'gene' | 'protein';
3
+ export type StratificationType = 'sampleSet' | 'structural-region' | 'structural-presence';
4
+ export type KgNodeReason = ('modality-agnostic' | KgNode);
5
+ export type KgNodeMethod = 'canonical' | 'data-driven';
6
+ export type KgNode = {
7
+ kgId: string;
8
+ nodeType: KgNodeType;
9
+ label: string;
10
+ term?: string;
11
+ altIds?: string[];
12
+ source?: string;
13
+ sourceMethod?: KgNodeMethod;
14
+ sourceVersion?: string;
15
+ reason?: KgNodeReason;
16
+ };
17
+ export type KgEdge = {
18
+ source: string;
19
+ target: string;
20
+ relation: string;
21
+ };
22
+ export type KgStratification = {
23
+ name: string;
24
+ stratificationId: string;
25
+ stratificationType: StratificationType;
26
+ sampleSets?: [
27
+ string[],
28
+ string[]
29
+ ];
30
+ };
31
+ export type AutocompleteFeatureFunc = (partial: string, targetModality: null | TargetModalityType) => Promise<KgNode[]>;
32
+ export type TransformFeatureFunc = (node: KgNode, targetModality: TargetModalityType) => Promise<KgNode[]>;
33
+ export type RelatedFeaturesFunc = (node: KgNode) => Promise<KgNode[]>;
34
+ export type FeatureToUrlFunc = (node: KgNode) => Promise<string>;
35
+ export type FeatureToIntervalFunc = (node: KgNode, assembly: string) => Promise<{
36
+ chr: string;
37
+ start: number;
38
+ end: number;
39
+ }>;
40
+ export type ObsSetToFeaturesFunc = (node: KgNode) => Promise<KgNode[]>;
41
+ export type FeaturesToObsSetFunc = (nodes: KgNode[]) => Promise<KgNode>;
42
+ //# sourceMappingURL=biomarkers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"biomarkers.d.ts","sourceRoot":"","sources":["../src/biomarkers.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,U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AkB,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AAC3G,MAAM,MAAM,mBAAmB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AACtE,MAAM,MAAM,gBAAgB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;AACjE,MAAM,MAAM,qBAAqB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAG7H,MAAM,MAAM,oBAAoB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;AACvE,MAAM,MAAM,oBAAoB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -2,5 +2,6 @@ export type { MatrixResult, ObsFeatureMatrixData, ObsFeatureMatrixAttrs, ObsEmbe
2
2
  export type { DataSourceParams, } from './data-sources.js';
3
3
  export type { AbstractImageWrapper, VivLoaderType, VivLoaderDataType, ImageOptions, ChannelObject, ResolutionObject, BoundingCube, } from './imaging.js';
4
4
  export type { SetsTreeNodeLeaf, SetsTreeNodeNonLeaf, SetsTree, } from './sets.js';
5
+ export type { KgNode, KgNodeType, TargetModalityType, StratificationType, KgNodeReason, KgNodeMethod, KgEdge, KgStratification, AutocompleteFeatureFunc, TransformFeatureFunc, RelatedFeaturesFunc, FeatureToUrlFunc, FeatureToIntervalFunc, ObsSetToFeaturesFunc, FeaturesToObsSetFunc, } from './biomarkers.js';
5
6
  export {};
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,EACpB,SAAS,EACT,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,YAAY,GACb,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,QAAQ,GACT,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,wBAAwB,EACxB,uBAAuB,EACvB,oBAAoB,EACpB,SAAS,EACT,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,YAAY,GACb,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,QAAQ,GACT,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,MAAM,EACN,UAAU,EACV,kBAAkB,EAClB,kBAAkB,EAClB,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,gBAAgB,EAChB,uBAAuB,EACvB,oBAAoB,EACpB,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitessce/types",
3
- "version": "3.4.14",
4
- "author": "Gehlenborg Lab",
3
+ "version": "3.5.1",
4
+ "author": "HIDIVE Lab at HMS",
5
5
  "homepage": "http://vitessce.io",
6
6
  "repository": {
7
7
  "type": "git",
@@ -0,0 +1,74 @@
1
+ /* eslint-disable max-len */
2
+ // Here, "Kg" stands for "knowledge graph"
3
+ export type KgNodeType = 'gene' | 'protein' | 'pathway' | 'cell-type';
4
+ export type TargetModalityType = 'gene' | 'protein'; // TODO: support protein, genomic region, etc.
5
+ export type StratificationType = 'sampleSet' | 'structural-region' | 'structural-presence';
6
+
7
+ // Why was this node included in the list?
8
+ export type KgNodeReason = (
9
+ // The user selected during modality-agnostic selection.
10
+ 'modality-agnostic'
11
+ // The user selected the linked node during modality-agnostic selection.
12
+ // This node may then be modality-specific after some feature
13
+ // transformation to a different modality.
14
+ // eslint-disable-next-line no-use-before-define
15
+ | KgNode
16
+ );
17
+ // Why did the data source include this node?
18
+ // Is the knowledge canonical or data-driven?
19
+ export type KgNodeMethod = 'canonical' | 'data-driven';
20
+ // If this is a node from a suggestion,
21
+ // export type SuggestionReason = 'ligand-receptor' | 'pathway-membership';
22
+ // export type SuggestionSource = string;
23
+
24
+ // A node from a knowledge graph.
25
+ export type KgNode = {
26
+ // ID in the knowledge graph. Not necessarily human-readable.
27
+ kgId: string;
28
+ nodeType: KgNodeType;
29
+
30
+ // Alternate identifiers
31
+ // Human-readable name of the node.
32
+ label: string;
33
+ // Ontology term for this node. Should be a CURIE.
34
+ term?: string;
35
+ // Alternative identifiers like gene symbols or Ensembl IDs, in CURIE string format.
36
+ altIds?: string[];
37
+
38
+ // Provenance info
39
+ // Name of a data source like 'EnrichrKG'.
40
+ source?: string;
41
+ sourceMethod?: KgNodeMethod;
42
+ // Version of the data source.
43
+ sourceVersion?: string;
44
+ // Note: this is a recursive type.
45
+ reason?: KgNodeReason;
46
+ };
47
+
48
+ // Are the edge and stratification types needed here?
49
+ export type KgEdge = {
50
+ source: string;
51
+ target: string;
52
+ relation: string;
53
+ };
54
+
55
+ export type KgStratification = {
56
+ name: string;
57
+ stratificationId: string;
58
+ stratificationType: StratificationType;
59
+ sampleSets?: [
60
+ string[], // Control sampleSet path
61
+ string[], // Case sampleSet path
62
+ ];
63
+ };
64
+
65
+ // Async function types that operate on KgNodes.
66
+ export type AutocompleteFeatureFunc = (partial: string, targetModality: null | TargetModalityType) => Promise<KgNode[]>;
67
+ export type TransformFeatureFunc = (node: KgNode, targetModality: TargetModalityType) => Promise<KgNode[]>;
68
+ export type RelatedFeaturesFunc = (node: KgNode) => Promise<KgNode[]>;
69
+ export type FeatureToUrlFunc = (node: KgNode) => Promise<string>;
70
+ export type FeatureToIntervalFunc = (node: KgNode, assembly: string) => Promise<{ chr: string, start: number, end: number }>;
71
+
72
+ // TODO: should the node types be more precise?
73
+ export type ObsSetToFeaturesFunc = (node: KgNode) => Promise<KgNode[]>;
74
+ export type FeaturesToObsSetFunc = (nodes: KgNode[]) => Promise<KgNode>;
package/src/index.ts CHANGED
@@ -32,6 +32,23 @@ export type {
32
32
  SetsTreeNodeNonLeaf,
33
33
  SetsTree,
34
34
  } from './sets.js';
35
+ export type {
36
+ KgNode,
37
+ KgNodeType,
38
+ TargetModalityType,
39
+ StratificationType,
40
+ KgNodeReason,
41
+ KgNodeMethod,
42
+ KgEdge,
43
+ KgStratification,
44
+ AutocompleteFeatureFunc,
45
+ TransformFeatureFunc,
46
+ RelatedFeaturesFunc,
47
+ FeatureToUrlFunc,
48
+ FeatureToIntervalFunc,
49
+ ObsSetToFeaturesFunc,
50
+ FeaturesToObsSetFunc,
51
+ } from './biomarkers.js';
35
52
 
36
53
  // This is a types-only package.
37
54
  export {};