Skip to content

Commit

Permalink
progress
Browse files Browse the repository at this point in the history
  • Loading branch information
fhennig committed Nov 8, 2024
1 parent 1b1dcb0 commit afc657f
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,15 @@ data class SequenceEntryStatus(
val isRevocation: Boolean = false,
val submissionId: String,
val dataUseTerms: DataUseTerms,
val processedData: ProcessedData<GeneticSequence>,
val originalData: OriginalData<GeneticSequence>,
@Schema(description = "The preprocessing will be considered failed if this is not empty")
val errors: List<PreprocessingAnnotation>? = null,
@Schema(
description =
"Issues where data is not necessarily wrong, but the user might want to look into those warnings.",
)
val warnings: List<PreprocessingAnnotation>? = null,
) : AccessionVersionInterface

data class EditedSequenceEntryData(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -707,6 +707,16 @@ class SubmissionDatabaseService(
DataUseTermsType.fromString(row[DataUseTermsTable.dataUseTermsTypeColumn]),
row[DataUseTermsTable.restrictedUntilColumn],
),
processedData = compressionService.decompressSequencesInProcessedData(
row[SequenceEntriesView.processedDataColumn]!!,
organism!!,
),
originalData = compressionService.decompressSequencesInOriginalData(
row[SequenceEntriesView.originalDataColumn]!!,
organism!!,
),
errors = row[SequenceEntriesView.errorsColumn],
warnings = row[SequenceEntriesView.warningsColumn],
)
}

Expand Down
1 change: 1 addition & 0 deletions website/src/components/ReviewPage/ReviewCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ const isAnnotationPresent = (metadataField: string) => (item: ProcessingAnnotati
item.source[0].name === metadataField;

const MetadataList: FC<MetadataListProps> = ({ data }) =>
data.processedData !== undefined &&
Object.entries(data.processedData.metadata).map(([metadataName, value], index) =>
value === null ? null : (
<KeyValueComponent
Expand Down
28 changes: 16 additions & 12 deletions website/src/types/backend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,22 @@ export const sequenceEntryStatus = accessionVersion.merge(
submitter: z.string(),
errors: z.array(processingAnnotation).nullable(),
warnings: z.array(processingAnnotation).nullable(),
originalData: z.object({
metadata: unprocessedMetadataRecord,
unalignedNucleotideSequences: z.record(z.string()),
}),
processedData: z.object({
metadata: metadataRecord,
unalignedNucleotideSequences: z.record(z.string().nullable()),
alignedNucleotideSequences: z.record(z.string().nullable()),
nucleotideInsertions: z.record(z.array(z.string())),
alignedAminoAcidSequences: z.record(z.string().nullable()),
aminoAcidInsertions: z.record(z.array(z.string())),
}),
originalData: z
.object({
metadata: unprocessedMetadataRecord,
unalignedNucleotideSequences: z.record(z.string()),
})
.optional(),
processedData: z
.object({
metadata: metadataRecord,
unalignedNucleotideSequences: z.record(z.string().nullable()),
alignedNucleotideSequences: z.record(z.string().nullable()),
nucleotideInsertions: z.record(z.array(z.string())),
alignedAminoAcidSequences: z.record(z.string().nullable()),
aminoAcidInsertions: z.record(z.array(z.string())),
})
.optional(),
}),
);

Expand Down

0 comments on commit afc657f

Please sign in to comment.