From d79aa8497f38dfa51415d1d00690e5b64c4e13a6 Mon Sep 17 00:00:00 2001 From: tsheils Date: Tue, 19 Sep 2023 12:09:11 -0400 Subject: [PATCH 01/50] fix clustering cutoff --- apps/ramp-client/src/app/app.component.ts | 2 +- .../pathway-enrichment.component.ts | 21 +- .../properties-from-metabolites.component.ts | 6 - .../ramp-header/ramp-header.component.html | 2 +- .../ncats-header/ncats-header.component.ts | 3 +- .../complete-dialog.component.html | 3 +- .../header-template.component.html | 2 +- .../header-template.theme.scss | 2 +- .../src/lib/+state/ramp-store/ramp.effects.ts | 2 +- .../src/lib/+state/ramp-store/ramp.reducer.ts | 2 +- .../ramp-store/src/lib/+state/ramp.service.ts | 4 +- nx.json | 2 +- package-lock.json | 50527 +++++----------- package.json | 94 +- 14 files changed, 15522 insertions(+), 35150 deletions(-) diff --git a/apps/ramp-client/src/app/app.component.ts b/apps/ramp-client/src/app/app.component.ts index d04c6fc9..d311a76f 100644 --- a/apps/ramp-client/src/app/app.component.ts +++ b/apps/ramp-client/src/app/app.component.ts @@ -103,7 +103,7 @@ export class AppComponent implements OnInit { ngOnInit() { this.rampFacade.error$.subscribe((error) => { if (error) { - console.log(error); + // console.log(error); /* this.dialog.open(ErrorDialogComponent, { data: { error: error, diff --git a/libs/features/ramp/pathway-enrichment/src/lib/pathway-enrichment/pathway-enrichment.component.ts b/libs/features/ramp/pathway-enrichment/src/lib/pathway-enrichment/pathway-enrichment.component.ts index fa57e9aa..b2b505cd 100644 --- a/libs/features/ramp/pathway-enrichment/src/lib/pathway-enrichment/pathway-enrichment.component.ts +++ b/libs/features/ramp/pathway-enrichment/src/lib/pathway-enrichment/pathway-enrichment.component.ts @@ -162,6 +162,7 @@ export class PathwayEnrichmentComponent .subscribe( (res: any | undefined) => { if (res && res.data) { + if (res.data.length) { this.dataAsDataProperty = res.data.map((enrichment: FisherResult) => { const newObj: { [key: string]: DataProperty } = {}; Object.entries(enrichment).map((value: any, index: any) => { @@ -173,12 +174,23 @@ export class PathwayEnrichmentComponent }); return newObj; }); - this.enrichmentLoading = false; + this.enrichmentLoading = false; - this.allDataAsDataProperty = this.dataAsDataProperty; - this.imageLoading = false; - this.ref.markForCheck(); + this.allDataAsDataProperty = this.dataAsDataProperty; + this.imageLoading = false; + this.ref.markForCheck(); + } else { + const ref: MatDialogRef = this.dialog.open(CompleteDialogComponent, { + data: { + title: 'Pathway', + message: "No enriched pathways found.", + tabs: [ 'Pathways' ] + + } + }) + + } } if (res && res.query) { this.query = res.query; @@ -244,6 +256,7 @@ export class PathwayEnrichmentComponent fetchEnrichment(event: string[]): void { this.inputList = event.map(item => item.toLocaleLowerCase()); + this.image = null; this.rampFacade.dispatch(fetchPathwaysFromAnalytes({ analytes: event })); this.pathwaysLoading = true; this.enrichmentLoading = true; diff --git a/libs/features/ramp/properties-from-metabolites/src/lib/properties-from-metabolites/properties-from-metabolites.component.ts b/libs/features/ramp/properties-from-metabolites/src/lib/properties-from-metabolites/properties-from-metabolites.component.ts index ddb4d028..3653b826 100644 --- a/libs/features/ramp/properties-from-metabolites/src/lib/properties-from-metabolites/properties-from-metabolites.component.ts +++ b/libs/features/ramp/properties-from-metabolites/src/lib/properties-from-metabolites/properties-from-metabolites.component.ts @@ -123,15 +123,9 @@ export class PropertiesFromMetabolitesComponent value: value[1], }); }); - - console.log(obj.iso_smiles) newObj.imageUrl.url = `${ this.route.snapshot.data.renderUrl }(${encodeURIComponent(obj.iso_smiles)})?size=150`; - console.log(newObj.imageUrl.url) - console.log(`${ - this.route.snapshot.data.renderUrl - }(${encodeURI(obj.iso_smiles)})?size=150`) newObj.imageUrl.label = newObj.common_name.value; return newObj; }); diff --git a/libs/features/ramp/ramp-header/src/lib/ramp-header/ramp-header.component.html b/libs/features/ramp/ramp-header/src/lib/ramp-header/ramp-header.component.html index 1439cc5b..297d79aa 100644 --- a/libs/features/ramp/ramp-header/src/lib/ramp-header/ramp-header.component.html +++ b/libs/features/ramp/ramp-header/src/lib/ramp-header/ramp-header.component.html @@ -1,4 +1,4 @@ - +
-

{{data.title}} analysis is now complete. Click on the tabs or below buttons to view the data.

+

{{data.title}} analysis is now complete. Click on the tabs or below buttons to view the data.

+

{{data.message}}



diff --git a/libs/shared/ui/header-template/src/lib/header-template/header-template.component.html b/libs/shared/ui/header-template/src/lib/header-template/header-template.component.html index 291f74c8..26786d1a 100644 --- a/libs/shared/ui/header-template/src/lib/header-template/header-template.component.html +++ b/libs/shared/ui/header-template/src/lib/header-template/header-template.component.html @@ -1,4 +1,4 @@ - +