Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse files- templates/index.html +75 -12
templates/index.html
CHANGED
|
@@ -55,7 +55,7 @@
|
|
| 55 |
<h2 class="text-xl font-semibold mb-4 text-teal-300"><i class="fas fa-database mr-2"></i> 1. Dataset & Organism</h2>
|
| 56 |
|
| 57 |
<div class="mb-4">
|
| 58 |
-
<label class="block text-sm text-gray-300 font-bold mb-2">Organism
|
| 59 |
<select name="organism" class="w-full md:w-1/4 bg-gray-700 border border-gray-600 rounded px-3 py-2 text-sm text-gray-200 focus:border-teal-500">
|
| 60 |
<option value="human">Human (Homo sapiens)</option>
|
| 61 |
<option value="mouse">Mouse (Mus musculus)</option>
|
|
@@ -244,17 +244,73 @@
|
|
| 244 |
</div>
|
| 245 |
|
| 246 |
<div id="contentSpatial" class="hidden">
|
| 247 |
-
<
|
| 248 |
-
<
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 258 |
</div>
|
| 259 |
|
| 260 |
<div id="statusArea" class="hidden mt-10 bg-gray-800 p-8 rounded-xl shadow-lg border border-gray-700">
|
|
@@ -308,6 +364,13 @@
|
|
| 308 |
el.addEventListener('change', () => document.getElementById('customFile').classList.add('hidden'));
|
| 309 |
});
|
| 310 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 311 |
function handleSubmission(e, url) {
|
| 312 |
e.preventDefault();
|
| 313 |
|
|
|
|
| 55 |
<h2 class="text-xl font-semibold mb-4 text-teal-300"><i class="fas fa-database mr-2"></i> 1. Dataset & Organism</h2>
|
| 56 |
|
| 57 |
<div class="mb-4">
|
| 58 |
+
<label class="block text-sm text-gray-300 font-bold mb-2">Organism</label>
|
| 59 |
<select name="organism" class="w-full md:w-1/4 bg-gray-700 border border-gray-600 rounded px-3 py-2 text-sm text-gray-200 focus:border-teal-500">
|
| 60 |
<option value="human">Human (Homo sapiens)</option>
|
| 61 |
<option value="mouse">Mouse (Mus musculus)</option>
|
|
|
|
| 244 |
</div>
|
| 245 |
|
| 246 |
<div id="contentSpatial" class="hidden">
|
| 247 |
+
<form id="spatialForm" class="space-y-6">
|
| 248 |
+
<div class="bg-gray-800 p-6 rounded-xl shadow-lg border border-gray-700">
|
| 249 |
+
<h2 class="text-xl font-semibold mb-4 text-purple-400"><i class="fas fa-map-marked-alt mr-2"></i> 1. Spatial Dataset & Organism</h2>
|
| 250 |
+
|
| 251 |
+
<div class="mb-4">
|
| 252 |
+
<label class="block text-sm text-gray-300 font-bold mb-2">Organism</label>
|
| 253 |
+
<select name="spatial_organism" class="w-full md:w-1/4 bg-gray-700 border border-gray-600 rounded px-3 py-2 text-sm text-gray-200 focus:border-purple-500">
|
| 254 |
+
<option value="mouse">Mouse (Mus musculus)</option>
|
| 255 |
+
<option value="human">Human (Homo sapiens)</option>
|
| 256 |
+
</select>
|
| 257 |
+
</div>
|
| 258 |
+
|
| 259 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-3 mb-4">
|
| 260 |
+
<label class="flex items-center space-x-2 p-3 border border-gray-600 rounded cursor-pointer hover:bg-gray-700 transition">
|
| 261 |
+
<input type="radio" name="spatial_dataset" value="visium_mouse" class="form-radio text-purple-500 h-4 w-4" checked required>
|
| 262 |
+
<span class="text-gray-200 text-sm">10x Visium Adult Mouse Brain (Default)</span>
|
| 263 |
+
</label>
|
| 264 |
+
<label class="flex items-center space-x-2 p-3 border border-purple-600 rounded cursor-pointer bg-purple-900 bg-opacity-20 hover:bg-opacity-40 transition">
|
| 265 |
+
<input type="radio" name="spatial_dataset" value="custom" id="spatialCustomRadio" class="form-radio text-purple-500 h-4 w-4">
|
| 266 |
+
<span class="text-purple-300 text-sm font-bold">Custom .h5ad Upload (Requires obsm['spatial'])</span>
|
| 267 |
+
</label>
|
| 268 |
+
</div>
|
| 269 |
+
<input type="file" name="spatial_custom_file" id="spatialCustomFile" accept=".h5ad" class="hidden w-full text-sm text-gray-400 file:mr-4 file:py-2 file:px-4 file:rounded file:border-0 file:bg-purple-600 file:text-white hover:file:bg-purple-700"/>
|
| 270 |
+
</div>
|
| 271 |
+
|
| 272 |
+
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
|
| 273 |
+
<div class="bg-gray-800 p-5 rounded-xl shadow-lg border border-gray-700">
|
| 274 |
+
<h2 class="text-lg font-semibold mb-3 text-teal-300"><i class="fas fa-filter mr-2"></i> Quality Control</h2>
|
| 275 |
+
<label class="block text-xs text-gray-400 mb-1">Min Counts per Spot</label>
|
| 276 |
+
<input type="number" name="spatial_min_counts" value="500" class="w-full bg-gray-700 border border-gray-600 rounded px-2 py-1 mb-3 text-sm focus:border-teal-500">
|
| 277 |
+
|
| 278 |
+
<label class="block text-xs text-gray-400 mb-1">Max Mito %</label>
|
| 279 |
+
<input type="number" step="0.1" name="spatial_max_mito" value="20.0" class="w-full bg-gray-700 border border-gray-600 rounded px-2 py-1 mb-3 text-sm focus:border-teal-500">
|
| 280 |
+
|
| 281 |
+
<label class="block text-xs text-gray-400 mb-1">Highly Variable Genes (n_top_genes)</label>
|
| 282 |
+
<input type="number" name="spatial_n_hvg" value="2000" class="w-full bg-gray-700 border border-gray-600 rounded px-2 py-1 text-sm focus:border-teal-500">
|
| 283 |
+
</div>
|
| 284 |
+
|
| 285 |
+
<div class="bg-gray-800 p-5 rounded-xl shadow-lg border border-gray-700">
|
| 286 |
+
<h2 class="text-lg font-semibold mb-3 text-yellow-300"><i class="fas fa-project-diagram mr-2"></i> DimRed & Clusters</h2>
|
| 287 |
+
<label class="block text-xs text-gray-400 mb-1">PCA Comps & Neighbors (K)</label>
|
| 288 |
+
<div class="flex space-x-2 mb-3">
|
| 289 |
+
<input type="number" name="spatial_n_pcs" value="50" class="w-1/2 bg-gray-700 border border-gray-600 rounded px-2 py-1 text-sm focus:border-yellow-500">
|
| 290 |
+
<input type="number" name="spatial_n_neighbors" value="15" class="w-1/2 bg-gray-700 border border-gray-600 rounded px-2 py-1 text-sm focus:border-yellow-500">
|
| 291 |
+
</div>
|
| 292 |
+
|
| 293 |
+
<label class="block text-xs text-gray-400 mb-1">Leiden Resolution</label>
|
| 294 |
+
<input type="number" step="0.1" name="spatial_resolution" value="0.8" class="w-full bg-gray-700 border border-gray-600 rounded px-2 py-1 text-sm focus:border-yellow-500">
|
| 295 |
+
</div>
|
| 296 |
+
|
| 297 |
+
<div class="bg-gray-800 p-5 rounded-xl shadow-lg border border-gray-700">
|
| 298 |
+
<h2 class="text-lg font-semibold mb-3 text-pink-300"><i class="fas fa-layer-group mr-2"></i> Spatial Analytics</h2>
|
| 299 |
+
<label class="block text-xs text-gray-400 mb-1">Spatial Domains (K)</label>
|
| 300 |
+
<input type="number" name="spatial_clusters" value="7" class="w-full bg-gray-700 border border-gray-600 rounded px-2 py-1 mb-3 text-sm focus:border-pink-500">
|
| 301 |
+
|
| 302 |
+
<label class="block text-xs text-gray-400 mb-1">Spatial Smoothing Weight (0.0 to 1.0)</label>
|
| 303 |
+
<input type="number" step="0.1" name="spatial_weight" value="0.5" class="w-full bg-gray-700 border border-gray-600 rounded px-2 py-1 mb-3 text-sm focus:border-pink-500">
|
| 304 |
+
|
| 305 |
+
<label class="block text-xs text-gray-400 mb-1">Top Spatial Variable Genes</label>
|
| 306 |
+
<input type="number" name="spatial_n_svg" value="50" class="w-full bg-gray-700 border border-gray-600 rounded px-2 py-1 text-sm focus:border-pink-500">
|
| 307 |
+
</div>
|
| 308 |
+
</div>
|
| 309 |
+
|
| 310 |
+
<button type="submit" class="w-full bg-gradient-to-r from-purple-600 to-pink-600 hover:from-purple-500 hover:to-pink-500 text-white font-bold py-4 rounded-xl shadow-lg transform transition hover:scale-[1.01] text-xl">
|
| 311 |
+
<i class="fas fa-rocket mr-2"></i> Execute Spatial Analysis
|
| 312 |
+
</button>
|
| 313 |
+
</form>
|
| 314 |
</div>
|
| 315 |
|
| 316 |
<div id="statusArea" class="hidden mt-10 bg-gray-800 p-8 rounded-xl shadow-lg border border-gray-700">
|
|
|
|
| 364 |
el.addEventListener('change', () => document.getElementById('customFile').classList.add('hidden'));
|
| 365 |
});
|
| 366 |
|
| 367 |
+
document.getElementById('spatialCustomRadio').addEventListener('change', function() {
|
| 368 |
+
document.getElementById('spatialCustomFile').classList.remove('hidden');
|
| 369 |
+
});
|
| 370 |
+
document.querySelectorAll('input[name="spatial_dataset"]:not(#spatialCustomRadio)').forEach(el => {
|
| 371 |
+
el.addEventListener('change', () => document.getElementById('spatialCustomFile').classList.add('hidden'));
|
| 372 |
+
});
|
| 373 |
+
|
| 374 |
function handleSubmission(e, url) {
|
| 375 |
e.preventDefault();
|
| 376 |
|