-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add OpenCRAVAT predictor annotations
- Loading branch information
1 parent
0c25c17
commit cce032d
Showing
16 changed files
with
356 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
121 changes: 121 additions & 0 deletions
121
...rc/app/components/variants/open-cravat-annotations/open-cravat-annotations.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
<ng-container *ngIf="openCravatAnnotations && openCravatUrl"> | ||
<nz-card | ||
nzTitle="OpenCRAVAT Annotations" | ||
[nzExtra]="openCravatUrlTemplate"> | ||
<ng-template #openCravatUrlTemplate> | ||
<cvc-link-tag | ||
[href]="openCravatUrl" | ||
tooltip="View on OpenCRAVAT"> | ||
Variant Report | ||
</cvc-link-tag> | ||
</ng-template> | ||
<nz-card-tab> | ||
<nz-tabset | ||
nzSize="small" | ||
[nzAnimated]="true"> | ||
<nz-tab | ||
(nzClick)="tabIndex.next(0)" | ||
nzTitle="Overview"> | ||
</nz-tab> | ||
<nz-tab | ||
(nzClick)="tabIndex.next(1)" | ||
nzTitle="Benignity Details"> | ||
</nz-tab> | ||
<nz-tab | ||
(nzClick)="tabIndex.next(2)" | ||
nzTitle="Pathogenicity Details"></nz-tab> | ||
</nz-tabset> | ||
</nz-card-tab> | ||
<ng-container [ngSwitch]="tabIndex | async"> | ||
<!-- Overview tab --> | ||
<ng-container *ngSwitchCase="0"> | ||
<div nz-row [nzGutter]="8"> | ||
<div nz-col nzXs="24" nzSm="24" nzMd="24" nzLg="12" nzXl="12"> | ||
<nz-card nzTitle="ACMG/AMP Benign (BP4)" nzSize="small"> | ||
@if ((openCravatAnnotations.benignity_counts|keyvalue).length === 0) { | ||
<div nz-typography nzType="secondary"> | ||
No Annotations | ||
</div> | ||
} | ||
@for (keypar of openCravatAnnotations.benignity_counts|keyvalue; track keypar.key) { | ||
<div | ||
nz-tooltip | ||
nzTooltipPlacement="topLeft" | ||
[nzTooltipTitle]="openCravatAnnotations.benignity_counts_details[keypar.key+''].join(', ')"> | ||
{{ keypar.key }} ({{ keypar.value }}) | ||
</div> | ||
} | ||
</nz-card> | ||
</div> | ||
<div nz-col nzXs="24" nzSm="24" nzMd="24" nzLg="12" nzXl="12"> | ||
<nz-card nzTitle="ACMG/AMP Pathogenic (PP3)" nzSize="small"> | ||
@if ((openCravatAnnotations.pathogenicity_counts|keyvalue).length === 0) { | ||
<div> | ||
None | ||
</div> | ||
} | ||
@for (keypar of openCravatAnnotations.pathogenicity_counts|keyvalue; track keypar.key) { | ||
<div | ||
nz-tooltip | ||
nzTooltipPlacement="topLeft" | ||
[nzTooltipTitle]="openCravatAnnotations.pathogenicity_counts_details[keypar.key+''].join(', ')"> | ||
{{ keypar.key }} ({{ keypar.value }}) | ||
</div> | ||
} | ||
</nz-card> | ||
</div> | ||
</div> | ||
</ng-container> | ||
<!-- Benignity tab --> | ||
<ng-container *ngSwitchCase="1"> | ||
<nz-table | ||
[nzData]="['.']" | ||
[nzFrontPagination]="false" | ||
[nzShowPagination]="false" | ||
nzSize="small"> | ||
<thead> | ||
<tr> | ||
<th>Predictor</th> | ||
<th>Annotation</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@for (keypar of openCravatAnnotations.benignity|keyvalue; track keypar.key) { | ||
<tr> | ||
<td>{{ keypar.key }}</td> | ||
<td> | ||
{{ keypar.value | ifEmpty : '--' }} | ||
</td> | ||
</tr> | ||
} | ||
</tbody> | ||
</nz-table> | ||
</ng-container> | ||
<!-- Pathogenicity tab --> | ||
<ng-container *ngSwitchCase="2"> | ||
<nz-table | ||
[nzData]="['.']" | ||
[nzFrontPagination]="false" | ||
[nzShowPagination]="false" | ||
nzSize="small"> | ||
<thead> | ||
<tr> | ||
<th>Predictor</th> | ||
<th>Annotation</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
@for (keypar of openCravatAnnotations.pathogenicity|keyvalue; track keypar.key) { | ||
<tr> | ||
<td>{{ keypar.key }}</td> | ||
<td> | ||
{{ keypar.value | ifEmpty : '--' }} | ||
</td> | ||
</tr> | ||
} | ||
</tbody> | ||
</nz-table> | ||
</ng-container> | ||
</ng-container> | ||
</nz-card> | ||
</ng-container> |
15 changes: 15 additions & 0 deletions
15
...rc/app/components/variants/open-cravat-annotations/open-cravat-annotations.component.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
:host { | ||
display: block; | ||
} | ||
|
||
nz-card { | ||
width: 100%; | ||
} | ||
|
||
.key-col { | ||
text-align: right; | ||
font-weight: bold; | ||
} | ||
.button-col { | ||
text-align: right; | ||
} |
26 changes: 26 additions & 0 deletions
26
.../src/app/components/variants/open-cravat-annotations/open-cravat-annotations.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Component, Input, OnDestroy } from '@angular/core' | ||
import { Maybe } from '@app/generated/civic.apollo' | ||
import { BehaviorSubject } from 'rxjs' | ||
|
||
@Component({ | ||
selector: 'cvc-open-cravat-annotations', | ||
templateUrl: './open-cravat-annotations.component.html', | ||
styleUrls: ['./open-cravat-annotations.component.less'], | ||
}) | ||
export class CvcOpenCravatAnnotationsComponent implements OnDestroy { | ||
@Input() openCravatAnnotations: any | ||
@Input() openCravatUrl: Maybe<string> | ||
|
||
tabIndex = new BehaviorSubject<number>(0) | ||
|
||
constructor() { | ||
} | ||
|
||
tabChange(index: number): void { | ||
this.tabIndex.next(index) | ||
} | ||
|
||
ngOnDestroy(): void { | ||
this.tabIndex.unsubscribe() | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
client/src/app/components/variants/open-cravat-annotations/open-cravat-annotations.module.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { NgModule } from '@angular/core' | ||
import { CommonModule } from '@angular/common' | ||
import { CvcOpenCravatAnnotationsComponent } from './open-cravat-annotations.component' | ||
import { NzTabsModule } from 'ng-zorro-antd/tabs' | ||
import { NzCardModule } from 'ng-zorro-antd/card' | ||
import { NzGridModule } from 'ng-zorro-antd/grid' | ||
import { NzTableModule } from 'ng-zorro-antd/table' | ||
import { CvcPipesModule } from '@app/core/pipes/pipes.module' | ||
import { CvcLinkTagModule } from '@app/components/shared/link-tag/link-tag.module' | ||
import { NzToolTipModule } from 'ng-zorro-antd/tooltip' | ||
import { CvcEmptyValueModule } from '@app/forms/components/empty-value/empty-value.module' | ||
import { NzTypographyModule } from 'ng-zorro-antd/typography' | ||
|
||
@NgModule({ | ||
declarations: [CvcOpenCravatAnnotationsComponent], | ||
imports: [ | ||
CommonModule, | ||
NzTabsModule, | ||
NzTableModule, | ||
NzCardModule, | ||
NzToolTipModule, | ||
NzGridModule, | ||
NzTypographyModule, | ||
CvcLinkTagModule, | ||
CvcPipesModule, | ||
], | ||
exports: [CvcOpenCravatAnnotationsComponent], | ||
}) | ||
export class CvcOpenCravatAnnotationsModule {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.