diff --git a/client/src/components/Pages/Summary/Invalid/Invalid.tsx b/client/src/components/Pages/Summary/Invalid/Invalid.tsx index 97bca2dd..8672978c 100644 --- a/client/src/components/Pages/Summary/Invalid/Invalid.tsx +++ b/client/src/components/Pages/Summary/Invalid/Invalid.tsx @@ -98,63 +98,6 @@ export const Invalid: React.FC = ({ ); - const noEventError = ( - - The causative event is not specified.{" "} - setVisibleTab(2)}> - Declare the event type - {" "} - to resolve. - - ); - - const noAssayError = ( - - No assay metadata is provided. You must{" "} - setVisibleTab(3)}> - identify the assay, detection method, and methodology that was used to - uncover the fusion - {" "} - in order to resolve. - - ); - - const assayIdCurieError = ( - - The provided assay ID is not a valid{" "} - - W3 CURIE - - .{" "} - setVisibleTab(3)}> - Update the assay ID - {" "} - to resolve. - - ); - - const assayMethodUriCurieError = ( - - The provided assay method URI is not a valid{" "} - - W3 CURIE - - .{" "} - setVisibleTab(3)}> - Update the method URI - {" "} - to resolve. - - ); - const unknownError = ( <> @@ -164,8 +107,6 @@ export const Invalid: React.FC = ({ ); - const CURIE_PATTERN = /^\w[^:]*:.+$/; - const geneElements = fusion.structural_elements.filter(el => el.type === "GeneElement").map(el => { return el.nomenclature }) const findDuplicates = arr => arr.filter((item, index) => arr.indexOf(item) !== index) const duplicateGenes = findDuplicates(geneElements) @@ -193,28 +134,6 @@ export const Invalid: React.FC = ({ if (duplicateGenes.length > 0) { errorElements.push(duplicateGeneError(duplicateGenes)) } - if (fusion.type == "AssayedFusion") { - if ( - !( - fusion.assay && - fusion.assay.assay_name && - fusion.assay.assay_id && - fusion.assay.method_uri - ) - ) { - errorElements.push(noAssayError); - } else { - if (!fusion.assay.assay_id.match(CURIE_PATTERN)) { - errorElements.push(assayIdCurieError); - } - if (!fusion.assay.method_uri.match(CURIE_PATTERN)) { - errorElements.push(assayMethodUriCurieError); - } - } - if (!fusion.causative_event) { - errorElements.push(noEventError); - } - } if (errorElements.length == 0) { errorElements.push( <> diff --git a/client/src/components/Pages/Summary/Readable/Readable.tsx b/client/src/components/Pages/Summary/Readable/Readable.tsx index 1632cf83..291464f2 100644 --- a/client/src/components/Pages/Summary/Readable/Readable.tsx +++ b/client/src/components/Pages/Summary/Readable/Readable.tsx @@ -31,6 +31,9 @@ export const Readable: React.FC = ({ validatedFusion }) => { ); }, [validatedFusion]); + const assayName = fusion.assay?.assay_name ? fusion.assay.assay_name : "" + const assayId = fusion.assay?.assay_id ? `(${fusion.assay.assay_id})` : "" + /** * Render rows specific to assayed fusion fields * @returns React component containing table rows @@ -43,7 +46,7 @@ export const Readable: React.FC = ({ validatedFusion }) => { - {eventDisplayMap[fusion.causative_event.event_type] || ""} + {eventDisplayMap[fusion.causative_event?.event_type] || ""} @@ -52,7 +55,7 @@ export const Readable: React.FC = ({ validatedFusion }) => { Assay - {`${fusion.assay.assay_name} (${fusion.assay.assay_id})`} + {fusion.assay ? `${assayName} ${assayId}` : ""} diff --git a/requirements.txt b/requirements.txt index 9db28ee1..d19c649b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -25,7 +25,7 @@ decorator==5.1.1 executing==1.2.0 fake-useragent==1.1.3 fastapi==0.100.0 -fusor==0.0.28.dev0 +fusor==0.0.30.dev1 ga4gh.vrs==0.8.4 ga4gh.vrsatile.pydantic==0.0.13 gene-normalizer==0.1.39 diff --git a/server/setup.cfg b/server/setup.cfg index 18b8c7fe..df67fa46 100644 --- a/server/setup.cfg +++ b/server/setup.cfg @@ -16,7 +16,7 @@ install_requires = fastapi >= 0.72.0 aiofiles asyncpg - fusor ~= 0.0.28-dev0 + fusor ~= 0.0.30-dev1 sqlparse >= 0.4.2 urllib3 >= 1.26.5 click