Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features fusions #1114

Merged
merged 60 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
6cdfba7
initial migration of coordinates to their own table
acoffman Mar 27, 2024
c31c997
update gql queries to match new coordinate schema
acoffman Mar 28, 2024
341ae16
Merge branch 'features' into features-fusions
acoffman Mar 28, 2024
b68e2dc
Merge branch 'features' into features-fusions
acoffman Mar 29, 2024
527e34a
get coordinate display and form model working with new schema
acoffman Mar 29, 2024
afc99c3
initial migration of coordinates to their own table
acoffman Mar 27, 2024
63cf210
update gql queries to match new coordinate schema
acoffman Mar 28, 2024
4128418
get coordinate display and form model working with new schema
acoffman Mar 29, 2024
51e95f5
Merge branch 'features-fusions' of github.com:griffithlab/civic-v2 in…
acoffman Apr 2, 2024
e92ade0
revision suggestions working with variant coordinate model
acoffman Apr 2, 2024
597ad2e
wip: pull back multiple coordinate types for revisions
acoffman Apr 17, 2024
3ebef88
query the server for variant specific coordinate subtypes and ids on …
acoffman Apr 24, 2024
b9f7d58
wip add fusion models
acoffman May 15, 2024
5b74e32
Add mutation for creating fusion feature
susannasiebert Jun 14, 2024
2525460
create fusions mutation working
acoffman Jun 17, 2024
0cd7238
display fusion features, alllow deprecation
acoffman Jun 18, 2024
b747793
intitial fusion select form logic/model
acoffman Jun 19, 2024
e6d9d48
fusion select/create hooked up + validations
acoffman Jun 20, 2024
167ac64
fusion variant creation form working, mp name generation handles fusions
acoffman Jul 3, 2024
8d96837
fusion variant creation form is aware of gene partner status
acoffman Jul 8, 2024
c592c28
coordinate card working on fusion display
acoffman Jul 9, 2024
a18282d
fusions menu on gene feature pages
acoffman Jul 9, 2024
bc28f04
remove hardcoded login
acoffman Jul 18, 2024
56f7a64
fix a couple of strings
acoffman Jul 19, 2024
bc31595
attempt to backfill new coordinate type
acoffman Jul 26, 2024
14849fa
introduce exon coordinate type
acoffman Jul 26, 2024
921e77c
More updates to the backfill script
susannasiebert Aug 6, 2024
b9d6afb
background job to fill coordinates
acoffman Aug 7, 2024
36b6e44
additional tweaks to fusion coordinate fill script
acoffman Aug 7, 2024
5d6d61e
Display exon coordinates on fusion variant pages
susannasiebert Aug 7, 2024
fbc939a
initial fusions revision form
acoffman Aug 8, 2024
ae42a96
Display VICC compliant name
susannasiebert Aug 8, 2024
f2d2f0a
Add a few more TODOs to the port_fusion_coords script
susannasiebert Aug 8, 2024
242f541
Implement fusion feature revision submission
susannasiebert Aug 9, 2024
bcc644a
Name representative variant for Fusions with an unknown fusion partne…
susannasiebert Aug 12, 2024
8af6477
Fix error with fusion feature creation due to usage of in_revision_va…
susannasiebert Aug 12, 2024
a3b2596
Fix some bugs in the variant creation introduced with ExonCoordinate …
susannasiebert Aug 12, 2024
e227cb9
retry fragment read with subtype on cache miss
acoffman Aug 12, 2024
edeca18
validate transcript ids match expected ensembl format
acoffman Aug 12, 2024
d3cf584
flag variants when there is an issue backfilling coordinates
acoffman Aug 12, 2024
2b6470c
stub in coordinate fields for default bucket fusions
acoffman Aug 12, 2024
4de9386
fusion revision submission working
acoffman Aug 12, 2024
4a3b42e
remove hgvs and clinvar ids from fusion variant type
acoffman Aug 12, 2024
78f6ef8
remove clinvar ids from fusions on mp card
acoffman Aug 12, 2024
68a43f7
accepting fusion coordinate revisions is working
acoffman Aug 13, 2024
cb4c7b5
add fusion filter to feature browse table
acoffman Aug 13, 2024
48266d2
remove rearrangement fusion naming logic
acoffman Aug 14, 2024
76abf45
fix failing test case
acoffman Aug 14, 2024
dc9544f
Merge branch 'main' into features-fusions
acoffman Sep 14, 2024
bee7cd9
fix typo in tooltip message
acoffman Sep 16, 2024
0d7e4f5
pass in representative fusion name
acoffman Sep 16, 2024
236a0ce
strip whitespace from transcript ids on input
acoffman Sep 16, 2024
e1534fd
update query example to work with new coordinate schema
acoffman Sep 16, 2024
5cec74a
update backfill script
acoffman Sep 16, 2024
40af6e3
remove hgvs/clinvar entry id validation until we determine what to do…
acoffman Sep 16, 2024
b2b5e9a
pull back deprecated status in one more place
acoffman Sep 16, 2024
b39a1da
add open revision counts to the individual revision tabs
acoffman Sep 16, 2024
00bf230
re-enable indexing on variants
acoffman Sep 16, 2024
2bdc268
fix typos to make codespell happy
acoffman Sep 16, 2024
d62b6bb
coordinates are revisable
acoffman Sep 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,16 @@

