Files
operify/app/rna-sequencing/iso-sequencing/components/IsoformPipeline.jsx
2025-08-06 15:03:48 +05:30

134 lines
5.4 KiB
JavaScript

import React from 'react';
import { ArrowDown, ArrowRight, ArrowUp } from 'lucide-react';
const IsoformPipeline = ({
title = "Bioinformatics Pipeline",
leftSteps = [
"Raw Sequencing Data (fastq files)",
"Quality Control and Preprocessing of Data",
"High Quality Sequencing Data (fastq file)",
"Build Similarity Graph and Polishing"
],
rightSteps = [
"Downstream Analysis (Fusion Analysis, Splicing Analysis)",
"Transcript Annotation and Classification",
"Sequencing Merge and Redundancy Removal",
"Alignment to Reference Genome"
],
backgroundColor = "bg-gray-50",
cardColor = "bg-gray-300",
textColor = "text-teal-600",
arrowColor = "text-gray-600",
className = "",
cardClassName = "",
titleClassName = ""
}) => {
// Combine steps for mobile layout
const mobileSteps = [...leftSteps, ...rightSteps.slice().reverse()];
return (
<section className={`py-6 sm:py-8 lg:py-12 ${backgroundColor} ${className}`}>
<div className="container mx-auto max-w-none px-3 sm:px-4 lg:px-6">
<h2 className={`text-gray-700 text-left pb-4 sm:pb-6 text-xl sm:text-2xl lg:text-3xl font-normal ${titleClassName}`}>
{title}
</h2>
{/* Pipeline Flowchart */}
<div className="bg-white rounded-xl shadow-lg p-4 sm:p-6 lg:p-8">
<div className="flex justify-center">
<div className="w-full max-w-5xl">
<div className="relative">
{/* Mobile Layout - Single Column */}
<div className="block sm:hidden">
<div className="flex flex-col items-center space-y-3">
{mobileSteps.map((step, index) => (
<React.Fragment key={index}>
<div className={`${cardColor} rounded-lg p-3 w-full text-center border ${cardClassName}`}>
<h3 className={`text-xs font-medium ${textColor}`}>{step}</h3>
</div>
{index < mobileSteps.length - 1 && (
<ArrowDown className={`w-5 h-5 ${arrowColor}`} />
)}
</React.Fragment>
))}
</div>
</div>
{/* Desktop Layout - Two Columns */}
<div className="hidden sm:block">
<div className="grid grid-cols-2 gap-4 sm:gap-6 lg:gap-8">
{/* Left Column */}
<div className="flex flex-col items-center space-y-3">
{leftSteps.map((step, index) => (
<React.Fragment key={index}>
<div className={`${cardColor} rounded-lg p-4 w-full text-center border ${cardClassName}`} style={{maxWidth: '19rem'}}>
<h3 className={`text-sm font-medium ${textColor}`}>{step}</h3>
</div>
{index < leftSteps.length - 1 && (
<ArrowDown className={`w-6 h-6 ${arrowColor}`} />
)}
</React.Fragment>
))}
</div>
{/* Right Column */}
<div className="flex flex-col items-center space-y-3">
{rightSteps.map((step, index) => (
<React.Fragment key={index}>
<div className={`${cardColor} rounded-lg p-4 w-full text-center border ${cardClassName}`} style={{maxWidth: '19rem'}}>
<h3 className={`text-sm font-medium ${textColor}`}>{step}</h3>
</div>
{index < rightSteps.length - 1 && (
<ArrowUp className={`w-6 h-6 ${arrowColor}`} />
)}
</React.Fragment>
))}
</div>
</div>
{/* Diagonal Arrow from High Quality Sequencing Data to Alignment to Reference Genome */}
<div className="absolute top-80 left-1/2 transform -translate-x-1/2 -translate-y-1/2">
<svg
width="180"
height="60"
viewBox="0 0 180 60"
className={arrowColor}
style={{transform: 'rotate(20deg)'}}
>
<defs>
<marker
id="arrowhead"
markerWidth="10"
markerHeight="7"
refX="9"
refY="3.5"
orient="auto"
>
<polygon
points="0 0, 10 3.5, 0 7"
fill="currentColor"
/>
</marker>
</defs>
<line
x1="10"
y1="10"
x2="170"
y2="50"
stroke="currentColor"
strokeWidth="2"
markerEnd="url(#arrowhead)"
/>
</svg>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
);
};
export default IsoformPipeline;