From c748e1600f1b9214fa124aa8d5327e4e51bb8add Mon Sep 17 00:00:00 2001 From: Nyck Date: Wed, 5 Jul 2023 15:34:17 +0100 Subject: [PATCH] Some tree algorithms removed. --- .../CreateDataset/DatasetInfoStepCard.tsx | 4 +-- .../CreateDataset/TypingDataStepCard.tsx | 4 +-- .../DatasetDetails/ComputeTreesCard.tsx | 27 ++----------------- .../Dataset/Trees/useTreesTreeItem.ts | 12 ++++----- .../Project/CreateDataset/useCreateDataset.ts | 4 +-- 5 files changed, 14 insertions(+), 37 deletions(-) diff --git a/src/frontend/src/Components/Project/CreateDataset/DatasetInfoStepCard.tsx b/src/frontend/src/Components/Project/CreateDataset/DatasetInfoStepCard.tsx index 65c45be5..8fb4c7a5 100644 --- a/src/frontend/src/Components/Project/CreateDataset/DatasetInfoStepCard.tsx +++ b/src/frontend/src/Components/Project/CreateDataset/DatasetInfoStepCard.tsx @@ -96,7 +96,7 @@ const datasetDescriptions = { [TypingDataType.MLVA]: "The dataset type MLVA is designed to analyze MLVA data using its common allelic profiles " + "formats and adds extra distance metrics to the analyses options.", - [TypingDataType.FASTA]: "The dataset type Aligned Sequences (FASTA) is designed to analyze sequence data " + + /*[TypingDataType.FASTA]: "The dataset type Aligned Sequences (FASTA) is designed to analyze sequence data " + "available in FASTA format. The sequences need to be all of the same size. " + "Sequences of different sizes will be excluded.", @@ -111,5 +111,5 @@ const datasetDescriptions = { [TypingDataType.SNP_WITHOUT_EXPLICIT_ID]: "The dataset type Single Nucleotide Polymorphism (SNP) " + "(without explicit ID) is designed to analyze SNP data based on the presence and absence of a SNP, and no " + "explicit ID was attributed to the entire SNP profile. The sequences need to be all of the same size. " + - "Sequences of different sizes will be excluded." + "Sequences of different sizes will be excluded."*/ } diff --git a/src/frontend/src/Components/Project/CreateDataset/TypingDataStepCard.tsx b/src/frontend/src/Components/Project/CreateDataset/TypingDataStepCard.tsx index 20283c46..f1098e5d 100644 --- a/src/frontend/src/Components/Project/CreateDataset/TypingDataStepCard.tsx +++ b/src/frontend/src/Components/Project/CreateDataset/TypingDataStepCard.tsx @@ -108,7 +108,7 @@ const typingDataExamples = { " (...)\n" + "This files should not contain missing data. If any allele missing data is found the entire line is discarded.", - [TypingDataType.FASTA]: "The data format for the typing data should be as follows. Load a text file containing " + + /*[TypingDataType.FASTA]: "The data format for the typing data should be as follows. Load a text file containing " + "only the sequences. All the sequences should have the same length. A sequential ID identified will be " + "attributed to each sequence based on the order of the sequences in the file. The Fasta header will be used " + "to identify the isolate when you click on it. This format can also be used to analyze SNP data. An example " + @@ -135,5 +135,5 @@ const typingDataExamples = { [TypingDataType.SNP_WITHOUT_EXPLICIT_ID]: "The dataset type Single Nucleotide Polymorphism (SNP) (without " + "explicit ID) is designed to analyze SNP data based on the presence and absence of a SNP, and no explicit ID " + "was attributed to the entire SNP profile. The sequences need to be all of the same size. Sequences of " + - "different sizes will be excluded." + "different sizes will be excluded."*/ } \ No newline at end of file diff --git a/src/frontend/src/Components/Project/DatasetDetails/ComputeTreesCard.tsx b/src/frontend/src/Components/Project/DatasetDetails/ComputeTreesCard.tsx index 71f9c82d..6ded12b4 100644 --- a/src/frontend/src/Components/Project/DatasetDetails/ComputeTreesCard.tsx +++ b/src/frontend/src/Components/Project/DatasetDetails/ComputeTreesCard.tsx @@ -3,8 +3,8 @@ import Typography from "@mui/material/Typography" import {Button, Menu, MenuItem} from "@mui/material" import * as React from "react" import {useNavigate, useParams} from "react-router-dom" -import {WebUiUris} from "../../../Pages/WebUiUris" import {TreesIcon} from "../../Shared/Icons"; +import {computeTreeOptions} from "../ProjectStructure/Datasets/Dataset/Trees/useTreesTreeItem" /** * Card for the compute trees feature. @@ -17,29 +17,6 @@ export function ComputeTreesCard() { const open = Boolean(anchorEl) const handleClose = () => setAnchorEl(null) - const computeTreeOptions = [ - { - label: "goeBURST", - url: WebUiUris.computeGoeburst(projectId!, datasetId!) - }, - { - label: "goeBURST Full MST", - url: WebUiUris.computeGoeburstFullMst(projectId!, datasetId!) - }, - { - label: "Hierarchical Clustering", - url: WebUiUris.computeHierarchicalClustering(projectId!, datasetId!) - }, - // { - // label: "Neighbor Joining", - // url: WebUiUris.computeNeighborJoining(projectId!, datasetId!) - // }, - { - label: "nLV Graph", - url: WebUiUris.computeNlvGraph(projectId!, datasetId!) - } - ] - return - {computeTreeOptions.map((option) => ( + {computeTreeOptions(projectId!, datasetId!).map((option) => ( { diff --git a/src/frontend/src/Components/Project/ProjectStructure/Datasets/Dataset/Trees/useTreesTreeItem.ts b/src/frontend/src/Components/Project/ProjectStructure/Datasets/Dataset/Trees/useTreesTreeItem.ts index a43965d1..f91737c1 100644 --- a/src/frontend/src/Components/Project/ProjectStructure/Datasets/Dataset/Trees/useTreesTreeItem.ts +++ b/src/frontend/src/Components/Project/ProjectStructure/Datasets/Dataset/Trees/useTreesTreeItem.ts @@ -8,7 +8,7 @@ export const computeTreeOptions = (projectId: string, datasetId: string) => [ label: "goeBURST", url: WebUiUris.computeGoeburst(projectId, datasetId) }, - { + /*{ label: "goeBURST Full MST", url: WebUiUris.computeGoeburstFullMst(projectId, datasetId) }, @@ -16,14 +16,14 @@ export const computeTreeOptions = (projectId: string, datasetId: string) => [ label: "Hierarchical Clustering", url: WebUiUris.computeHierarchicalClustering(projectId, datasetId) }, - // { - // label: "Neighbor Joining", - // url: WebUiUris.computeNeighborJoining(projectId, datasetId) - // }, + { + label: "Neighbor Joining", + url: WebUiUris.computeNeighborJoining(projectId, datasetId) + }, { label: "nLV Graph", url: WebUiUris.computeNlvGraph(projectId, datasetId) - } + }*/ ] /** diff --git a/src/frontend/src/Pages/Project/CreateDataset/useCreateDataset.ts b/src/frontend/src/Pages/Project/CreateDataset/useCreateDataset.ts index 6561b4af..2ba9feaf 100644 --- a/src/frontend/src/Pages/Project/CreateDataset/useCreateDataset.ts +++ b/src/frontend/src/Pages/Project/CreateDataset/useCreateDataset.ts @@ -20,10 +20,10 @@ export enum CreateDatasetStep { export enum TypingDataType { MLST = "Multi-Locus Sequence Typing (MLST)", MLVA = "Multi-Locus Variable Number Tandem Repeat Analysis (MLVA)", - FASTA = "Aligned Sequences (FASTA)", + /*FASTA = "Aligned Sequences (FASTA)", ALIGNED_SEQUENCES = "Aligned Sequences", SNP = "Single Nucleotide Polymorphism (SNP)", - SNP_WITHOUT_EXPLICIT_ID = "Single Nucleotide Polymorphism (SNP) (without explicit ID)", + SNP_WITHOUT_EXPLICIT_ID = "Single Nucleotide Polymorphism (SNP) (without explicit ID)",*/ }