<!-- subject -->
<ng-container
*ngIf="tagDisplay != 'hideSubject' && event.subject as subject">
*ngIf="tagDisplay != 'hideSubject' && event.subject as subject">
@switch (subject.__typename) {
@case ('Feature') {
<cvc-feature-tag
[feature]="subject"></cvc-feature-tag>
<cvc-feature-tag [feature]="subject"></cvc-feature-tag>
}
@case ('Assertion') {
<cvc-assertion-tag
[assertion]="subject"></cvc-assertion-tag>
<cvc-assertion-tag [assertion]="subject"></cvc-assertion-tag>
}
@case ('EvidenceItem') {
<cvc-evidence-tag
[evidence]="subject"></cvc-evidence-tag>
<cvc-evidence-tag [evidence]="subject"></cvc-evidence-tag>
}
@case ('GeneVariant') {
<cvc-feature-variant-tag
Expand All @@ -86,9 +83,12 @@
<cvc-feature-variant-tag
[variant]="subject"></cvc-feature-variant-tag>
}
@case ('FusionVariant') {
<cvc-feature-variant-tag
[variant]="subject"></cvc-feature-variant-tag>
}
@case ('Revision') {
<cvc-revision-tag
[revision]="$any(subject)"></cvc-revision-tag>
<cvc-revision-tag [revision]="$any(subject)"></cvc-revision-tag>
}
@case ('VariantGroup') {
<cvc-variant-group-tag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,10 @@
[nzValue]="featureTypes.Factor"
nzLabel="Factor">
</nz-option>
<nz-option
[nzValue]="featureTypes.Fusion"
nzLabel="Fusion">
</nz-option>
</nz-select>
</th>
<th>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,183 @@
<nz-row [nzGutter]="[8, 16]">
<nz-col nzSpan="12">
<!-- LEFT COLUMN -->
<nz-row [nzGutter]="[8, 8]">
<!-- fusion description, sources block -->
<nz-col nzSpan="24">
<!-- description, sources -->
<nz-descriptions
nzLayout="vertical"
nzSize="small"
nzBordered="true"
[nzColumn]="1">
<!-- description -->
<nz-descriptions-item nzTitle="Description">
<p
*ngIf="fusion.description; else noDescription"
nz-typography
nzEllipsis
nzExpandable
[nzEllipsisRows]="8">
{{ fusion.description }}
</p>

<!-- noDescription Tpl -->
<ng-template #noDescription>
<cvc-empty-revisable notification="No description provided">
</cvc-empty-revisable>
</ng-template>
</nz-descriptions-item>
</nz-descriptions>
</nz-col>

<!-- sources, aliases, resource block -->
<nz-col nzSpan="24">
<nz-descriptions
nzLayout="horizontal"
nzSize="small"
[nzColumn]="1"
nzBordered="true">
<!-- sources -->
<nz-descriptions-item nzTitle="Sources">
<ng-container *ngIf="fusion.sources.length > 0; else noSources">
<cvc-tag-list>
<cvc-source-tag
*ngFor="let source of fusion.sources"
[source]="source"></cvc-source-tag>
</cvc-tag-list>
</ng-container>
<ng-template #noSources>
<span
nz-typography
nzType="secondary"
>None specified</span
>
</ng-template>
</nz-descriptions-item>

<!-- aliases -->
<nz-descriptions-item nzTitle="Aliases">
<ng-container
*ngIf="fusion.featureAliases.length > 0; else noAliases">
<nz-tag *ngFor="let alias of fusion.featureAliases">{{
alias
}}</nz-tag>
</ng-container>
</nz-descriptions-item>
<ng-template #noAliases>
<span
nz-typography
nzType="secondary"
>None specified</span
>
</ng-template>
</nz-descriptions>
</nz-col>
</nz-row>
</nz-col>

<!-- last revision submitted/accepted, mygeneinfo col -->
<nz-col nzSpan="12">
<!-- BLOCK: creation and deprecation events -->
<nz-descriptions
nzLayout="vertical"
nzSize="small"
[nzColumn]="{ xxl: 2, xl: 2, lg: 1, md: 1, sm: 1, xs: 1 }"
nzBordered="true">
<!-- creation/deprecation curation events -->
<ng-container *ngIf="fusion.creationActivity">
<nz-descriptions-item [nzTitle]="createdTitle">
by
<cvc-user-tag [user]="fusion.creationActivity.user"></cvc-user-tag>
</nz-descriptions-item>
<ng-template #createdTitle>
Created
<span
nz-typography
nzType="secondary">
({{ fusion.creationActivity.createdAt | timeAgo }})
</span>
</ng-template>
</ng-container>
<ng-container *ngIf="fusion.deprecationActivity">
<nz-descriptions-item [nzTitle]="deprecatedTitle">
by
<cvc-user-tag [user]="fusion.deprecationActivity.user"></cvc-user-tag>
</nz-descriptions-item>
<ng-template #deprecatedTitle>
Deprecated
<span
nz-typography
nzType="secondary">
({{ fusion.deprecationActivity.createdAt | timeAgo }})
</span>
</ng-template>
</ng-container>
</nz-descriptions>
<br />
</nz-col>
</nz-row>
<nz-row [nzGutter]="[8, 16]">
<!-- Five Prime Partner -->
<nz-col nzSpan="12">
<nz-card
*ngIf="fusion.fivePrimeGene"
nzTitle="5' Partner"
[nzExtra]="fivePrimeExtra">
<cvc-gene-base-summary
*ngIf="fusion.fivePrimeGene"
[gene]="fusion.fivePrimeGene"></cvc-gene-base-summary>
<ng-template #fivePrimeExtra>
<cvc-feature-tag [feature]="fusion.fivePrimeGene"></cvc-feature-tag>
</ng-template>
</nz-card>
<nz-card
*ngIf="!fusion.fivePrimeGene"
nzTitle="5' Partner"
[nzExtra]="fusion.fivePrimePartnerStatus | enumToTitle">
<ng-container
*ngTemplateOutlet="
partnerStatusDescription;
context: { $implicit: fusion.fivePrimePartnerStatus }
">
</ng-container>
</nz-card>
</nz-col>
<!-- Three Prime Partner -->
<nz-col nzSpan="12">
<nz-card
*ngIf="fusion.threePrimeGene"
nzTitle="3' Partner"
[nzExtra]="threePrimeExtra">
<cvc-gene-base-summary
*ngIf="fusion.threePrimeGene"
[gene]="fusion.threePrimeGene"></cvc-gene-base-summary>
<ng-template #threePrimeExtra>
<cvc-feature-tag [feature]="fusion.threePrimeGene"></cvc-feature-tag>
</ng-template>
</nz-card>
<nz-card
*ngIf="!fusion.threePrimeGene"
nzTitle="3' Partner"
[nzExtra]="fusion.threePrimePartnerStatus | enumToTitle">
<ng-container
*ngTemplateOutlet="
partnerStatusDescription;
context: { $implicit: fusion.threePrimePartnerStatus }
">
</ng-container>
</nz-card>
<ng-template
#partnerStatusDescription
let-status>
@switch (status) {
@case ('MULTIPLE') {
There are Multiple possible fusion partners.
}
@case ('UNKNOWN') {
The fusion partner is unknown.
}
}
</ng-template>
</nz-col>
</nz-row>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@import "themes/overrides/descriptions-overrides.less";
:host {
display: block;
}

nz-space,
nz-space-item {
width: 100%;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import { CommonModule } from '@angular/common'
import { Component, Input, OnInit } from '@angular/core'
import { CvcEmptyRevisableModule } from '@app/components/shared/empty-revisable/empty-revisable.module'
import { CvcLinkTagModule } from '@app/components/shared/link-tag/link-tag.module'
import { CvcTagListModule } from '@app/components/shared/tag-list/tag-list.module'
import { CvcSourceTagModule } from '@app/components/sources/source-tag/source-tag.module'

import {
FusionSummaryFieldsFragment,
SubscribableEntities,
SubscribableInput,
} from '@app/generated/civic.apollo'
import { NzDescriptionsModule } from 'ng-zorro-antd/descriptions'
import { NzGridModule } from 'ng-zorro-antd/grid'
import { NzSpaceModule } from 'ng-zorro-antd/space'
import { NzTagModule } from 'ng-zorro-antd/tag'
import { NzTypographyModule } from 'ng-zorro-antd/typography'
import { CvcPipesModule } from '@app/core/pipes/pipes.module'
import { CvcUserTagModule } from '@app/components/users/user-tag/user-tag.module'
import { CvcGeneBaseSummaryComponent } from '@app/components/genes/gene-base-summary/gene-base-summary.page'
import { NzCardModule } from 'ng-zorro-antd/card'
import { CvcFeatureTagModule } from '@app/components/features/feature-tag/feature-tag.module'

@Component({
standalone: true,
selector: 'cvc-fusion-summary',
templateUrl: './fusion-summary.page.html',
styleUrls: ['./fusion-summary.page.less'],
imports: [
CommonModule,
NzGridModule,
NzDescriptionsModule,
NzTypographyModule,
NzSpaceModule,
NzTagModule,
NzCardModule,
CvcEmptyRevisableModule,
CvcTagListModule,
CvcSourceTagModule,
CvcLinkTagModule,
CvcPipesModule,
CvcUserTagModule,
CvcGeneBaseSummaryComponent,
CvcFeatureTagModule,
],
})
export class FusionSummaryComponent implements OnInit {
@Input() fusion!: FusionSummaryFieldsFragment
@Input() featureId!: number

subscribableEntity?: SubscribableInput

ngOnInit() {
if (this.fusion == undefined) {
throw new Error('Must pass a Fusion into fusion summary')
} else if (this.featureId === undefined) {
throw new Error('Must pass a feature id into fusion summary')
} else {
this.subscribableEntity = {
id: this.featureId,
entityType: SubscribableEntities.Feature,
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<nz-spin [nzSpinning]="loading$ | ngrxPush">
<ng-container *ngIf="menuFusions$ | ngrxPush as fusions">
<nz-card [nzTitle]="cardTitle">
<ng-template #cardTitle>
<ng-container *ngIf="totalFusions$ | ngrxPush as total">
<span
nz-typography
nzType="secondary"
>{{ total }} Total</span
>
<span
nz-typography
*ngIf="total > fusions.length"
nzType="secondary"
>({{ fusions.length }} displayed)</span
>
</ng-container>
</ng-template>

<nz-row>
<nz-col nzSpan="24">
<cvc-tag-list size="sm">
<ng-container *ngFor="let fusion of fusions">
<cvc-feature-tag
*ngIf="fusion"
[feature]="fusion"></cvc-feature-tag>
</ng-container>
</cvc-tag-list>
</nz-col>
</nz-row>
<ng-container *ngIf="pageInfo$ | ngrxPush as pageInfo">
<nz-row
id="load-more-btn"
*ngIf="pageInfo.hasNextPage && pageInfo.endCursor">
<button
nz-button
nzType="default"
nzSize="small"
style="width: 95%"
(click)="fetchMore(pageInfo.endCursor)">
Load More
</button>
<nz-select
[(ngModel)]="this.pageSize"
style="width: 5%"
nzSize="small">
<nz-option
nzLabel="50"
[nzValue]="50"></nz-option>
<nz-option
nzLabel="100"
[nzValue]="100"></nz-option>
<nz-option
nzLabel="300"
[nzValue]="300"></nz-option>
</nz-select>
</nz-row>
</ng-container>
</nz-card>
</ng-container>
</nz-spin>

Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@import "themes/global-variables.less";

:host {
display: block;
}

#variant-filters {
// need to specify a width to the filters form, or the name filter
// input will change its width depending on if its nameInputClearTpl is displayed
// displayed
#name-filter-group {
width: 175px;
}
// all form items get a right margin which creates an unsightly gap on the right :(
// so we remove that here
nz-form-item:last-child {
margin-right: 0;
}
}

#load-more-btn {
// apply the same margin to the button row as the card margin
margin-top: @default-padding-sm;
}
Loading
Loading