Skip to content

Commit

Permalink
Merge tag 'gene_4.9' into dev
Browse files Browse the repository at this point in the history
* tag 'gene_4.9': (77 commits)
  Fix // double forward-slash problem in URL.
  No longer override host for gene2pheno and geneinfo (hardcoded to point to Mosaic server).
  #1035 - Fix code so that we only get the Mosaic variant when necessary. That is, we only call the function promiseGetMosaicVariant when the user has selected a variant and there is at least one Mosaic annotation that has been checked.
  Resolved the changes requested#1036
  Backout code that attempted to create a hub session when gene is in iframe in clin.iobio. This won't work as iframe does not share parent's session.
  #1035 When gene is within clin.iobio, launched from Mosaic, initalize a hub session and load the Mosaic variant annotation map so that checkboxes for Mosaic variant annotations appear in 'Select custom annotations' dialog
  Fixed the mosaic annots not updated#1035
  Cleaned up the code for debugging
  Fixed cancel button behavior#1027
  Fixed the order of showing annots case sensitive and alphabetically#1025
  #1029 If INFO or FORMAT header rec cannot be parsed, print message to console about field being bypassed. Fix bug that was returning previous record when match failed.
  The style was not scoped to just this Gene Associations Dialog. Fix by adding parent container selector.
  Make Edit Filter dialog shorter so that it will fit in frame of gene.iobio in clin.iobio. See #1031
  Fixed the buttons not showing in clin.#1031 Add an id at runtime to the dialog so that the styling is scoped to the Edit Filter dialog.
  Don't show all of the search hits in the Variants side panel when launched w/i clin.iobio #1023 - Also sort the entries so that lowest ranks appear first.
  The phenolyzer search hits don't show on dialog 'Show more' when gene.iobio runs w/i clin.iobio #1024
  Fixed the regular expression to show SAC#1029
  Need more height for Gene disease associations in Gene-Phenotype associations dialog. #1022
  The annotation values in the format field of the vcf are not showing. #1028
  For selecting custom annotations, simplify code by removing of unnecessary data fields #1026 - Get rid of data field selectedInfo. Instead pass property selectedVariantInfo into SelectVariantAnnotationsDialog and emit the dialogs event, passing the event parameter directly in the emit that will be received by GeneHome.
  ...

# Conflicts:
#	client/app/components/pages/GeneHome.vue
#	client/app/globals/GlobalApp.js
#	package.json
  • Loading branch information
tonydisera committed Jan 2, 2024
2 parents 703d273 + 275ffcd commit beb9394
Show file tree
Hide file tree
Showing 31 changed files with 1,780 additions and 424 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ exhibit-pattern.20b9de6cf0b5bc0e3cb4175cdc9959ee.png
.env
env.sh
.idea
.DS_Store
client/.DS_Store
client/assets/.DS_Store
client/assets/images/.DS_Store

83 changes: 64 additions & 19 deletions client/app/components/pages/GeneHome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,7 @@ main.content.clin, main.v-content.clin
:genomeBuildHelper="genomeBuildHelper"
:cohortModel="cohortModel"
:info="selectedVariantInfo"
:launchedFromHub="launchedFromHub"
:selectedVariantKey="selectedVariantKey"
:selectedPhenotype="phenotypeTerm"
:showGenePhenotypes="launchedFromClin || phenotypeTerm"
Expand All @@ -605,12 +606,19 @@ main.content.clin, main.v-content.clin
:showAssessment="hasVariantAssessment || showVariantAssessment"
:launchedFromClin="launchedFromClin"
:interpretationMap="interpretationMap"
:variantAnnotationsMap="variantAnnotationsMap"
:selectedVariantInfo="selectedInfo"
:selectedVariantFormat="selectedFormat"
:selectedVariantMosaic="selectedMosaic"
:mosaicVariant="mosaicVariant"
:selectedVariantAllAnnots="selectedAll"

