diff --git a/website/src/components/Submission/DataUploadForm.tsx b/website/src/components/Submission/DataUploadForm.tsx index 574c01c6b..80c04c15c 100644 --- a/website/src/components/Submission/DataUploadForm.tsx +++ b/website/src/components/Submission/DataUploadForm.tsx @@ -16,6 +16,7 @@ import { restrictedDataUseTermsType, type Group, } from '../../types/backend.ts'; +import type { ReferenceGenomesSequenceNames } from '../../types/referencesGenomes'; import type { ClientConfig } from '../../types/runtimeConfig.ts'; import { dateTimeInMonths } from '../../utils/DateTimeInMonths.tsx'; import { createAuthorizationHeader } from '../../utils/createAuthorizationHeader.ts'; @@ -32,6 +33,7 @@ type DataUploadFormProps = { clientConfig: ClientConfig; action: Action; group: Group; + referenceGenomeSequenceNames: ReferenceGenomesSequenceNames; onSuccess: () => void; onError: (message: string) => void; }; @@ -272,6 +274,7 @@ const InnerDataUploadForm = ({ onSuccess, onError, group, + referenceGenomeSequenceNames, }: DataUploadFormProps) => { const [metadataFile, setMetadataFile] = useState(null); const [sequenceFile, setSequenceFile] = useState(null); @@ -341,6 +344,8 @@ const InnerDataUploadForm = ({ } }; + const isMultiSegmented = referenceGenomeSequenceNames.nucleotideSequences.length > 1; + return (
@@ -366,10 +371,28 @@ const InnerDataUploadForm = ({ for the TSV metadata file with column headings.

+ {isMultiSegmented && ( +

+ {organism.toUpperCase()} has a multi-segmented genome. Please submit one metadata entry + with a unique submissionId for the full multi-segmented sample, e.g.{' '} + sample1. Sequence data should be a FASTA file with each header indicating the{' '} + submissionId and the segment, i.e.{' '} + {referenceGenomeSequenceNames.nucleotideSequences.map((name, index) => ( + + sample1_{name} + {index !== referenceGenomeSequenceNames.nucleotideSequences.length - 1 + ? ', ' + : ''} + + ))} + . +

+ )} +

Files can optionally be compressed, with the appropriate extension (.zst, .gz,{' '} .zip, .xz). For more information please refer to our{' '} - + help pages . diff --git a/website/src/components/Submission/RevisionForm.tsx b/website/src/components/Submission/RevisionForm.tsx index 1a3054e7a..8ed956d3d 100644 --- a/website/src/components/Submission/RevisionForm.tsx +++ b/website/src/components/Submission/RevisionForm.tsx @@ -3,6 +3,7 @@ import { type FC } from 'react'; import { DataUploadForm } from './DataUploadForm.tsx'; import { routes } from '../../routes/routes.ts'; import { type Group } from '../../types/backend.ts'; +import type { ReferenceGenomesSequenceNames } from '../../types/referencesGenomes'; import type { ClientConfig } from '../../types/runtimeConfig.ts'; import { ManagedErrorFeedback, useErrorFeedbackState } from '../common/ManagedErrorFeedback'; @@ -11,9 +12,16 @@ type RevisionFormProps = { organism: string; clientConfig: ClientConfig; group: Group; + referenceGenomeSequenceNames: ReferenceGenomesSequenceNames; }; -export const RevisionForm: FC = ({ accessToken, organism, clientConfig, group }) => { +export const RevisionForm: FC = ({ + accessToken, + organism, + clientConfig, + group, + referenceGenomeSequenceNames, +}) => { const { errorMessage, isErrorOpen, openErrorFeedback, closeErrorFeedback } = useErrorFeedbackState(); return ( @@ -22,6 +30,7 @@ export const RevisionForm: FC = ({ accessToken, organism, cli ({ getClientLogger: () => ({ @@ -29,10 +30,22 @@ const group: Group = { contactEmail: 'email', }; +const defaultAccession: ReferenceAccession = { + name: 'main', + insdc_accession_full: undefined, +}; + +const defaultReferenceGenomesSequenceNames: ReferenceGenomesSequenceNames = { + nucleotideSequences: ['main'], + genes: ['gene1', 'gene2'], + insdc_accession_full: [defaultAccession], +}; + function renderSubmissionForm() { return render( = ({ accessToken, organism, clientConfig, group }) => { +export const SubmissionForm: FC = ({ + accessToken, + organism, + clientConfig, + group, + referenceGenomeSequenceNames, +}) => { const { errorMessage, isErrorOpen, openErrorFeedback, closeErrorFeedback } = useErrorFeedbackState(); return ( @@ -22,6 +30,7 @@ export const SubmissionForm: FC = ({ accessToken, organism, (