Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
21 changes: 18 additions & 3 deletions src/components/AssayFactSheet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
<div class="mavedb-assay-facts-section mavedb-assay-facts-bottom-separator">
<div class="mavedb-assay-facts-row">
<div class="mavedb-assay-facts-label">Gene (HGNC symbol)</div>
<div class="mavedb-assay-facts-value">{{ scoreSet.targetGenes[0]?.name }}</div>
<div class="mavedb-assay-facts-value">
{{ geneTextForScoreSet ? geneTextForScoreSet : 'Not specified' }}
</div>
</div>
</div>
<div class="mavedb-assay-facts-section">
Expand Down Expand Up @@ -238,8 +240,7 @@ export default defineComponent({
},

geneAndYear: function () {
// TODO VariantEffect/mavedb-api#450
const gene = this.scoreSet.targetGenes?.[0]?.name
const gene = this.geneTextForScoreSet
const year = this.scoreSet.primaryPublicationIdentifiers[0]?.publicationYear
const parts = [gene, year?.toString()].filter((x) => x != null)
return parts.length > 0 ? parts.join(' ') : undefined
Expand All @@ -253,6 +254,20 @@ export default defineComponent({
return this.scoreSet.primaryPublicationIdentifiers[0]?.publicationJournal
},

distinctGenesForTargets: function () {
// empty when no target genes have mappedHgncName
const geneNames = this.scoreSet.targetGenes?.map((tg) => tg.mappedHgncName) || []
return _.uniq(geneNames.filter((name) => !_.isEmpty(name))) as string[]
},

geneTextForScoreSet: function () {
if (this.distinctGenesForTargets.length == 0) {
return this.scoreSet.targetGenes[0]?.name || null
}

return this.distinctGenesForTargets.length == 1 ? this.distinctGenesForTargets[0] : 'Multiple genes'
},

detectsNmd: function () {
const libraryCreationMethod = this.scoreSet.experiment?.keywords?.find(
(k) => k.keyword.key === 'Variant Library Creation Method'
Expand Down
61 changes: 37 additions & 24 deletions src/schema/openapi.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ export interface paths {
* The index to start from. If None, starts from the beginning.
* limit : Optional[int]
* The maximum number of variants to return. If None, returns all variants.
* namespaces: List[Literal["scores", "counts", "vep", "gnomad"]]
* namespaces: List[Literal["scores", "counts", "vep", "gnomad", "clingen"]]
* The namespaces of all columns except for accession, hgvs_nt, hgvs_pro, and hgvs_splice.
* We may add ClinVar in the future.
* drop_na_columns : bool, optional
Expand Down Expand Up @@ -2708,7 +2708,7 @@ export interface components {
/** Processingstate */
processingState?: string | null;
/** Officialcollections */
officialCollections: components["schemas"]["mavedb__view_models__score_set__OfficialCollection"][];
officialCollections: components["schemas"]["OfficialCollection"][];
};
/**
* ExperimentControlledKeyword
Expand Down Expand Up @@ -3542,6 +3542,15 @@ export interface components {
/** Privatekey */
privateKey: string;
};
/** OfficialCollection */
OfficialCollection: {
/** Badgename */
badgeName: string;
/** Name */
name: string;
/** Urn */
urn: string;
};
/** OrcidUser */
OrcidUser: {
/** Recordtype */
Expand Down Expand Up @@ -4092,11 +4101,11 @@ export interface components {
/** Functionalclassifications */
functionalClassifications?: components["schemas"]["mavedb__view_models__score_calibration__FunctionalClassification"][] | null;
/** Thresholdsources */
thresholdSources?: components["schemas"]["PublicationIdentifier"][] | null;
thresholdSources: components["schemas"]["PublicationIdentifier"][];
/** Classificationsources */
classificationSources?: components["schemas"]["PublicationIdentifier"][] | null;
classificationSources: components["schemas"]["PublicationIdentifier"][];
/** Methodsources */
methodSources?: components["schemas"]["PublicationIdentifier"][] | null;
methodSources: components["schemas"]["PublicationIdentifier"][];
/** Calibrationmetadata */
calibrationMetadata?: Record<string, never> | null;
/** Recordtype */
Expand Down Expand Up @@ -4153,11 +4162,11 @@ export interface components {
/** Functionalclassifications */
functionalClassifications?: components["schemas"]["FunctionalClassificationCreate"][] | null;
/** Thresholdsources */
thresholdSources?: components["schemas"]["PublicationIdentifierCreate"][] | null;
thresholdSources: components["schemas"]["PublicationIdentifierCreate"][];
/** Classificationsources */
classificationSources?: components["schemas"]["PublicationIdentifierCreate"][] | null;
classificationSources: components["schemas"]["PublicationIdentifierCreate"][];
/** Methodsources */
methodSources?: components["schemas"]["PublicationIdentifierCreate"][] | null;
methodSources: components["schemas"]["PublicationIdentifierCreate"][];
/** Calibrationmetadata */
calibrationMetadata?: Record<string, never> | null;
/** Scoreseturn */
Expand All @@ -4184,11 +4193,11 @@ export interface components {
/** Functionalclassifications */
functionalClassifications?: components["schemas"]["SavedFunctionalClassification"][] | null;
/** Thresholdsources */
thresholdSources?: components["schemas"]["SavedPublicationIdentifier"][] | null;
thresholdSources: components["schemas"]["SavedPublicationIdentifier"][];
/** Classificationsources */
classificationSources?: components["schemas"]["SavedPublicationIdentifier"][] | null;
classificationSources: components["schemas"]["SavedPublicationIdentifier"][];
/** Methodsources */
methodSources?: components["schemas"]["SavedPublicationIdentifier"][] | null;
methodSources: components["schemas"]["SavedPublicationIdentifier"][];
/** Calibrationmetadata */
calibrationMetadata?: Record<string, never> | null;
/** Recordtype */
Expand Down Expand Up @@ -4289,7 +4298,7 @@ export interface components {
scoreCalibrations?: components["schemas"]["ScoreCalibration"][] | null;
experiment: components["schemas"]["Experiment"];
/** Officialcollections */
officialCollections: components["schemas"]["mavedb__view_models__score_set__OfficialCollection"][];
officialCollections: components["schemas"]["OfficialCollection"][];
/** Private */
private: boolean;
processingState?: components["schemas"]["ProcessingState"] | null;
Expand Down Expand Up @@ -4714,6 +4723,8 @@ export interface components {
recordType?: string;
targetSequence?: components["schemas"]["SavedTargetSequence"] | null;
targetAccession?: components["schemas"]["SavedTargetAccession"] | null;
/** Mappedhgncname */
mappedHgncName?: string | null;
/** Uniprotidfrommappedmetadata */
uniprotIdFromMappedMetadata?: string | null;
};
Expand Down Expand Up @@ -4920,6 +4931,8 @@ export interface components {
recordType?: string;
targetSequence?: components["schemas"]["TargetSequence"] | null;
targetAccession?: components["schemas"]["TargetAccession"] | null;
/** Mappedhgncname */
mappedHgncName?: string | null;
/** Uniprotidfrommappedmetadata */
uniprotIdFromMappedMetadata?: string | null;
};
Expand Down Expand Up @@ -4952,6 +4965,8 @@ export interface components {
recordType?: string;
targetSequence?: components["schemas"]["TargetSequence"] | null;
targetAccession?: components["schemas"]["TargetAccession"] | null;
/** Mappedhgncname */
mappedHgncName?: string | null;
/** Uniprotidfrommappedmetadata */
uniprotIdFromMappedMetadata?: string | null;
/** Scoreseturn */
Expand Down Expand Up @@ -5756,15 +5771,6 @@ export interface components {
*/
variants?: components["schemas"]["VariantEffectMeasurement"][];
};
/** OfficialCollection */
mavedb__view_models__score_set__OfficialCollection: {
/** Badgename */
badgeName: string;
/** Name */
name: string;
/** Urn */
urn: string;
};
/**
* sequenceString
* @description A character string of Residues that represents a biological sequence using the conventional sequence order (5'-to-3' for nucleic acid sequences, and amino-to-carboxyl for amino acid sequences). IUPAC ambiguity codes are permitted in Sequence Strings.
Expand Down Expand Up @@ -8685,6 +8691,11 @@ export interface operations {
};
/** Get Filter Options For Search */
get_filter_options_for_search_api_v1_score_sets_search_filter_options_post: {
parameters: {
header?: {
"x-active-roles"?: string | null;
};
};
requestBody: {
content: {
"application/json": components["schemas"]["ScoreSetsSearch"];
Expand Down Expand Up @@ -8983,7 +8994,7 @@ export interface operations {
* The index to start from. If None, starts from the beginning.
* limit : Optional[int]
* The maximum number of variants to return. If None, returns all variants.
* namespaces: List[Literal["scores", "counts", "vep", "gnomad"]]
* namespaces: List[Literal["scores", "counts", "vep", "gnomad", "clingen"]]
* The namespaces of all columns except for accession, hgvs_nt, hgvs_pro, and hgvs_splice.
* We may add ClinVar in the future.
* drop_na_columns : bool, optional
Expand All @@ -9005,8 +9016,8 @@ export interface operations {
start?: number;
/** @description Maximum number of variants to return */
limit?: number;
/** @description One or more data types to include: scores, counts, clinVar, gnomAD, VEP */
namespaces?: ("scores" | "counts" | "vep" | "gnomad")[];
/** @description One or more data types to include: scores, counts, ClinGen, gnomAD, VEP */
namespaces?: ("scores" | "counts" | "vep" | "gnomad" | "clingen")[];
drop_na_columns?: boolean | null;
include_custom_columns?: boolean | null;
include_post_mapped_hgvs?: boolean | null;
Expand Down Expand Up @@ -9068,6 +9079,7 @@ export interface operations {
urn: string;
};
};
/** @description Score files, to be uploaded as multipart form data. The `scores_file` is required, while the `counts_file`, `score_columns_metadata`, and `count_columns_metadata` are optional. */
requestBody?: {
content: {
"multipart/form-data": components["schemas"]["Body_upload_score_set_variant_data_api_v1_score_sets__urn__variants_data_post"];
Expand Down Expand Up @@ -9604,6 +9616,7 @@ export interface operations {
urn: string;
};
};
/** @description Score set properties and score files, to be uploaded as multipart form data. All fields here are optional, and only those provided will be updated. */
requestBody?: {
content: {
"multipart/form-data": components["schemas"]["Body_update_score_set_with_variants_api_v1_score_sets_with_variants__urn__patch"];
Expand Down