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

Change top level genes/fusions/factors resolver to add configurable status filter #1145

Merged
merged 6 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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 @@ -7,7 +7,7 @@ import {
MolecularProfileConnection,
MolecularProfileMenuQueryVariables,
MolecularProfileMenuGQL,
MolecularProfileDisplayFilter,
AssociatedEvidenceStatusFilter,
} from '@app/generated/civic.apollo'
import { map, debounceTime, filter, startWith } from 'rxjs/operators'
import { Observable, Subject } from 'rxjs'
Expand All @@ -32,8 +32,8 @@ export class CvcMolecularProfilesMenuComponent implements OnInit {
loading$?: Observable<boolean>;

mpNameFilter: Maybe<string>
statusFilter: MolecularProfileDisplayFilter =
MolecularProfileDisplayFilter.All
statusFilter: AssociatedEvidenceStatusFilter =
AssociatedEvidenceStatusFilter.All

private debouncedQuery = new Subject<void>()
private result$!: Observable<ApolloQueryResult<MolecularProfileMenuQuery>>
Expand Down Expand Up @@ -91,7 +91,7 @@ export class CvcMolecularProfilesMenuComponent implements OnInit {
this.debouncedQuery.next()
}

onMolecularProfileStatusFilterChanged(filter: MolecularProfileDisplayFilter) {
onMolecularProfileStatusFilterChanged(filter: AssociatedEvidenceStatusFilter) {
this.queryRef$.refetch({
first: this.pageSize,
evidenceStatusFilter: filter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ query MolecularProfileMenu(
$last: Int
$before: String
$after: String
$evidenceStatusFilter: MolecularProfileDisplayFilter
$evidenceStatusFilter: AssociatedEvidenceStatusFilter
) {
molecularProfiles(
geneId: $geneId
Expand Down
33 changes: 17 additions & 16 deletions client/src/app/generated/civic.apollo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,17 @@ export enum AssertionType {
Prognostic = 'PROGNOSTIC'
}

export enum AssociatedEvidenceStatusFilter {
/** Display all molecular profiles regardless of attached evidence status. */
All = 'ALL',
/** Display only molecular profiles which have at least one accepted evidence item. */
WithAccepted = 'WITH_ACCEPTED',
/** Display only molecular profiles which have evidence in either an accepted or submitted state. */
WithAcceptedOrSubmitted = 'WITH_ACCEPTED_OR_SUBMITTED',
/** Display molecular profiles which have at least one submitted evidence item. */
WithSubmitted = 'WITH_SUBMITTED'
}

export enum BooleanOperator {
And = 'AND',
Or = 'OR'
Expand Down Expand Up @@ -3965,17 +3976,6 @@ export enum MolecularProfileDeprecationReasonMutationInput {
Other = 'OTHER'
}

export enum MolecularProfileDisplayFilter {
/** Display all molecular profiles regardless of attached evidence status. */
All = 'ALL',
/** Display only molecular profiles which have at least one accepted evidence item. */
WithAccepted = 'WITH_ACCEPTED',
/** Display only molecular profiles which have evidence in either an accepted or submitted state. */
WithAcceptedOrSubmitted = 'WITH_ACCEPTED_OR_SUBMITTED',
/** Display molecular profiles which have at least one submitted evidence item. */
WithSubmitted = 'WITH_SUBMITTED'
}

/** An edge in a connection. */
export type MolecularProfileEdge = {
__typename: 'MolecularProfileEdge';
Expand Down Expand Up @@ -5280,6 +5280,7 @@ export type QueryFactorArgs = {
export type QueryFactorsArgs = {
after?: InputMaybe<Scalars['String']['input']>;
before?: InputMaybe<Scalars['String']['input']>;
evidenceStatusFilter?: InputMaybe<AssociatedEvidenceStatusFilter>;
first?: InputMaybe<Scalars['Int']['input']>;
last?: InputMaybe<Scalars['Int']['input']>;
name?: InputMaybe<Array<Scalars['String']['input']>>;
Expand Down Expand Up @@ -5324,8 +5325,7 @@ export type QueryFusionArgs = {
export type QueryFusionsArgs = {
after?: InputMaybe<Scalars['String']['input']>;
before?: InputMaybe<Scalars['String']['input']>;
entrezIds?: InputMaybe<Array<Scalars['Int']['input']>>;
entrezSymbols?: InputMaybe<Array<Scalars['String']['input']>>;
evidenceStatusFilter?: InputMaybe<AssociatedEvidenceStatusFilter>;
first?: InputMaybe<Scalars['Int']['input']>;
genePartnerId?: InputMaybe<Scalars['Int']['input']>;
last?: InputMaybe<Scalars['Int']['input']>;
Expand All @@ -5343,6 +5343,7 @@ export type QueryGenesArgs = {
before?: InputMaybe<Scalars['String']['input']>;
entrezIds?: InputMaybe<Array<Scalars['Int']['input']>>;
entrezSymbols?: InputMaybe<Array<Scalars['String']['input']>>;
evidenceStatusFilter?: InputMaybe<AssociatedEvidenceStatusFilter>;
first?: InputMaybe<Scalars['Int']['input']>;
last?: InputMaybe<Scalars['Int']['input']>;
};
Expand All @@ -5357,7 +5358,7 @@ export type QueryMolecularProfilesArgs = {
after?: InputMaybe<Scalars['String']['input']>;
alleleRegistryId?: InputMaybe<Scalars['String']['input']>;
before?: InputMaybe<Scalars['String']['input']>;
evidenceStatusFilter?: InputMaybe<MolecularProfileDisplayFilter>;
evidenceStatusFilter?: InputMaybe<AssociatedEvidenceStatusFilter>;
featureId?: InputMaybe<Scalars['Int']['input']>;
first?: InputMaybe<Scalars['Int']['input']>;
geneId?: InputMaybe<Scalars['Int']['input']>;
Expand Down Expand Up @@ -8273,7 +8274,7 @@ export type MolecularProfileMenuQueryVariables = Exact<{
last?: InputMaybe<Scalars['Int']['input']>;
before?: InputMaybe<Scalars['String']['input']>;
after?: InputMaybe<Scalars['String']['input']>;
evidenceStatusFilter?: InputMaybe<MolecularProfileDisplayFilter>;
evidenceStatusFilter?: InputMaybe<AssociatedEvidenceStatusFilter>;
}>;


Expand Down Expand Up @@ -14397,7 +14398,7 @@ export const BrowseMolecularProfilesDocument = gql`
}
}
export const MolecularProfileMenuDocument = gql`
query MolecularProfileMenu($geneId: Int, $featureId: Int, $mpName: String, $first: Int, $last: Int, $before: String, $after: String, $evidenceStatusFilter: MolecularProfileDisplayFilter) {
query MolecularProfileMenu($geneId: Int, $featureId: Int, $mpName: String, $first: Int, $last: Int, $before: String, $after: String, $evidenceStatusFilter: AssociatedEvidenceStatusFilter) {
molecularProfiles(
geneId: $geneId
featureId: $featureId
Expand Down
65 changes: 35 additions & 30 deletions client/src/app/generated/server.model.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -796,6 +796,28 @@ enum AssertionType {
PROGNOSTIC
}

enum AssociatedEvidenceStatusFilter {
"""
Display all molecular profiles regardless of attached evidence status.
"""
ALL

"""
Display only molecular profiles which have at least one accepted evidence item.
"""
WITH_ACCEPTED

"""
Display only molecular profiles which have evidence in either an accepted or submitted state.
"""
WITH_ACCEPTED_OR_SUBMITTED

"""
Display molecular profiles which have at least one submitted evidence item.
"""
WITH_SUBMITTED
}

enum BooleanOperator {
AND
OR
Expand Down Expand Up @@ -6978,28 +7000,6 @@ enum MolecularProfileDeprecationReasonMutationInput {
OTHER
}

enum MolecularProfileDisplayFilter {
"""
Display all molecular profiles regardless of attached evidence status.
"""
ALL

"""
Display only molecular profiles which have at least one accepted evidence item.
"""
WITH_ACCEPTED

"""
Display only molecular profiles which have evidence in either an accepted or submitted state.
"""
WITH_ACCEPTED_OR_SUBMITTED

"""
Display molecular profiles which have at least one submitted evidence item.
"""
WITH_SUBMITTED
}

"""
An edge in a connection.
"""
Expand Down Expand Up @@ -8946,6 +8946,11 @@ type Query {
"""
before: String

"""
Limit genes by the status of attached evidence.
"""
evidenceStatusFilter: AssociatedEvidenceStatusFilter

"""
Returns the first _n_ elements from the list.
"""
Expand Down Expand Up @@ -9048,14 +9053,9 @@ type Query {
before: String

"""
List of Entrez Gene IDs to return results for
Limit genes by the status of attached evidence.
"""
entrezIds: [Int!]

"""
List of Entrez Gene symbols to return results for
"""
entrezSymbols: [String!]
evidenceStatusFilter: AssociatedEvidenceStatusFilter

"""
Returns the first _n_ elements from the list.
Expand Down Expand Up @@ -9102,6 +9102,11 @@ type Query {
"""
entrezSymbols: [String!]

"""
Limit genes by the status of attached evidence.
"""
evidenceStatusFilter: AssociatedEvidenceStatusFilter

"""
Returns the first _n_ elements from the list.
"""
Expand Down Expand Up @@ -9140,7 +9145,7 @@ type Query {
"""
Limit molecular profiles by the status of attached evidence.
"""
evidenceStatusFilter: MolecularProfileDisplayFilter
evidenceStatusFilter: AssociatedEvidenceStatusFilter

"""
Filter molecular profiles to the CIViC ID of the feature(s) involved.
Expand Down
Loading
Loading