visualifyjs 2.5.3-2.dev → 2.5.3-9-dev
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of visualifyjs might be problematic. Click here for more details.
- package/.github/workflows/{static.yml.bak → build.yaml} +51 -51
- package/LICENSE +674 -674
- package/README.md +40 -58
- package/config-overrides.js +31 -31
- package/dist/visualify.js +3 -3
- package/docs/CLI.md +15 -0
- package/docs/{docs/README.md → README.md} +41 -65
- package/docs/{docs/Rechart → Rechart}/bar.md +190 -190
- package/docs/{docs/Rechart → Rechart}/funnel.md +193 -241
- package/docs/{docs/Rechart → Rechart}/line.md +355 -355
- package/docs/{docs/Rechart → Rechart}/pie.md +225 -225
- package/docs/{docs/Rechart → Rechart}/radar.md +253 -253
- package/docs/{docs/_404.md → _404.md} +51 -51
- package/docs/{docs/_coverpage.md → _coverpage.md} +11 -11
- package/docs/{docs/_sidebar.md → _sidebar.md} +42 -44
- package/docs/{docs/components → components}/dotBio.md +34 -34
- package/docs/{docs/components → components}/echart.md +82 -82
- package/docs/{docs/components → components}/html.md +34 -34
- package/docs/{docs/components → components}/macaron.md +145 -145
- package/docs/components/markdown.md +0 -0
- package/docs/{docs/components → components}/more.md +142 -142
- package/docs/{docs/components → components}/plotly.md +62 -62
- package/docs/{docs/components → components}/scatterL.md +70 -70
- package/docs/{docs/components → components}/visium.md +56 -56
- package/docs/{docs/configuration.md → configuration.md} +123 -121
- package/docs/{docs/deploy.md → deploy.md} +23 -31
- package/docs/index.html +70 -70
- package/docs/log.md +1 -0
- package/docs/manifest.json +23 -23
- package/docs/{docs/more-pages.md → more-pages.md} +23 -23
- package/docs/{docs/quickstart.md → quickstart.md} +115 -124
- package/docs/{docs/rechart-attributes.md → rechart-attributes.md} +74 -74
- package/docs/{docs/rechart-basic-usage.md → rechart-basic-usage.md} +162 -162
- package/docs/static/css/fluff-stuff.css +169 -169
- package/docs/static/css/font-awesome.min.css +4 -4
- package/docs/static/css/visualify.css +25 -25
- package/docs/static/js/configuration.js +448 -448
- package/docs/static/js/visualify.js +24 -23
- package/docs/theme.md +3 -0
- package/package.json +74 -83
- package/rollup.config.mjs +75 -75
- package/src/_css/404.css +115 -115
- package/src/_css/App.css +37 -37
- package/src/_css/autoSuggestion.css +26 -26
- package/src/_css/circular-progress.css +32 -32
- package/src/_css/index.css +36 -36
- package/src/_css/modern.css +24 -24
- package/src/_media/corner.svg +8 -8
- package/src/_media/download.svg +3 -3
- package/src/_media/logo.svg +14 -14
- package/src/_test/App.test.js +15 -15
- package/src/_utils/reportWebVitals.js +13 -13
- package/src/core/appContext.js +27 -27
- package/src/core/components/Scatter.js +188 -188
- package/src/core/components/ScatterBio.js +572 -572
- package/src/core/components/VisiumPlot.js +165 -165
- package/src/core/components/browser.js +42 -42
- package/src/core/components/dotplot.js +413 -413
- package/src/core/components/html.js +29 -29
- package/src/core/components/list.js +178 -178
- package/src/core/components/macaron.js +201 -201
- package/src/core/components/markdown.js +56 -56
- package/src/core/components/parser.scatterBio.js +579 -587
- package/src/core/components/ratio.js +80 -80
- package/src/core/components/scatterL.js +173 -173
- package/src/core/components/searchbar.js +131 -131
- package/src/core/components/selection.js +193 -193
- package/src/core/components/timeline.js +281 -281
- package/src/core/components/visium.js +97 -97
- package/src/core/fetch/condfetch.js +82 -82
- package/src/core/fetch/fetch.js +92 -92
- package/src/core/fetch/json.js +29 -29
- package/src/core/fetch/vfetch.js +42 -42
- package/src/core/liveEditor.js +44 -44
- package/src/core/modules/codeEditorWithPreview.js +104 -104
- package/src/core/modules/echarts/common.js +20 -20
- package/src/core/modules/echarts/presetHandler.js +41 -41
- package/src/core/modules/echarts/presets/esodev.chromium.js +172 -172
- package/src/core/modules/echarts/presets/esodev.codex.js +130 -130
- package/src/core/modules/echarts/presets/esodev.visium.js +123 -123
- package/src/core/modules/echarts/presets/mmtrbc.js +186 -186
- package/src/core/modules/echarts.js +71 -71
- package/src/core/modules/echartsUtils.js +43 -43
- package/src/core/modules/echartswitcher.js +152 -152
- package/src/core/modules/replotly/presetHandler.js +24 -24
- package/src/core/modules/replotly/presets/minimum.js +18 -18
- package/src/core/modules/replotly/presets/mmtrbc.dot.js +114 -114
- package/src/core/modules/replotly/presets/mmtrbc.violin.js +100 -100
- package/src/core/modules/replotly.js +71 -71
- package/src/core/pages/404.js +50 -50
- package/src/core/pages/error.js +27 -27
- package/src/core/pages/jsonPage.js +62 -62
- package/src/core/pages/loading.js +44 -44
- package/src/core/parser/echart.data.js +183 -183
- package/src/core/parser/echart.features.js +125 -125
- package/src/core/parser/echart.general.js +143 -147
- package/src/core/parser/echart.hilbert.js +57 -57
- package/src/core/parser/echart.parser.js +210 -210
- package/src/core/parser/echart.series.js +67 -67
- package/src/core/parser/echart.types.js +76 -76
- package/src/core/parser/plotly.config.js +10 -10
- package/src/core/parser/plotly.data.js +132 -132
- package/src/core/parser/plotly.layout.js +9 -9
- package/src/core/parser/plotly.violin.js +18 -18
- package/src/core/recharts.js +62 -62
- package/src/core/router/alias.js +49 -49
- package/src/core/router/jsonRouter.js +31 -31
- package/src/core/themes/modern.js +32 -32
- package/src/core/themes/themeSelector.js +33 -33
- package/src/core/visualify.js +47 -47
- package/src/core/widgets/circularProgress.js +23 -23
- package/src/core/widgets/controller.js +83 -83
- package/src/core/widgets/errorBoundary.js +36 -36
- package/src/core/widgets/footer.js +177 -177
- package/src/core/widgets/header.js +234 -234
- package/src/core/widgets/layout/Grid.js +31 -31
- package/src/core/widgets/layout.js +36 -36
- package/src/core/widgets/mapping.js +42 -42
- package/src/index.js +62 -62
- package/src/setupTests.js +5 -5
- package/docs/docs/CLI.md +0 -34
- package/docs/docs/Rechart/scatter.md +0 -298
- package/docs/docs/log.md +0 -9
- package/docs/docs/static/logo/favicon.ico +0 -0
- package/docs/docs/static/logo/logo_128x128.png +0 -0
- package/docs/docs/static/logo/logo_192x192.png +0 -0
- package/docs/docs/static/logo/logo_256x256.png +0 -0
- package/docs/docs/static/logo/logo_512x512.png +0 -0
- package/docs/docs/static/logo/logo_64x64.png +0 -0
- package/docs/docs/theme.md +0 -5
- /package/docs/{docs/Rechart → Rechart}/geo.md +0 -0
- /package/docs/{docs/Rechart → Rechart}/liquidfill.md +0 -0
- /package/docs/{docs/Rechart → Rechart}/polar.md +0 -0
- /package/docs/{docs/Rechart → Rechart}/sankey.md +0 -0
- /package/docs/{docs/Rechart/sunburst.md → Rechart/scatter.md} +0 -0
- /package/docs/{docs/Rechart/tree.md → Rechart/sunburst.md} +0 -0
- /package/docs/{docs/Rechart/wordcloud.md → Rechart/tree.md} +0 -0
- /package/docs/{docs/components/markdown.md → Rechart/wordcloud.md} +0 -0
- /package/docs/{docs/static → static}/_images/deploy-github-pages.png +0 -0
@@ -1,123 +1,123 @@
|
|
1
|
-
const esodev_visium = {
|
2
|
-
title: {
|
3
|
-
textStyle: {
|
4
|
-
fontSize: 20,
|
5
|
-
},
|
6
|
-
left: 'center',
|
7
|
-
top: 0,
|
8
|
-
},
|
9
|
-
animation: false,
|
10
|
-
legend: {
|
11
|
-
show: false,
|
12
|
-
},
|
13
|
-
xAxis: {
|
14
|
-
show: false,
|
15
|
-
},
|
16
|
-
yAxis: {
|
17
|
-
show: false,
|
18
|
-
},
|
19
|
-
series: [],
|
20
|
-
grid: {
|
21
|
-
top: '15%',
|
22
|
-
bottom: '12%',
|
23
|
-
left: '5%',
|
24
|
-
right: '10%',
|
25
|
-
},
|
26
|
-
// ... other default settings for charts
|
27
|
-
toolbox: {
|
28
|
-
feature: {
|
29
|
-
saveAsImage: {
|
30
|
-
show: true,
|
31
|
-
icon: `path://M30 20.75c-0.69 0.001-1.249 0.56-1.25 1.25v6.75h-25.5v-6.75c0-0.69-0.56-1.25-1.25-1.25s-1.25 0.56-1.25 1.25v0 8c0 0.69 0.56 1.25 1.25 1.25h28c0.69-0.001 1.249-0.56 1.25-1.25v-8c-0.001-0.69-0.56-1.249-1.25-1.25h-0zM15.116 24.885c0.012 0.012 0.029 0.016 0.041 0.027 0.103 0.099 0.223 0.18 0.356 0.239l0.008 0.003 0.001 0c0.141 0.060 0.306 0.095 0.478 0.095 0.345 0 0.657-0.139 0.883-0.365l5.001-5c0.226-0.226 0.366-0.539 0.366-0.884 0-0.691-0.56-1.251-1.251-1.251-0.345 0-0.658 0.14-0.884 0.366l-2.865 2.867v-18.982c0-0.69-0.56-1.25-1.25-1.25s-1.25 0.56-1.25 1.25v0 18.981l-2.866-2.866c-0.226-0.226-0.539-0.366-0.884-0.366-0.691 0-1.251 0.56-1.251 1.251 0 0.346 0.14 0.658 0.367 0.885v0z`,
|
32
|
-
},
|
33
|
-
},
|
34
|
-
},
|
35
|
-
dataZoom: [],
|
36
|
-
visualMap: {
|
37
|
-
min: 0,
|
38
|
-
max: 10,
|
39
|
-
dimension: 2,
|
40
|
-
orient: 'horizontal',
|
41
|
-
top: 'bottom',
|
42
|
-
right: 'center',
|
43
|
-
text: ['log2\n(tpm+1)', ''],
|
44
|
-
textGap: 10,
|
45
|
-
calculable: true,
|
46
|
-
inRange: {
|
47
|
-
color: ['#808080', '#FFA500', '#FF0000'],
|
48
|
-
},
|
49
|
-
textStyle: {
|
50
|
-
writingMode: 'vertical-lr',
|
51
|
-
},
|
52
|
-
},
|
53
|
-
tooltip: {
|
54
|
-
trigger: 'item',
|
55
|
-
axisPointer: {
|
56
|
-
type: 'cross',
|
57
|
-
},
|
58
|
-
formatter: (params) => {
|
59
|
-
let resultHtml = '';
|
60
|
-
for (const [key, value] of Object.entries(params.data)) {
|
61
|
-
if (key === 'Expression') {
|
62
|
-
continue;
|
63
|
-
}
|
64
|
-
if (value > 0.5) {
|
65
|
-
// Only show the cell type with likelihood >= 0.5
|
66
|
-
resultHtml += `<br>${key}: ${value.toFixed(3)}`;
|
67
|
-
}
|
68
|
-
}
|
69
|
-
return `
|
70
|
-
<div style="text-align: center;">
|
71
|
-
${params.name}
|
72
|
-
<br> Cell2Location Cell Type Likelihood
|
73
|
-
<br> (Likelihood >= 0.5)
|
74
|
-
${resultHtml}
|
75
|
-
</div>
|
76
|
-
`;
|
77
|
-
},
|
78
|
-
},
|
79
|
-
visualify: {
|
80
|
-
mapping: {
|
81
|
-
x: 'X_Coord',
|
82
|
-
y: 'Y_Coord',
|
83
|
-
extra: {
|
84
|
-
BC: 'BC',
|
85
|
-
'SB-1': 'SB-1',
|
86
|
-
'SB-2': 'SB-2',
|
87
|
-
'SB-3': 'SB-3',
|
88
|
-
'SB-4': 'SB-4',
|
89
|
-
'SB-5': 'SB-5',
|
90
|
-
'Cil-1': 'Cil-1',
|
91
|
-
'Cil-2': 'Cil-2',
|
92
|
-
'Cy.Epi': 'Cy.Epi',
|
93
|
-
Fib_PG: 'Fib_PG',
|
94
|
-
Fib_1: 'Fib_1',
|
95
|
-
Fib_2: 'Fib_2',
|
96
|
-
Fib_3: 'Fib_3',
|
97
|
-
Fib_4: 'Fib_4',
|
98
|
-
Fib_5: 'Fib_5',
|
99
|
-
MF: 'MF',
|
100
|
-
Fib_ICC: 'Fib_ICC',
|
101
|
-
'Cy.Fib': 'Cy.Fib',
|
102
|
-
ENS_PG: 'ENS_PG',
|
103
|
-
Neu: 'Neu',
|
104
|
-
Glia: 'Glia',
|
105
|
-
'Cy.ENS': 'Cy.ENS',
|
106
|
-
Ven: 'Ven',
|
107
|
-
Art: 'Art',
|
108
|
-
Lym: 'Lym',
|
109
|
-
Peri: 'Peri',
|
110
|
-
'Cy.Peri': 'Cy.Peri',
|
111
|
-
SM: 'SM',
|
112
|
-
'Cy.SM': 'Cy.SM',
|
113
|
-
MS: 'MS',
|
114
|
-
SkM: 'SkM',
|
115
|
-
},
|
116
|
-
},
|
117
|
-
merger: {},
|
118
|
-
symbolSize: 2,
|
119
|
-
symbol: 'circle',
|
120
|
-
},
|
121
|
-
};
|
122
|
-
|
123
|
-
export default esodev_visium;
|
1
|
+
const esodev_visium = {
|
2
|
+
title: {
|
3
|
+
textStyle: {
|
4
|
+
fontSize: 20,
|
5
|
+
},
|
6
|
+
left: 'center',
|
7
|
+
top: 0,
|
8
|
+
},
|
9
|
+
animation: false,
|
10
|
+
legend: {
|
11
|
+
show: false,
|
12
|
+
},
|
13
|
+
xAxis: {
|
14
|
+
show: false,
|
15
|
+
},
|
16
|
+
yAxis: {
|
17
|
+
show: false,
|
18
|
+
},
|
19
|
+
series: [],
|
20
|
+
grid: {
|
21
|
+
top: '15%',
|
22
|
+
bottom: '12%',
|
23
|
+
left: '5%',
|
24
|
+
right: '10%',
|
25
|
+
},
|
26
|
+
// ... other default settings for charts
|
27
|
+
toolbox: {
|
28
|
+
feature: {
|
29
|
+
saveAsImage: {
|
30
|
+
show: true,
|
31
|
+
icon: `path://M30 20.75c-0.69 0.001-1.249 0.56-1.25 1.25v6.75h-25.5v-6.75c0-0.69-0.56-1.25-1.25-1.25s-1.25 0.56-1.25 1.25v0 8c0 0.69 0.56 1.25 1.25 1.25h28c0.69-0.001 1.249-0.56 1.25-1.25v-8c-0.001-0.69-0.56-1.249-1.25-1.25h-0zM15.116 24.885c0.012 0.012 0.029 0.016 0.041 0.027 0.103 0.099 0.223 0.18 0.356 0.239l0.008 0.003 0.001 0c0.141 0.060 0.306 0.095 0.478 0.095 0.345 0 0.657-0.139 0.883-0.365l5.001-5c0.226-0.226 0.366-0.539 0.366-0.884 0-0.691-0.56-1.251-1.251-1.251-0.345 0-0.658 0.14-0.884 0.366l-2.865 2.867v-18.982c0-0.69-0.56-1.25-1.25-1.25s-1.25 0.56-1.25 1.25v0 18.981l-2.866-2.866c-0.226-0.226-0.539-0.366-0.884-0.366-0.691 0-1.251 0.56-1.251 1.251 0 0.346 0.14 0.658 0.367 0.885v0z`,
|
32
|
+
},
|
33
|
+
},
|
34
|
+
},
|
35
|
+
dataZoom: [],
|
36
|
+
visualMap: {
|
37
|
+
min: 0,
|
38
|
+
max: 10,
|
39
|
+
dimension: 2,
|
40
|
+
orient: 'horizontal',
|
41
|
+
top: 'bottom',
|
42
|
+
right: 'center',
|
43
|
+
text: ['log2\n(tpm+1)', ''],
|
44
|
+
textGap: 10,
|
45
|
+
calculable: true,
|
46
|
+
inRange: {
|
47
|
+
color: ['#808080', '#FFA500', '#FF0000'],
|
48
|
+
},
|
49
|
+
textStyle: {
|
50
|
+
writingMode: 'vertical-lr',
|
51
|
+
},
|
52
|
+
},
|
53
|
+
tooltip: {
|
54
|
+
trigger: 'item',
|
55
|
+
axisPointer: {
|
56
|
+
type: 'cross',
|
57
|
+
},
|
58
|
+
formatter: (params) => {
|
59
|
+
let resultHtml = '';
|
60
|
+
for (const [key, value] of Object.entries(params.data)) {
|
61
|
+
if (key === 'Expression') {
|
62
|
+
continue;
|
63
|
+
}
|
64
|
+
if (value > 0.5) {
|
65
|
+
// Only show the cell type with likelihood >= 0.5
|
66
|
+
resultHtml += `<br>${key}: ${value.toFixed(3)}`;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
return `
|
70
|
+
<div style="text-align: center;">
|
71
|
+
${params.name}
|
72
|
+
<br> Cell2Location Cell Type Likelihood
|
73
|
+
<br> (Likelihood >= 0.5)
|
74
|
+
${resultHtml}
|
75
|
+
</div>
|
76
|
+
`;
|
77
|
+
},
|
78
|
+
},
|
79
|
+
visualify: {
|
80
|
+
mapping: {
|
81
|
+
x: 'X_Coord',
|
82
|
+
y: 'Y_Coord',
|
83
|
+
extra: {
|
84
|
+
BC: 'BC',
|
85
|
+
'SB-1': 'SB-1',
|
86
|
+
'SB-2': 'SB-2',
|
87
|
+
'SB-3': 'SB-3',
|
88
|
+
'SB-4': 'SB-4',
|
89
|
+
'SB-5': 'SB-5',
|
90
|
+
'Cil-1': 'Cil-1',
|
91
|
+
'Cil-2': 'Cil-2',
|
92
|
+
'Cy.Epi': 'Cy.Epi',
|
93
|
+
Fib_PG: 'Fib_PG',
|
94
|
+
Fib_1: 'Fib_1',
|
95
|
+
Fib_2: 'Fib_2',
|
96
|
+
Fib_3: 'Fib_3',
|
97
|
+
Fib_4: 'Fib_4',
|
98
|
+
Fib_5: 'Fib_5',
|
99
|
+
MF: 'MF',
|
100
|
+
Fib_ICC: 'Fib_ICC',
|
101
|
+
'Cy.Fib': 'Cy.Fib',
|
102
|
+
ENS_PG: 'ENS_PG',
|
103
|
+
Neu: 'Neu',
|
104
|
+
Glia: 'Glia',
|
105
|
+
'Cy.ENS': 'Cy.ENS',
|
106
|
+
Ven: 'Ven',
|
107
|
+
Art: 'Art',
|
108
|
+
Lym: 'Lym',
|
109
|
+
Peri: 'Peri',
|
110
|
+
'Cy.Peri': 'Cy.Peri',
|
111
|
+
SM: 'SM',
|
112
|
+
'Cy.SM': 'Cy.SM',
|
113
|
+
MS: 'MS',
|
114
|
+
SkM: 'SkM',
|
115
|
+
},
|
116
|
+
},
|
117
|
+
merger: {},
|
118
|
+
symbolSize: 2,
|
119
|
+
symbol: 'circle',
|
120
|
+
},
|
121
|
+
};
|
122
|
+
|
123
|
+
export default esodev_visium;
|
@@ -1,186 +1,186 @@
|
|
1
|
-
/*
|
2
|
-
* @Author : Lihao leolihao@arizona.edu
|
3
|
-
* @Date : 2023-12-22 22:37:23
|
4
|
-
* @FilePath : /visualifyjs/src/core/modules/echarts/presets/mmtrbc.js
|
5
|
-
* @Description :
|
6
|
-
* Copyright (c) 2023 by Lihao (leolihao@arizona.edu), All Rights Reserved.
|
7
|
-
*/
|
8
|
-
const mmtrbc = {
|
9
|
-
title: {
|
10
|
-
text: 'MmTrBC Preset',
|
11
|
-
textStyle: {
|
12
|
-
fontFamily: 'Arial, sans-serif',
|
13
|
-
fontSize: 24,
|
14
|
-
color: 'black',
|
15
|
-
margin: '0 0 20px 0',
|
16
|
-
},
|
17
|
-
left: 'center',
|
18
|
-
top: 0,
|
19
|
-
},
|
20
|
-
tooltip: {
|
21
|
-
trigger: 'item',
|
22
|
-
axisPointer: {
|
23
|
-
type: 'cross',
|
24
|
-
},
|
25
|
-
formatter: (params) => {
|
26
|
-
let express = params.data.value[2];
|
27
|
-
let round_epxress = express
|
28
|
-
? Math.round(express * 10000) / 10000
|
29
|
-
: 0;
|
30
|
-
|
31
|
-
let round = (num, n = 2) =>
|
32
|
-
Math.round(num * Math.pow(10, n)) / Math.pow(10, n);
|
33
|
-
|
34
|
-
return ` ${params.data.Cell_ID} <br/>
|
35
|
-
Type: ${params.seriesName} <br/>
|
36
|
-
UMI: ${params.data.UMI ?? 'not found'} <br/>
|
37
|
-
FMT: ${round(params.data.Frac_MT, 5) ?? 'not found'} <br/>
|
38
|
-
${express !== undefined ? 'Expression: ' + round_epxress : ''} `;
|
39
|
-
},
|
40
|
-
},
|
41
|
-
legend: {
|
42
|
-
top: 30,
|
43
|
-
textStyle: {
|
44
|
-
fontFamily: 'Arial, sans-serif',
|
45
|
-
fontSize: 18,
|
46
|
-
},
|
47
|
-
type: 'scroll',
|
48
|
-
orient: 'horizontal',
|
49
|
-
right: 'center',
|
50
|
-
width: '80%',
|
51
|
-
},
|
52
|
-
xAxis: {
|
53
|
-
name: 'TSNE-2',
|
54
|
-
type: 'value',
|
55
|
-
axisLabel: false,
|
56
|
-
nameGap: 10,
|
57
|
-
nameLocation: 'middle',
|
58
|
-
axisTick: false,
|
59
|
-
splitLine: false,
|
60
|
-
nameTextStyle: {
|
61
|
-
fontSize: '18',
|
62
|
-
fontWeight: 'bold',
|
63
|
-
},
|
64
|
-
},
|
65
|
-
yAxis: {
|
66
|
-
name: 'TSNE-1',
|
67
|
-
type: 'value',
|
68
|
-
axisLabel: false,
|
69
|
-
nameGap: 10,
|
70
|
-
nameLocation: 'middle',
|
71
|
-
axisTick: false,
|
72
|
-
splitLine: false,
|
73
|
-
nameTextStyle: {
|
74
|
-
fontSize: '18',
|
75
|
-
fontWeight: 'bold',
|
76
|
-
},
|
77
|
-
},
|
78
|
-
series: [],
|
79
|
-
grid: {
|
80
|
-
containLabel: true,
|
81
|
-
left: '5%',
|
82
|
-
right: '13%',
|
83
|
-
top: '13%',
|
84
|
-
bottom: '13%',
|
85
|
-
},
|
86
|
-
// ... other default settings for charts
|
87
|
-
toolbox: {
|
88
|
-
feature: {
|
89
|
-
saveAsImage: {
|
90
|
-
show: true,
|
91
|
-
icon: `path://M30 20.75c-0.69 0.001-1.249 0.56-1.25 1.25v6.75h-25.5v-6.75c0-0.69-0.56-1.25-1.25-1.25s-1.25 0.56-1.25 1.25v0 8c0 0.69 0.56 1.25 1.25 1.25h28c0.69-0.001 1.249-0.56 1.25-1.25v-8c-0.001-0.69-0.56-1.249-1.25-1.25h-0zM15.116 24.885c0.012 0.012 0.029 0.016 0.041 0.027 0.103 0.099 0.223 0.18 0.356 0.239l0.008 0.003 0.001 0c0.141 0.060 0.306 0.095 0.478 0.095 0.345 0 0.657-0.139 0.883-0.365l5.001-5c0.226-0.226 0.366-0.539 0.366-0.884 0-0.691-0.56-1.251-1.251-1.251-0.345 0-0.658 0.14-0.884 0.366l-2.865 2.867v-18.982c0-0.69-0.56-1.25-1.25-1.25s-1.25 0.56-1.25 1.25v0 18.981l-2.866-2.866c-0.226-0.226-0.539-0.366-0.884-0.366-0.691 0-1.251 0.56-1.251 1.251 0 0.346 0.14 0.658 0.367 0.885v0z`,
|
92
|
-
},
|
93
|
-
},
|
94
|
-
},
|
95
|
-
dataZoom: [
|
96
|
-
{ type: 'inside', xAxisIndex: 0 },
|
97
|
-
{ type: 'inside', yAxisIndex: 0 },
|
98
|
-
{
|
99
|
-
type: 'slider',
|
100
|
-
xAxisIndex: 0,
|
101
|
-
},
|
102
|
-
{ type: 'slider', yAxisIndex: 0, orient: 'vertical' },
|
103
|
-
],
|
104
|
-
visualMap: {
|
105
|
-
min: 0,
|
106
|
-
max: 8,
|
107
|
-
dimension: 2,
|
108
|
-
orient: 'vertical',
|
109
|
-
top: 'center',
|
110
|
-
right: 35,
|
111
|
-
text: ['log2\n(tpm+1)', ''],
|
112
|
-
textGap: 10,
|
113
|
-
calculable: true,
|
114
|
-
inRange: {
|
115
|
-
color: [
|
116
|
-
'rgb(43, 120, 182)',
|
117
|
-
'rgb(247, 126, 11)',
|
118
|
-
'rgb(59, 160, 30)',
|
119
|
-
'rgb(206, 37, 41)',
|
120
|
-
'rgb(143, 103, 191)',
|
121
|
-
'rgb(134, 86, 74)',
|
122
|
-
],
|
123
|
-
},
|
124
|
-
textStyle: {
|
125
|
-
writingMode: 'vertical-lr',
|
126
|
-
},
|
127
|
-
},
|
128
|
-
visualify: {
|
129
|
-
colors_for_celltype: [
|
130
|
-
{
|
131
|
-
name: 'BC-1',
|
132
|
-
color: 'rgb(43, 120, 182)',
|
133
|
-
symbol: 'circle',
|
134
|
-
},
|
135
|
-
{
|
136
|
-
name: 'BC-2',
|
137
|
-
color: 'rgb(247, 126, 11)',
|
138
|
-
symbol: 'circle',
|
139
|
-
},
|
140
|
-
{
|
141
|
-
name: 'BC-Sec',
|
142
|
-
color: 'rgb(59, 160, 30)',
|
143
|
-
symbol: 'circle',
|
144
|
-
},
|
145
|
-
{
|
146
|
-
name: 'BC-Sq',
|
147
|
-
color: 'rgb(206, 37, 41)',
|
148
|
-
symbol: 'circle',
|
149
|
-
},
|
150
|
-
{
|
151
|
-
name: 'BC-Mes',
|
152
|
-
color: 'rgb(143, 103, 191)',
|
153
|
-
symbol: 'circle',
|
154
|
-
},
|
155
|
-
{
|
156
|
-
name: 'BC-Pro',
|
157
|
-
color: 'rgb(134, 86, 74)',
|
158
|
-
symbol: 'circle',
|
159
|
-
},
|
160
|
-
],
|
161
|
-
mapping: {
|
162
|
-
extra: {
|
163
|
-
UMI: 'N_UMI',
|
164
|
-
N_gene: 'N_gene',
|
165
|
-
Frac_MT: 'Frac_MT',
|
166
|
-
Cell_ID: 'Cell_ID',
|
167
|
-
},
|
168
|
-
},
|
169
|
-
exclude: ['BC-Mes', 'BC-NE', 'BC-Im'],
|
170
|
-
seriesBy: 'Cell_Type',
|
171
|
-
symbolSize: 5,
|
172
|
-
symbol: 'circle',
|
173
|
-
merger: {
|
174
|
-
gene: {
|
175
|
-
item: 'Cell_ID',
|
176
|
-
label: 'Expression',
|
177
|
-
visualMap: true,
|
178
|
-
},
|
179
|
-
},
|
180
|
-
filter: {
|
181
|
-
Expression: '>-1',
|
182
|
-
},
|
183
|
-
},
|
184
|
-
};
|
185
|
-
|
186
|
-
export default mmtrbc;
|
1
|
+
/*
|
2
|
+
* @Author : Lihao leolihao@arizona.edu
|
3
|
+
* @Date : 2023-12-22 22:37:23
|
4
|
+
* @FilePath : /visualifyjs/src/core/modules/echarts/presets/mmtrbc.js
|
5
|
+
* @Description :
|
6
|
+
* Copyright (c) 2023 by Lihao (leolihao@arizona.edu), All Rights Reserved.
|
7
|
+
*/
|
8
|
+
const mmtrbc = {
|
9
|
+
title: {
|
10
|
+
text: 'MmTrBC Preset',
|
11
|
+
textStyle: {
|
12
|
+
fontFamily: 'Arial, sans-serif',
|
13
|
+
fontSize: 24,
|
14
|
+
color: 'black',
|
15
|
+
margin: '0 0 20px 0',
|
16
|
+
},
|
17
|
+
left: 'center',
|
18
|
+
top: 0,
|
19
|
+
},
|
20
|
+
tooltip: {
|
21
|
+
trigger: 'item',
|
22
|
+
axisPointer: {
|
23
|
+
type: 'cross',
|
24
|
+
},
|
25
|
+
formatter: (params) => {
|
26
|
+
let express = params.data.value[2];
|
27
|
+
let round_epxress = express
|
28
|
+
? Math.round(express * 10000) / 10000
|
29
|
+
: 0;
|
30
|
+
|
31
|
+
let round = (num, n = 2) =>
|
32
|
+
Math.round(num * Math.pow(10, n)) / Math.pow(10, n);
|
33
|
+
|
34
|
+
return ` ${params.data.Cell_ID} <br/>
|
35
|
+
Type: ${params.seriesName} <br/>
|
36
|
+
UMI: ${params.data.UMI ?? 'not found'} <br/>
|
37
|
+
FMT: ${round(params.data.Frac_MT, 5) ?? 'not found'} <br/>
|
38
|
+
${express !== undefined ? 'Expression: ' + round_epxress : ''} `;
|
39
|
+
},
|
40
|
+
},
|
41
|
+
legend: {
|
42
|
+
top: 30,
|
43
|
+
textStyle: {
|
44
|
+
fontFamily: 'Arial, sans-serif',
|
45
|
+
fontSize: 18,
|
46
|
+
},
|
47
|
+
type: 'scroll',
|
48
|
+
orient: 'horizontal',
|
49
|
+
right: 'center',
|
50
|
+
width: '80%',
|
51
|
+
},
|
52
|
+
xAxis: {
|
53
|
+
name: 'TSNE-2',
|
54
|
+
type: 'value',
|
55
|
+
axisLabel: false,
|
56
|
+
nameGap: 10,
|
57
|
+
nameLocation: 'middle',
|
58
|
+
axisTick: false,
|
59
|
+
splitLine: false,
|
60
|
+
nameTextStyle: {
|
61
|
+
fontSize: '18',
|
62
|
+
fontWeight: 'bold',
|
63
|
+
},
|
64
|
+
},
|
65
|
+
yAxis: {
|
66
|
+
name: 'TSNE-1',
|
67
|
+
type: 'value',
|
68
|
+
axisLabel: false,
|
69
|
+
nameGap: 10,
|
70
|
+
nameLocation: 'middle',
|
71
|
+
axisTick: false,
|
72
|
+
splitLine: false,
|
73
|
+
nameTextStyle: {
|
74
|
+
fontSize: '18',
|
75
|
+
fontWeight: 'bold',
|
76
|
+
},
|
77
|
+
},
|
78
|
+
series: [],
|
79
|
+
grid: {
|
80
|
+
containLabel: true,
|
81
|
+
left: '5%',
|
82
|
+
right: '13%',
|
83
|
+
top: '13%',
|
84
|
+
bottom: '13%',
|
85
|
+
},
|
86
|
+
// ... other default settings for charts
|
87
|
+
toolbox: {
|
88
|
+
feature: {
|
89
|
+
saveAsImage: {
|
90
|
+
show: true,
|
91
|
+
icon: `path://M30 20.75c-0.69 0.001-1.249 0.56-1.25 1.25v6.75h-25.5v-6.75c0-0.69-0.56-1.25-1.25-1.25s-1.25 0.56-1.25 1.25v0 8c0 0.69 0.56 1.25 1.25 1.25h28c0.69-0.001 1.249-0.56 1.25-1.25v-8c-0.001-0.69-0.56-1.249-1.25-1.25h-0zM15.116 24.885c0.012 0.012 0.029 0.016 0.041 0.027 0.103 0.099 0.223 0.18 0.356 0.239l0.008 0.003 0.001 0c0.141 0.060 0.306 0.095 0.478 0.095 0.345 0 0.657-0.139 0.883-0.365l5.001-5c0.226-0.226 0.366-0.539 0.366-0.884 0-0.691-0.56-1.251-1.251-1.251-0.345 0-0.658 0.14-0.884 0.366l-2.865 2.867v-18.982c0-0.69-0.56-1.25-1.25-1.25s-1.25 0.56-1.25 1.25v0 18.981l-2.866-2.866c-0.226-0.226-0.539-0.366-0.884-0.366-0.691 0-1.251 0.56-1.251 1.251 0 0.346 0.14 0.658 0.367 0.885v0z`,
|
92
|
+
},
|
93
|
+
},
|
94
|
+
},
|
95
|
+
dataZoom: [
|
96
|
+
{ type: 'inside', xAxisIndex: 0 },
|
97
|
+
{ type: 'inside', yAxisIndex: 0 },
|
98
|
+
{
|
99
|
+
type: 'slider',
|
100
|
+
xAxisIndex: 0,
|
101
|
+
},
|
102
|
+
{ type: 'slider', yAxisIndex: 0, orient: 'vertical' },
|
103
|
+
],
|
104
|
+
visualMap: {
|
105
|
+
min: 0,
|
106
|
+
max: 8,
|
107
|
+
dimension: 2,
|
108
|
+
orient: 'vertical',
|
109
|
+
top: 'center',
|
110
|
+
right: 35,
|
111
|
+
text: ['log2\n(tpm+1)', ''],
|
112
|
+
textGap: 10,
|
113
|
+
calculable: true,
|
114
|
+
inRange: {
|
115
|
+
color: [
|
116
|
+
'rgb(43, 120, 182)',
|
117
|
+
'rgb(247, 126, 11)',
|
118
|
+
'rgb(59, 160, 30)',
|
119
|
+
'rgb(206, 37, 41)',
|
120
|
+
'rgb(143, 103, 191)',
|
121
|
+
'rgb(134, 86, 74)',
|
122
|
+
],
|
123
|
+
},
|
124
|
+
textStyle: {
|
125
|
+
writingMode: 'vertical-lr',
|
126
|
+
},
|
127
|
+
},
|
128
|
+
visualify: {
|
129
|
+
colors_for_celltype: [
|
130
|
+
{
|
131
|
+
name: 'BC-1',
|
132
|
+
color: 'rgb(43, 120, 182)',
|
133
|
+
symbol: 'circle',
|
134
|
+
},
|
135
|
+
{
|
136
|
+
name: 'BC-2',
|
137
|
+
color: 'rgb(247, 126, 11)',
|
138
|
+
symbol: 'circle',
|
139
|
+
},
|
140
|
+
{
|
141
|
+
name: 'BC-Sec',
|
142
|
+
color: 'rgb(59, 160, 30)',
|
143
|
+
symbol: 'circle',
|
144
|
+
},
|
145
|
+
{
|
146
|
+
name: 'BC-Sq',
|
147
|
+
color: 'rgb(206, 37, 41)',
|
148
|
+
symbol: 'circle',
|
149
|
+
},
|
150
|
+
{
|
151
|
+
name: 'BC-Mes',
|
152
|
+
color: 'rgb(143, 103, 191)',
|
153
|
+
symbol: 'circle',
|
154
|
+
},
|
155
|
+
{
|
156
|
+
name: 'BC-Pro',
|
157
|
+
color: 'rgb(134, 86, 74)',
|
158
|
+
symbol: 'circle',
|
159
|
+
},
|
160
|
+
],
|
161
|
+
mapping: {
|
162
|
+
extra: {
|
163
|
+
UMI: 'N_UMI',
|
164
|
+
N_gene: 'N_gene',
|
165
|
+
Frac_MT: 'Frac_MT',
|
166
|
+
Cell_ID: 'Cell_ID',
|
167
|
+
},
|
168
|
+
},
|
169
|
+
exclude: ['BC-Mes', 'BC-NE', 'BC-Im'],
|
170
|
+
seriesBy: 'Cell_Type',
|
171
|
+
symbolSize: 5,
|
172
|
+
symbol: 'circle',
|
173
|
+
merger: {
|
174
|
+
gene: {
|
175
|
+
item: 'Cell_ID',
|
176
|
+
label: 'Expression',
|
177
|
+
visualMap: true,
|
178
|
+
},
|
179
|
+
},
|
180
|
+
filter: {
|
181
|
+
Expression: '>-1',
|
182
|
+
},
|
183
|
+
},
|
184
|
+
};
|
185
|
+
|
186
|
+
export default mmtrbc;
|