From 11f6bc1dfda72c706b5acade868907c5e45abe6c Mon Sep 17 00:00:00 2001
From: Moe Darrah <41540288+moedarrah@users.noreply.github.com>
Date: Wed, 25 Sep 2024 14:08:22 +0200
Subject: [PATCH 1/9] Add QualityControl page
---
frontend/src/pages/About.tsx | 5 -
frontend/src/pages/Home.tsx | 5 -
frontend/src/pages/QualityControl.tsx | 167 ++++++++++++++++++++++++++
frontend/src/routes/AppRouter.tsx | 10 +-
4 files changed, 173 insertions(+), 14 deletions(-)
delete mode 100644 frontend/src/pages/About.tsx
delete mode 100644 frontend/src/pages/Home.tsx
create mode 100644 frontend/src/pages/QualityControl.tsx
diff --git a/frontend/src/pages/About.tsx b/frontend/src/pages/About.tsx
deleted file mode 100644
index ee929d1..0000000
--- a/frontend/src/pages/About.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-export const About = () => {
- return (
-
About
- )
-}
diff --git a/frontend/src/pages/Home.tsx b/frontend/src/pages/Home.tsx
deleted file mode 100644
index 5b1c9f6..0000000
--- a/frontend/src/pages/Home.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-export const Home = () => {
- return (
- Home
- )
-}
\ No newline at end of file
diff --git a/frontend/src/pages/QualityControl.tsx b/frontend/src/pages/QualityControl.tsx
new file mode 100644
index 0000000..a221805
--- /dev/null
+++ b/frontend/src/pages/QualityControl.tsx
@@ -0,0 +1,167 @@
+import { Button, message, Table } from "antd"
+import { DownloadOutlined } from '@ant-design/icons';
+
+
+export const QualityControl = () => {
+
+ const data = [
+ {
+ key: '1',
+ totalBases: 18000000,
+ rawReads: 120000,
+ trimmedReads: 115000,
+ filteredReads: 110000,
+ mappedToHost: 85000,
+ inputReads: 100000,
+ unclassifiedReads: 12000,
+ assignedTo: {
+ homoSapiens: 55000,
+ fungi: 25000,
+ archaea: 8000,
+ bacteria: 17000,
+ viruses: 12000,
+ },
+ analysisDate: '2024-09-20',
+ sampleID: 'SAMPLE123',
+ projectID: 'PROJ001',
+ },
+ {
+ key: '2',
+ totalBases: 15000000,
+ rawReads: 95000,
+ trimmedReads: 90000,
+ filteredReads: 85000,
+ mappedToHost: 60000,
+ inputReads: 80000,
+ unclassifiedReads: 4000,
+ assignedTo: {
+ homoSapiens: 25000,
+ fungi: 10000,
+ archaea: 5000,
+ bacteria: 15000,
+ viruses: 5000,
+ },
+ analysisDate: '2024-09-22',
+ sampleID: 'SAMPLE456',
+ projectID: 'PROJ002',
+ },
+ {
+ key: '3',
+ totalBases: 20000000,
+ rawReads: 140000,
+ trimmedReads: 135000,
+ filteredReads: 130000,
+ mappedToHost: 95000,
+ inputReads: 120000,
+ unclassifiedReads: 15000,
+ assignedTo: {
+ homoSapiens: 70000,
+ fungi: 30000,
+ archaea: 10000,
+ bacteria: 20000,
+ viruses: 25000,
+ },
+ analysisDate: '2024-09-23',
+ sampleID: 'SAMPLE789',
+ projectID: 'PROJ003',
+ },
+ {
+ key: '4',
+ totalBases: 16000000,
+ rawReads: 110000,
+ trimmedReads: 105000,
+ filteredReads: 100000,
+ mappedToHost: 80000,
+ inputReads: 90000,
+ unclassifiedReads: 3000,
+ assignedTo: {
+ homoSapiens: 40000,
+ fungi: 15000,
+ archaea: 6000,
+ bacteria: 12000,
+ viruses: 10000,
+ },
+ analysisDate: '2024-09-24',
+ sampleID: 'SAMPLE012',
+ projectID: 'PROJ004',
+ },
+ ];
+
+
+ const columns = [
+ {
+ title: 'Total Bases',
+ dataIndex: 'totalBases',
+ key: 'totalBases',
+ },
+ {
+ title: 'Number of Raw Reads',
+ dataIndex: 'rawReads',
+ key: 'rawReads',
+ },
+ {
+ title: 'Trimmed Reads',
+ dataIndex: 'trimmedReads',
+ key: 'trimmedReads',
+ },
+ {
+ title: 'Filtered Reads',
+ dataIndex: 'filteredReads',
+ key: 'filteredReads',
+ },
+ {
+ title: 'Reads Mapped to Host Genome (Human)',
+ dataIndex: 'mappedToHost',
+ key: 'mappedToHost',
+ },
+ {
+ title: 'Input Reads for Classifiers',
+ dataIndex: 'inputReads',
+ key: 'inputReads',
+ },
+ {
+ title: 'Unclassified Reads',
+ dataIndex: 'unclassifiedReads',
+ key: 'unclassifiedReads',
+ },
+ {
+ title: 'Reads Assigned to Homo Sapiens',
+ dataIndex: ['assignedTo', 'homoSapiens'],
+ key: 'homoSapiens',
+ },
+ {
+ title: 'Reads Assigned to Fungi',
+ dataIndex: ['assignedTo', 'fungi'],
+ key: 'fungi',
+ },
+ {
+ title: 'Reads Assigned to Archaea',
+ dataIndex: ['assignedTo', 'archaea'],
+ key: 'archaea',
+ },
+ {
+ title: 'Reads Assigned to Bacteria',
+ dataIndex: ['assignedTo', 'bacteria'],
+ key: 'bacteria',
+ },
+ {
+ title: 'Reads Assigned to Viruses',
+ dataIndex: ['assignedTo', 'viruses'],
+ key: 'viruses',
+ },
+ {
+ title: 'Action',
+ key: 'action',
+ render: () => (
+ } onClick={() => message.success('Download')} />
+ ),
+ },
+ ];
+
+
+
+
+ return (
+
+ )
+}
\ No newline at end of file
diff --git a/frontend/src/routes/AppRouter.tsx b/frontend/src/routes/AppRouter.tsx
index 0c8ee03..400fcb1 100644
--- a/frontend/src/routes/AppRouter.tsx
+++ b/frontend/src/routes/AppRouter.tsx
@@ -1,14 +1,16 @@
import { createBrowserRouter, createRoutesFromElements, Route, RouterProvider } from 'react-router-dom';
-import { Home } from '../pages/Home';
-import { About } from '../pages/About';
+import { QualityControl } from '../pages/QualityControl';
+import { ClassificationResults } from '../pages/ClassificationResults';
import { AppLayout } from '../appLayout/AppLayout';
+import { Metadata } from '../pages/Metadata';
const router = createBrowserRouter(
createRoutesFromElements(
}>
- } />
- } />
+ } />
+ } />
+ } />
404 Not Found} />
)
From 9af6f8b59c3587b855585de65a993098ade8a83b Mon Sep 17 00:00:00 2001
From: Moe Darrah <41540288+moedarrah@users.noreply.github.com>
Date: Wed, 25 Sep 2024 14:08:44 +0200
Subject: [PATCH 2/9] Add ClassificationResults page
---
frontend/src/appLayout/AppLayout.tsx | 12 +++++++++---
frontend/src/pages/ClassificationResults.tsx | 9 +++++++++
2 files changed, 18 insertions(+), 3 deletions(-)
create mode 100644 frontend/src/pages/ClassificationResults.tsx
diff --git a/frontend/src/appLayout/AppLayout.tsx b/frontend/src/appLayout/AppLayout.tsx
index 555c9ef..d744d36 100644
--- a/frontend/src/appLayout/AppLayout.tsx
+++ b/frontend/src/appLayout/AppLayout.tsx
@@ -7,11 +7,15 @@ const { Header, Content, Footer } = Layout;
const appMenuItems = () => [
{
key: '/',
- label: Home,
+ label: Quality Control,
},
{
- key: '/about',
- label: About,
+ key: '/classification-results',
+ label: Classification Results,
+ },
+ {
+ key: '/metadata',
+ label: Metadata,
}
];
@@ -23,7 +27,9 @@ export const AppLayout = () => {
+
+