@@ -28,10 +28,10 @@ let mode = "tsne";
2828// Fetch all required data
2929function fetchData ( ) {
3030 return Promise . all ( [
31- Promise . resolve ( tsne_data_json ) ,
32- Promise . resolve ( cluster_info_json ) ,
33- Promise . resolve ( gsea_results_json ) ,
34- Promise . resolve ( top10_markers_json ) ,
31+ Promise . resolve ( tsne_data ) ,
32+ Promise . resolve ( cluster_info ) ,
33+ Promise . resolve ( gsea_results ) ,
34+ Promise . resolve ( top10_markers ) ,
3535 ] ) ;
3636}
3737
@@ -66,9 +66,7 @@ function createScales(data, width, height) {
6666// Generate GSEA info panel content
6767function generateGseaInfo ( pathway ) {
6868 const gseaPanel = document . getElementById ( "gsea-info-panel" ) ;
69- const gseaInfo = gsea_results_json . find (
70- ( result ) => result . pathway === pathway
71- ) ;
69+ const gseaInfo = gsea_results . find ( ( result ) => result . pathway === pathway ) ;
7270
7371 const content = `
7472 <div class="bg-white shadow-xl rounded-lg p-6">
@@ -97,7 +95,7 @@ function generateClusterInfo(point) {
9795 gseaPanelInfo . innerHTML = "" ;
9896
9997 const clusterPanelInfo = document . getElementById ( "cluster-info-panel" ) ;
100- const clusterInfo = cluster_info_json [ point . cluster ] [ 0 ] ;
98+ const clusterInfo = cluster_info [ point . cluster ] [ 0 ] ;
10199
102100 const content = `
103101 <div class="bg-white shadow-md rounded-lg p-6">
@@ -277,7 +275,7 @@ function drawTop10Markers(data) {
277275}
278276
279277function drawTop10AverageExpression ( cluster ) {
280- const data = top10_markers_json ;
278+ const data = top10_markers ;
281279
282280 const filteredData = data . filter ( ( d ) => d . cluster === cluster ) ;
283281
@@ -363,15 +361,15 @@ async function main() {
363361 modeSpan . innerHTML = "t-SNE" ;
364362 document . getElementById ( "top10-markers" ) . style . display = "block" ;
365363
366- drawTop10Markers ( top10_markers_json ) ;
364+ drawTop10Markers ( top10_markers ) ;
367365 drawTop10AverageExpression ( "0" ) ;
368366 } else {
369367 modeSpan . innerHTML = "UMAP" ;
370368 document . getElementById ( "top10-markers" ) . style . display = "none" ;
371369 }
372370 } ) ;
373371
374- drawTop10Markers ( top10_markers_json ) ;
372+ drawTop10Markers ( top10_markers ) ;
375373 drawTop10AverageExpression ( "0" ) ;
376374
377375 console . log ( "Visualization completed successfully" ) ;
0 commit comments