deepsite-project / analysis.html
RCP79's picture
here is the code:
578fbf9 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>RNA Sequence Analysis</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<script src="https://unpkg.com/htmx.org@1.9.6"></script>
</head>
<body class="bg-gray-100 min-h-screen">
<div class="container mx-auto px-4 py-8">
<header class="mb-8">
<h1 class="text-3xl font-bold text-gray-800">RNA Sequence Analysis Tool</h1>
<p class="text-gray-600">Analyze RNA sequences with dimensional reduction techniques</p>
</header>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
<!-- Configuration Panel -->
<div class="bg-white rounded-lg shadow p-6 lg:col-span-1">
<h2 class="text-xl font-semibold mb-4">Configuration</h2>
<form id="analysisForm" hx-post="/analyze" hx-target="#results" hx-indicator="#loading">
<!-- File Input -->
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="dataFile">Data File (HDF5)</label>
<input type="file" id="dataFile" name="dataFile" accept=".h5,.hdf5"
class="w-full px-3 py-2 border border-gray-300 rounded-md">
</div>
<!-- Model Selection -->
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="modelName">RNA Model</label>
<select id="modelName" name="modelName" class="w-full px-3 py-2 border border-gray-300 rounded-md">
<option value="multimolecule/rnaernie">RNAErnie (default)</option>
<option value="multimolecule/rnabert">RNABERT</option>
<option value="multimolecule/rnadistill">RNADistill</option>
</select>
</div>
<!-- Sequence Column -->
<div class="mb-4">
<label class="block text-gray-700 mb-2" for="seqCol">Sequence Column</label>
<input type="text" id="seqCol" name="seqCol" value="full_sequence"
class="w-full px-3 py-2 border border-gray-300 rounded-md">
</div>
<!-- Reduction Method -->
<div class="mb-4">
<label class="block text-gray-700 mb-2">Dimensionality Reduction</label>
<div class="flex items-center mb-2">
<input type="radio" id="umap" name="reductionMethod" value="umap" checked class="mr-2">
<label for="umap">UMAP</label>
</div>
<div class="flex items-center">
<input type="radio" id="pacmap" name="reductionMethod" value="pacmap" class="mr-2">
<label for="pacmap">PaCMAP</label>
</div>
</div>
<!-- Dimensions -->
<div class="mb-4">
<label class="block text-gray-700 mb-2">Dimensions</label>
<div class="flex items-center mb-2">
<input type="radio" id="2d" name="dimensions" value="2" checked class="mr-2">
<label for="2d">2D</label>
</div>
<div class="flex items-center">
<input type="radio" id="3d" name="dimensions" value="3" class="mr-2">
<label for="3d">3D</label>
</div>
</div>
<!-- Color By -->
<div class="mb-6">
<label class="block text-gray-700 mb-2" for="colorBy">Color By Column (optional)</label>
<input type="text" id="colorBy" name="colorBy"
class="w-full px-3 py-2 border border-gray-300 rounded-md">
</div>
<button type="submit" class="w-full bg-blue-600 text-white py-2 px-4 rounded-md hover:bg-blue-700 transition">
Analyze Sequences
</button>
</form>
</div>
<!-- Results Panel -->
<div class="bg-white rounded-lg shadow p-6 lg:col-span-2">
<h2 class="text-xl font-semibold mb-4">Results</h2>
<div id="loading" class="htmx-indicator text-center py-8">
<div class="animate-spin rounded-full h-12 w-12 border-b-2 border-blue-600 mx-auto mb-4"></div>
<p class="text-gray-600">Processing data...</p>
</div>
<div id="results" class="min-h-64">
<div class="text-center text-gray-500 py-12">
<p>Configure and run analysis to see results</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>