@show-pileup-for-variant="onShowPileupForVariant"
@apply-variant-interpretation="onApplyVariantInterpretation"
@apply-variant-notes="onApplyVariantNotes"
@show-variant-assessment="onShowVariantAssessment"
@transcript-id-selected="onTranscriptIdSelected"
@variant-annotations-selected="onVariantAnnotationSelected"
>
</variant-inspect-card>
<!--mosaicVariantInterpretation="selectedVariant.mosaic_interpretation" -->
Expand Down Expand Up @@ -889,7 +897,7 @@ export default {
projectId: null,
geneSet: null,
variantSet: null,
variantAnnotationsMap: null,
variantAnnotationsMap: {},
launchedWithUrlParms: false,
clinSetData: null,
clinPersistCache: true,
Expand Down Expand Up @@ -1091,7 +1099,13 @@ export default {
appAlerts: [],
appAlertCounts: {'total': 0, 'success': 0, 'info': 0, 'warning': 0, 'error': 0},
geneToAppAlerts: {}
geneToAppAlerts: {},
selectedInfo: [],
selectedFormat: [],
selectedMosaic: [],
mosaicVariant: {},
selectedAll: false,
}
},
Expand Down Expand Up @@ -1189,7 +1203,23 @@ export default {
}
}
}
}
},
selectedVariant: function() {
let self = this;
if (this.launchedFromHub && this.selectedVariant && this.selectedMosaic && this.selectedMosaic.length > 0) {
this.promiseGetMosaicVariant(self.selectedVariant)
.then((mosaicVariant) => {
if(mosaicVariant){
self.mosaicVariant = mosaicVariant;
}
})
.catch((error) => {
console.error(error);
});
}
},
},
methods: {
Expand Down Expand Up @@ -1397,7 +1427,7 @@ export default {
if (self.analysis && self.analysis.payload && self.analysis.payload.variants && self.analysis.payload.variants.length > 0) {
// do nothing -- variants already loaded
} else if (self.selectedGene && Object.keys(self.selectedGene).length > 0) {
} else if (self.selectedGene && Object.keys(self.selectedGene).length > 0 && self.selectedGene.gene_name != "") {
self.promiseLoadData()
.then(function() {
self.showLeftPanelWhenFlaggedVariants();
Expand Down Expand Up @@ -2431,7 +2461,7 @@ export default {
callback();
}
} else {
let theMessage = self.isSimpleMode || self.isBasicMode ? 'Enter a gene name.' : 'Enter a gene name or enter a phenotype term.'
let theMessage = self.isSimpleMode || self.isBasicMode ? 'Enter a gene name.' : 'Enter a gene name, a gene list, or enter a phenotype term.'
self.onShowSnackbar( {message: theMessage, timeout: 10000, close: true});
self.bringAttention = 'gene';
if (callback) {
Expand Down Expand Up @@ -3911,7 +3941,7 @@ export default {
} else {
self.hubSession.promiseLookupVariantByPosition(self.projectId, theVariant)
.then(function(mosaicVariant) {
resolve(mosaicVariant)
resolve(mosaicVariant)
})
.catch(function(error) {
let msg = "Cannot find Mosaic variant in " +
Expand Down Expand Up @@ -4017,17 +4047,21 @@ export default {
promiseLoadVariantAnnotationsMap() {
let self = this;
return new Promise(function(resolve, reject) {
self.hubSession.promiseGetVariantAnnotations(self.projectId)
.then(function(variantAnnotations) {
self.variantAnnotationsMap = {};
variantAnnotations.forEach(function(variantAnnotation) {
self.variantAnnotationsMap[variantAnnotation.name] = variantAnnotation;
if (self.projectId) {
self.hubSession.promiseGetVariantAnnotations(self.projectId)
.then(function(variantAnnotations) {
self.variantAnnotationsMap = {};
variantAnnotations.forEach(function(variantAnnotation) {
self.variantAnnotationsMap[variantAnnotation.name] = variantAnnotation;
})
resolve();
})
resolve();
})
.catch(function(error) {
reject(error)
})
.catch(function(error) {
reject(error)
})
} else {
resolve(null)
}
})
},
Expand Down Expand Up @@ -4152,11 +4186,13 @@ export default {
self.$refs.variantInspectRef.refresh();
}
// Scroll down so that the variant inspect card (and the variant all card)
// are in view
setTimeout(function() {
self.scrollToVariantInspectCard();
self.scrollToVariantInspectCard()
},50)
if (callback) {
callback();
}
Expand Down Expand Up @@ -4985,9 +5021,11 @@ export default {
resolve();
})
.catch(function(error) {
console.log(error)
reject(error);
})
})
},
Expand Down Expand Up @@ -5289,7 +5327,14 @@ export default {
};
window.parent.postMessage(JSON.stringify(msgObject), self.clinIobioUrl);
}
}
},
onVariantAnnotationSelected(selectedInfo, selectedFormat, selectedMosaicVariantAnnotations, selectedAll) {
this.selectedInfo = selectedInfo;
this.selectedFormat = selectedFormat;
this.selectedMosaic = selectedMosaicVariantAnnotations;
this.selectedAll = selectedAll;
},
}
}
Expand Down
50 changes: 38 additions & 12 deletions client/app/components/partials/FilterSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
@import ../../../assets/sass/variables
.filter-form
padding: 10px 35px 5px 35px
padding: 5px 5px 5px 5px
.v-text-field__slot
height: 24px
Expand Down Expand Up @@ -56,7 +56,11 @@
#max-af
.v-input.v-text-field
min-width: 200px
min-width: 220px
#max-homozygotes
.v-input.v-text-field
min-width: 220px
.input-group
label
Expand Down Expand Up @@ -102,8 +106,6 @@
background-color: $moderate-impact-color !important
border-color: $moderate-impact-color !important
.clin_dialog_scroll
height: 475px
</style>

<template>
Expand All @@ -117,13 +119,14 @@
<v-text-field label="Name"
@input="onChangeName"
v-model="name"
hide-details
:rules=[rules.noDuplicates]>
</v-text-field>
</v-flex>



<v-flex xs12 >
<v-flex xs6 >
<v-select
label="Inheritance"
v-bind:items="inheritanceModes"
Expand All @@ -138,19 +141,20 @@
</v-select>
</v-flex>

<v-flex xs12 >
<v-flex xs6 >
<v-select
label="Zygosity"
v-bind:items="zygosities"
v-model="selectedZygosity"
single
clearable
hide-details
style="padding-top: 15px;margin-left: 20px;"
>
</v-select>
</v-flex>

<v-flex xs12 style="margin-top:10px;margin-bottom: 5px" >
<v-flex xs6 style="margin-top:10px;margin-bottom: 0px" >

<v-flex id="max-af" >
<v-text-field style="display:inline-block" label="Max Population Allele Freq" :rules="numericRules" v-model="maxAf" hide-details>
Expand All @@ -165,7 +169,14 @@

</v-flex>

<v-flex xs12 >
<v-flex xs5 style="margin-left:20px;margin-top:10px;margin-bottom: 5px" >
<v-flex id="max-homozygotes" >
<v-text-field style="display:inline-block" label="Max Number of Homozygotes" :rules="wholeNumRules" v-model="maxHomozygotes" hide-details>
</v-text-field>
</v-flex>
</v-flex>

<v-flex xs12 class="mt-1" >
<v-select
label="ClinVar clinical significance"
v-bind:items="clinvarCategories"
Expand All @@ -182,7 +193,7 @@



<v-flex xs12 >
<v-flex xs6 >
<v-select
label="Impact"
v-bind:items="impacts"
Expand All @@ -196,14 +207,15 @@
</v-select>
</v-flex>

<v-flex xs12 >
<v-flex xs6 >
<v-autocomplete
label="Consequence"
v-bind:items="consequences"
v-model="selectedConsequences"
multiple
autocomplete
hide-details
style="margin-top:8px;margin-left:20px"
>
</v-autocomplete>
</v-flex>
Expand All @@ -230,12 +242,12 @@



<v-flex id="min-genotype-depth" xs3 class="mt-3 mb-4 mr-4" >
<v-flex id="min-genotype-depth" xs3 class="mb-4 mr-4" >
<v-text-field label="Min Coverage" suffix="X" v-model="minGenotypeDepth" hide-details>
</v-text-field>
</v-flex>

<v-flex id="min-genotype-alt-count" xs4 class="mt-3 mb-4 mr-4" >
<v-flex id="min-genotype-alt-count" xs4 class=" mb-4 mr-4" >
<v-text-field label="Min Alt Count" suffix="" v-model="minGenotypeAltCount" hide-details>
</v-text-field>
</v-flex>
Expand Down Expand Up @@ -279,6 +291,7 @@ export default {
isDirty: false,
name: null,
maxAf: null,
maxHomozygotes: null,
minRevel: null,
selectedClinvarCategories: null,
selectedImpacts: null,
Expand Down Expand Up @@ -351,6 +364,12 @@ export default {
return valid || 'Freq must be between 0.0-1.0';
}
],
wholeNumRules: [
v => {
let valid = v ? (+v >= 0) : true;
return valid || 'Must be a whole number';
}
],
rules: {
noDuplicates: value => !this.isDuplicateName() || 'Another filter already has this name. Please enter a filter name not already in use.'
}
Expand All @@ -369,6 +388,7 @@ export default {
flagCriteria.active = false;
flagCriteria.name = this.filter.display;
flagCriteria.maxAf = null;
flagCriteria.maxHomozygotes = null;
flagCriteria.minRevel = null;
flagCriteria.clinvar = null;
flagCriteria.impact = null;
Expand All @@ -381,6 +401,7 @@ export default {
this.name = flagCriteria.name;
this.key = flagCriteria.key + flagCriteria.name;
this.maxAf = flagCriteria.maxAf;
this.maxHomozygotes = flagCriteria.maxHomozygotes;
this.minRevel = flagCriteria.minRevel;
this.selectedClinvarCategories = flagCriteria.clinvar;
this.selectedImpacts = flagCriteria.impact;
Expand Down Expand Up @@ -411,6 +432,7 @@ export default {
flagCriteria.key = this.key;
flagCriteria.maxAf = this.maxAf;
flagCriteria.maxHomozygotes = this.maxHomozygotes;
flagCriteria.minRevel = this.minRevel;
flagCriteria.clinvar = this.selectedClinvarCategories;
flagCriteria.impact = this.selectedImpacts;
Expand Down Expand Up @@ -461,6 +483,7 @@ export default {
return (!this.isDuplicateName()) &&
(
(this.maxAf && this.maxAf > 0 && this.maxAf < 1) ||
(this.maxHomozygotes && this.maxHomozygotes >= 0) ||
this.minRevel ||
(this.selectedClinvarCategories && this.selectedClinvarCategories.length > 0) ||
(this.selectedImpacts && this.selectedImpacts.length > 0) ||
Expand Down Expand Up @@ -489,6 +512,9 @@ export default {
maxAf: function() {
this.isDirty = true;
},
maxHomozygotes: function() {
this.isDirty = true;
},
selectedClinvarCategories: function() {
this.isDirty = true;
},
Expand Down
Loading

0 comments on commit beb9394

Please sign in to comment.