diff --git a/angular.json b/angular.json index ea330f1..8ea6b18 100644 --- a/angular.json +++ b/angular.json @@ -152,6 +152,11 @@ "glob": "**/*", "input": "projects/website-angular/src/assets", "output": "/assets" + }, + { + "glob": "**/*", + "input": "projects/pathway-browser/src/assets", + "output": "/assets" } ], "styles": ["projects/website-angular/src/styles.scss"], diff --git a/projects/pathway-browser/src/app/details/common/reaction-diagram/reaction-diagram.component.html b/projects/pathway-browser/src/app/details/common/reaction-diagram/reaction-diagram.component.html new file mode 100644 index 0000000..0da0217 --- /dev/null +++ b/projects/pathway-browser/src/app/details/common/reaction-diagram/reaction-diagram.component.html @@ -0,0 +1 @@ +
diff --git a/projects/pathway-browser/src/app/details/common/reaction-diagram/reaction-diagram.component.scss b/projects/pathway-browser/src/app/details/common/reaction-diagram/reaction-diagram.component.scss new file mode 100644 index 0000000..f8def93 --- /dev/null +++ b/projects/pathway-browser/src/app/details/common/reaction-diagram/reaction-diagram.component.scss @@ -0,0 +1,13 @@ +:host { + display: block; + width: 100%; +} + +.reaction-diagram-container { + position: relative; + width: 100%; + height: 500px; + border: 1px solid var(--outline-variant); + border-radius: 8px; + overflow: hidden; +} diff --git a/projects/pathway-browser/src/app/details/common/reaction-diagram/reaction-diagram.component.ts b/projects/pathway-browser/src/app/details/common/reaction-diagram/reaction-diagram.component.ts new file mode 100644 index 0000000..15f8a8e --- /dev/null +++ b/projects/pathway-browser/src/app/details/common/reaction-diagram/reaction-diagram.component.ts @@ -0,0 +1,71 @@ +import { + AfterViewInit, + Component, + ElementRef, + inject, + input, + OnDestroy, + viewChild +} from '@angular/core'; +import {HttpClient} from '@angular/common/http'; +import {Style} from 'reactome-cytoscape-style'; +import cytoscape from 'cytoscape'; +import {Diagram} from '../../../model/diagram.model'; +import {Graph} from '../../../model/graph.model'; +import {DiagramService} from '../../../services/diagram.service'; +import {CONTENT_SERVICE} from '../../../../environments/environment'; + +interface ReactionJson { + diagram: Diagram; + graph: Graph.Data; +} + +@Component({ + selector: 'cr-reaction-diagram', + templateUrl: './reaction-diagram.component.html', + styleUrl: './reaction-diagram.component.scss', +}) +export class ReactionDiagramComponent implements AfterViewInit, OnDestroy { + private http = inject(HttpClient); + private diagramService = inject(DiagramService); + + readonly stId = input.requiredThe requested entity could not be found.
+The requested icon could not be found.
+| Name | +Identifier | +Type | +Compartment | +
|---|---|---|---|
| + {{ entity.displayName || entity.name }} + | +{{ entity.stId }} | +{{ entity.type }} | +{{ entity.compartments }} | +
No interaction data could be found for "{{ acc() }}".
+| Accession | +#Entities | +Reactome Entity | +Confidence Score | +Evidence (IntAct) | +
|---|---|---|---|---|
| + {{ interaction.identifier }} + | +{{ interaction.entitiesCount ?? '' }} | ++ @if (entityMap()[interaction.identifier]; as entities) { + @for (entity of entities; track entity.stId) { + {{ entity.displayName }} + } + } + | +{{ interaction.score | number:'1.3-3' }} | ++ @if (interaction.evidenceURL) { + + {{ interaction.evidenceCount }} pieces of evidence + open_in_new + + } @else { + {{ interaction.evidenceCount }} + } + | +
No interaction partners found.
+