oncoprintjs 5.0.3 → 6.0.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 (100) hide show
  1. package/README.md +34 -0
  2. package/dist/index.d.ts +4 -0
  3. package/dist/index.es.js +14746 -0
  4. package/dist/index.es.js.map +1 -0
  5. package/dist/index.js +14760 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/js/CachedProperty.d.ts +10 -10
  8. package/dist/js/binarysearch.d.ts +1 -1
  9. package/dist/js/bucketsort.d.ts +16 -16
  10. package/dist/js/clustering.d.ts +14 -14
  11. package/dist/js/extractrgba.d.ts +4 -4
  12. package/dist/js/haselementsininterval.d.ts +1 -1
  13. package/dist/js/heatmapcolors.d.ts +5 -4
  14. package/dist/js/makesvgelement.d.ts +1 -1
  15. package/dist/js/modelutils.d.ts +7 -7
  16. package/dist/js/oncoprint.d.ts +168 -170
  17. package/dist/js/oncoprintheaderview.d.ts +23 -22
  18. package/dist/js/oncoprintlabelview.d.ts +79 -78
  19. package/dist/js/oncoprintlegendrenderer.d.ts +32 -31
  20. package/dist/js/oncoprintminimapview.d.ts +69 -68
  21. package/dist/js/oncoprintmodel.d.ts +403 -398
  22. package/dist/js/oncoprintruleset.d.ts +176 -177
  23. package/dist/js/oncoprintshape.d.ts +67 -67
  24. package/dist/js/oncoprintshapetosvg.d.ts +2 -2
  25. package/dist/js/oncoprintshapetovertexes.d.ts +5 -5
  26. package/dist/js/oncoprinttooltip.d.ts +23 -22
  27. package/dist/js/oncoprinttrackinfoview.d.ts +40 -39
  28. package/dist/js/oncoprinttrackoptionsview.d.ts +58 -57
  29. package/dist/js/oncoprintwebglcellview.d.ts +168 -167
  30. package/dist/js/oncoprintzoomslider.d.ts +28 -27
  31. package/dist/js/polyfill.d.ts +4 -4
  32. package/dist/js/precomputedcomparator.d.ts +13 -13
  33. package/dist/js/shaders.d.ts +2 -2
  34. package/dist/js/svgfactory.d.ts +24 -23
  35. package/dist/js/utils.d.ts +16 -16
  36. package/dist/js/workers/clustering-worker.d.ts +19 -20
  37. package/dist/test/gradientCategoricalRuleset.spec.d.ts +1 -1
  38. package/dist/test/monolith.spec.d.ts +1 -1
  39. package/jest.config.ts +2 -0
  40. package/package.json +20 -26
  41. package/rollup.config.ts +14 -0
  42. package/rules/geneticrules.ts +344 -305
  43. package/server.js +11 -0
  44. package/src/img/menudots.svg +9 -9
  45. package/src/img/zoomtofit.svg +12 -12
  46. package/src/index.tsx +13 -0
  47. package/src/js/CachedProperty.ts +6 -7
  48. package/src/js/binarysearch.ts +8 -3
  49. package/src/js/bucketsort.ts +89 -47
  50. package/src/js/clustering.ts +22 -10
  51. package/src/js/extractrgba.ts +16 -12
  52. package/src/js/haselementsininterval.ts +8 -4
  53. package/src/js/heatmapcolors.ts +515 -515
  54. package/src/js/main.js +1 -1
  55. package/src/js/makesvgelement.ts +2 -2
  56. package/src/js/modelutils.ts +11 -8
  57. package/src/js/oncoprint.ts +706 -385
  58. package/src/js/oncoprintheaderview.ts +165 -125
  59. package/src/js/oncoprintlabelview.ts +388 -170
  60. package/src/js/oncoprintlegendrenderer.ts +203 -72
  61. package/src/js/oncoprintminimapview.ts +965 -423
  62. package/src/js/oncoprintmodel.ts +905 -532
  63. package/src/js/oncoprintruleset.ts +694 -379
  64. package/src/js/oncoprintshape.ts +240 -97
  65. package/src/js/oncoprintshapetosvg.ts +77 -26
  66. package/src/js/oncoprintshapetovertexes.ts +153 -48
  67. package/src/js/oncoprinttooltip.ts +58 -27
  68. package/src/js/oncoprinttrackinfoview.ts +115 -59
  69. package/src/js/oncoprinttrackoptionsview.ts +354 -187
  70. package/src/js/oncoprintwebglcellview.ts +951 -415
  71. package/src/js/oncoprintzoomslider.ts +172 -107
  72. package/src/js/polyfill.ts +7 -3
  73. package/src/js/precomputedcomparator.ts +133 -50
  74. package/src/js/shaders.ts +2 -4
  75. package/src/js/svgfactory.ts +128 -73
  76. package/src/js/utils.ts +51 -31
  77. package/src/js/workers/clustering-worker.ts +50 -42
  78. package/src/test/gradientCategoricalRuleset.spec.ts +55 -38
  79. package/src/test/monolith.spec.ts +718 -285
  80. package/test/generate_data.py +108 -0
  81. package/test/glyphmap-data.js +1041 -0
  82. package/test/heatmap-data.js +1027 -0
  83. package/test/index.html +21 -0
  84. package/test/oncoprint-glyphmap.js +79 -0
  85. package/test/oncoprint-heatmap.js +123 -0
  86. package/tsconfig.json +4 -10
  87. package/tsconfig.test.json +11 -0
  88. package/.idea/misc.xml +0 -6
  89. package/.idea/modules.xml +0 -8
  90. package/.idea/oncoprintjs.iml +0 -12
  91. package/.idea/vcs.xml +0 -6
  92. package/.idea/workspace.xml +0 -105
  93. package/dist/.gitkeep +0 -0
  94. package/dist/js/minimaputils.d.ts +0 -0
  95. package/dist/oncoprint.bundle.js +0 -44313
  96. package/jest.config.js +0 -12
  97. package/src/js/minimaputils.ts +0 -0
  98. package/typings/custom.d.ts +0 -7
  99. package/typings/missing.d.ts +0 -7
  100. package/webpack.config.js +0 -43
@@ -1,16 +1,16 @@
1
- import { ComputedShapeParams } from "./oncoprintshape";
2
- import { RGBAColor } from "./oncoprintruleset";
3
- export declare type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
4
- export declare function cloneShallow<T extends Object>(obj: T): T;
5
- export declare function extendArray(target: any[], source: any[]): void;
6
- export declare function doesCellIntersectPixel(cellHitzone: [number, number], pixelX: number): boolean;
7
- export declare function ifndef<T>(x: T | undefined, val: T): T;
8
- export declare function shallowExtend<T extends Object, S extends Object>(target: T, source: S): T & S;
9
- export declare function objectValues<T extends Object>(obj: T): (T[keyof T][]);
10
- export declare function arrayFindIndex<T>(arr: T[], predicate: (t: T) => boolean, start_index?: number): number;
11
- export declare function sgndiff(a: number, b: number): 0 | 1 | -1;
12
- export declare function clamp(x: number, lower: number, upper: number): number;
13
- export declare function z_comparator(shapeA: ComputedShapeParams, shapeB: ComputedShapeParams): 0 | 1 | -1;
14
- export declare function fastParseInt10(x: string, substringStart?: number, substringEnd?: number): number;
15
- export declare function fastParseInt16(x: string): number;
16
- export declare function rgbString(color: RGBAColor): string;
1
+ import { ComputedShapeParams } from './oncoprintshape';
2
+ import { RGBAColor } from './oncoprintruleset';
3
+ export declare type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
4
+ export declare function cloneShallow<T extends Object>(obj: T): T;
5
+ export declare function extendArray(target: any[], source: any[]): void;
6
+ export declare function doesCellIntersectPixel(cellHitzone: [number, number], pixelX: number): boolean;
7
+ export declare function ifndef<T>(x: T | undefined, val: T): T;
8
+ export declare function shallowExtend<T extends Object, S extends Object>(target: T, source: S): T & S;
9
+ export declare function objectValues<T extends Object>(obj: T): T[keyof T][];
10
+ export declare function arrayFindIndex<T>(arr: T[], predicate: (t: T) => boolean, start_index?: number): number;
11
+ export declare function sgndiff(a: number, b: number): 0 | 1 | -1;
12
+ export declare function clamp(x: number, lower: number, upper: number): number;
13
+ export declare function z_comparator(shapeA: ComputedShapeParams, shapeB: ComputedShapeParams): 0 | 1 | -1;
14
+ export declare function fastParseInt10(x: string, substringStart?: number, substringEnd?: number): number;
15
+ export declare function fastParseInt16(x: string): number;
16
+ export declare function rgbString(color: RGBAColor): string;
@@ -1,20 +1,19 @@
1
- declare type Item = {
2
- orderedValueList: number[];
3
- };
4
- export declare type EntityItem = Item & {
5
- entityId: string;
6
- };
7
- export declare type CaseItem = Item & {
8
- caseId: string;
9
- };
10
- export declare type CasesAndEntities = {
11
- [caseId: string]: {
12
- [entityId: string]: number;
13
- };
14
- };
15
- export declare type ClusteringMessage = {
16
- dimension: "CASES" | "ENTITIES";
17
- casesAndEntities: CasesAndEntities;
18
- };
19
- declare const _default: any;
20
- export default _default;
1
+ declare type Item = {
2
+ orderedValueList: number[];
3
+ };
4
+ export declare type EntityItem = Item & {
5
+ entityId: string;
6
+ };
7
+ export declare type CaseItem = Item & {
8
+ caseId: string;
9
+ };
10
+ export declare type CasesAndEntities = {
11
+ [caseId: string]: {
12
+ [entityId: string]: number;
13
+ };
14
+ };
15
+ export declare type ClusteringMessage = {
16
+ dimension: 'CASES' | 'ENTITIES';
17
+ casesAndEntities: CasesAndEntities;
18
+ };
19
+ export {};
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1 +1 @@
1
- export {};
1
+ export {};
package/jest.config.ts ADDED
@@ -0,0 +1,2 @@
1
+ import config from '../config/jest.config';
2
+ export default config;
package/package.json CHANGED
@@ -1,14 +1,23 @@
1
1
  {
2
2
  "name": "oncoprintjs",
3
- "version": "v5.0.3",
3
+ "version": "6.0.1",
4
4
  "description": "A data visualization for cancer genomic data.",
5
5
  "types": "./dist/js/oncoprint.d.ts",
6
- "main": "./dist/oncoprint.bundle.js",
6
+ "main": "dist/index.js",
7
+ "module": "dist/index.es.js",
8
+ "jsnext:main": "dist/index.es.js",
9
+ "typings": "dist/index.d.ts",
10
+ "styles": "dist/styles.css",
7
11
  "scripts": {
8
- "build": "rm -rf ./dist/* && webpack",
9
- "build-dev": "yarn build --env.DEV=true",
10
- "test": "jest",
11
- "test:watch": "npm run test -- --watch"
12
+ "build": "cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=2048 yarn run rollup",
13
+ "start": "yarn run watch",
14
+ "watch": "yarn run rollup:watch",
15
+ "watchSSL": "yarn run watch",
16
+ "rollup": "rollup -c rollup.config.ts",
17
+ "rollup:watch": "rollup -c rollup.config.ts -w",
18
+ "prepare": "yarn run build",
19
+ "test": "cross-env jest $GREP --env=jsdom --runInBand --ci --reporters=default --reporters=jest-junit --passWithNoTests",
20
+ "test:watch": "yarn run test --watch"
12
21
  },
13
22
  "repository": {
14
23
  "type": "git",
@@ -43,28 +52,13 @@
43
52
  "url": "https://github.com/cBioPortal/oncoprintjs/issues"
44
53
  },
45
54
  "homepage": "https://github.com/cBioPortal/oncoprintjs",
46
- "devDependencies": {
47
- "@types/chai": "^4.2.3",
48
- "@types/jquery": "^3.3.31",
49
- "@types/lodash": "^4.14.139",
50
- "@types/mocha": "^5.2.7",
51
- "chai": "^4.1.2",
52
- "jest": "^24.9.0",
53
- "mocha": "^5.0.5",
54
- "ts-jest": "^24.1.0",
55
- "ts-loader": "5.4.5",
56
- "typescript": "^3.6.3",
57
- "url-loader": "^1.1.1",
58
- "webpack": "^4.0.0",
59
- "webpack-cli": "^3.3.9",
60
- "webpack-shell-plugin": "^0.5.0",
61
- "worker-loader": "^1.1.0"
62
- },
63
55
  "dependencies": {
64
56
  "gl-matrix": "2.3.2",
65
- "jquery": "^3.0.0",
57
+ "jquery": "^3.2.1",
66
58
  "jstat": "^1.7.1",
67
59
  "lodash": "^4.17.15",
68
- "tayden-clusterfck": "^0.7.0"
69
- }
60
+ "tayden-clusterfck": "^0.7.0",
61
+ "typescript": "4.0.3"
62
+ },
63
+ "gitHead": "f4d4f999c480f95b907d4c37947f421f16edb4f5"
70
64
  }
@@ -0,0 +1,14 @@
1
+ import getRollupOptions from '../config/rollup.config';
2
+ import pkg from './package.json';
3
+
4
+ export default getRollupOptions(
5
+ 'src/index.tsx',
6
+ pkg.main,
7
+ pkg.module,
8
+ pkg.styles,
9
+ // we need to bundle these packages, because these are imported in web workers
10
+ // otherwise web workers cannot find these packages in runtime
11
+ {
12
+ exclude: ['tayden-clusterfck', 'jstat'],
13
+ }
14
+ );