Skip to content

Commit

Permalink
Merge pull request #1049 from iobio/gene_4.9
Browse files Browse the repository at this point in the history
Gene 4.9
  • Loading branch information
tonydisera authored Feb 23, 2024
2 parents 841564d + b85d297 commit 995b471
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 20 deletions.
3 changes: 3 additions & 0 deletions client/app/components/pages/GeneHome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2335,6 +2335,9 @@ export default {
var options = {'getKnownVariants': self.showKnownVariantsCard,
'getSfariVariants': (self.showSfariVariantsCard && !self.blacklistedGeneSelected),
'blacklistedGeneSelected': self.blacklistedGeneSelected };
options.analyzeCodingVariantsOnly = self.cohortModel.analyzeCodingVariantsOnly;
options.isBackground = false;
self.cohortModel.promiseLoadData(self.selectedGene, self.selectedTranscript, options)
.then(function(resultMap) {
Expand Down
6 changes: 4 additions & 2 deletions client/app/components/partials/GeneDiseaseTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
</v-badge>
</div>
<div class="disease-table-body" style="padding-top:5px">
<div class="hpo-row" v-for="entry in entries" :key="entry.diseaseId">
<div class="hpo-row" v-for="entry in entries" :key="entry.key">
<span class="hpo-launch" >
<a :href="entry.url" target="_hpo">
{{ entry.diseaseId }}
Expand Down Expand Up @@ -133,7 +133,9 @@ export default {
self.entries.push({'diseaseId': geneDisorder.disease_id,
'phenotypeInheritance': geneDisorder.inheritance,
'diseaseName': geneDisorder.disorder,
'url': url })
'url': url,
'key':
geneDisorder.disease_id + "-" + geneDisorder.disorder.replaceAll(" ", "_")})
})
self.entryCount = self.entries.length > 0 ? self.entries.length : ""
Expand Down
8 changes: 6 additions & 2 deletions client/app/components/partials/GenePhenotypeTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@
</div>

<div :class="`hpo-table-body` + ' ' + viewMode">
<div class="hpo-row patient-match" v-for="entry in hpoEntries" :key="entry.ontologyId">
<div class="hpo-row patient-match" v-for="entry in hpoEntries" :key="entry.key">
<v-chip v-if="highlightMatches && entry.match != ''" :class="`match-chip match-level-` + entry.matchLevel">
{{ entry.match }}
</v-chip>
Expand Down Expand Up @@ -354,7 +354,10 @@ export default {
self.hasMatches = false;
if (self.genePatientPhenotypes) {
self.hpoEntries = self.genePatientPhenotypes;
self.hpoEntries = self.genePatientPhenotypes.map(function(entry) {
entry.key = entry.ontologyId + "-" + entry.name.replaceAll(" ", "_")
return entry;
})
self.entryCount = self.hpoEntries.length > 0 ? self.hpoEntries.length : ""
self.hasMatches = self.hpoEntries.filter(function(hpoEntry) {
return hpoEntry.match != ""
Expand All @@ -369,6 +372,7 @@ export default {
let idx = 0;
self.hpoEntries = data.hpoEntries.map(function(entry) {
entry.ordinal = idx++;
entry.key = entry.ontologyId + "-" + entry.name.replaceAll(" ", "_")
return entry;
})
self.hpoEntriesAll = self.hpoEntries;
Expand Down
2 changes: 1 addition & 1 deletion client/app/components/viz/VariantInspectCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2253,7 +2253,7 @@ export default {
return gnomAD;
}
else if (this.globalApp.gnomADExtraMethod == this.globalApp.GNOMAD_METHOD_MERGED_ANNOTS &&
else if (this.globalApp.gnomADExtraMethod == this.globalApp.GNOMAD_METHOD_MERGE_ANNOTS &&
(this.globalApp.gnomADExtraAll || (this.globalApp.gnomADExtra && this.selectedVariant.extraAnnot))) {
let source = "gnomAD genomes"
let infoPopup = "gnomAD"
Expand Down
10 changes: 5 additions & 5 deletions client/app/globals/GlobalApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class GlobalApp {
this.tour = "";
this.completedTour = "";

this.version = "4.9";
this.version = "4.9a";

this.GREEN_IOBIO = "nv-green.iobio.io/"; // Must always stay at green to accommodate VEP service

Expand Down Expand Up @@ -53,10 +53,10 @@ class GlobalApp {
// get gnomad extra info for all variants
this.gnomADExtraAll = true;

// how should we get the gnomad extra info? 'bcftools' or 'vepcustom'
this.GNOMAD_METHOD_BCFTOOLS = "gnomad_merge_annots";
this.GNOMAD_METHOD_CUSTOM_VEP = "gnomad_custom_vep";
this.gnomADExtraMethod = this.GNOMAD_METHOD_MERGE_ANNOTS;
// how should we get the gnomad extra info? 'merge annots' or 'cust vep'
this.GNOMAD_METHOD_MERGE_ANNOTS = "gnomad_merge_annots";
this.GNOMAD_METHOD_CUSTOM_VEP = "gnomad_custom_vep";
this.gnomADExtraMethod = this.GNOMAD_METHOD_MERGE_ANNOTS;


// How many genes can be analyzed in one session. Set to null if no limitation.
Expand Down
34 changes: 26 additions & 8 deletions client/app/models/CohortModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ class CohortModel {
})

} else {
let theOptions = $.extend({'isMultiSample': self.mode == 'trio' && self.samplesInSingleVcf(), 'isBackground': false}, options);
let theOptions = $.extend(options, {'isMultiSample': self.mode == 'trio' && self.samplesInSingleVcf(), 'isBackground': false});
self.promiseAnnotateVariants(theGene, theTranscript, theOptions)
.then(function(resultMap) {
// Flag bookmarked variants
Expand Down Expand Up @@ -1545,8 +1545,12 @@ class CohortModel {
model.inProgress.loadingVariants = true;
}
})
options.analyzeCodingVariantsOnly = self.analyzeCodingVariantsOnly;
p = self.sampleMap['proband'].model.promiseAnnotateVariants(theGene, theTranscript, self.getCanonicalModels(), options)
let theOptions = $.extend({}, options)
theOptions.analyzeCodingVariantsOnly = self.analyzeCodingVariantsOnly;
theOptions.getKnownVariants = false;
theOptions.getSfariVariants = false;
theOptions.blacklistedGeneSelected = false;
p = self.sampleMap['proband'].model.promiseAnnotateVariants(theGene, theTranscript, self.getCanonicalModels(), theOptions)
.then(function(resultMap) {
if (!options.isBackground) {
self.getCanonicalModels().forEach(function(model) {
Expand All @@ -1555,6 +1559,9 @@ class CohortModel {
}
theResultMap = resultMap;
})
.catch(function(error) {
console.log(error)
})
annotatePromises.push(p);
} else {
for (var rel in self.sampleMap) {
Expand All @@ -1564,8 +1571,13 @@ class CohortModel {
model.inProgress.loadingVariants = true;
}
if (rel !== 'known-variants' && rel !== 'sfari-variants') {
options.analyzeCodingVariantsOnly = self.analyzeCodingVariantsOnly;
var p = model.promiseAnnotateVariants(theGene, theTranscript, [model], options)
let theOptions = $.extend({}, options)
theOptions.analyzeCodingVariantsOnly = self.analyzeCodingVariantsOnly;
theOptions.getKnownVariants = false;
theOptions.getSfariVariants = false;
theOptions.blacklistedGeneSelected = false;

var p = model.promiseAnnotateVariants(theGene, theTranscript, [model], theOptions)
.then(function(resultMap) {
for (var theRelationship in resultMap) {
if (!options.isBackground) {
Expand All @@ -1586,13 +1598,14 @@ class CohortModel {
if (options.getKnownVariants && (!options.hasOwnProperty('bypassAnnotate') || options.bypassAnnotate == false)) {
let p = self.promiseLoadKnownVariants(theGene, theTranscript)
.then(function(resultMap) {
if (self.knownVariantViz === 'variants') {
if (self.knownVariantsViz === 'variants') {
for (var rel in resultMap) {
theResultMap[rel] = resultMap[rel];
}
}
})
.catch(function(error) {
console.log(error)
reject(error)
})
annotatePromises.push(p);
Expand All @@ -1606,7 +1619,9 @@ class CohortModel {
theResultMap[rel] = resultMap[rel];
}
}
});
}).catch(function(error) {
console.log(error)
})
annotatePromises.push(p);
}

Expand All @@ -1617,7 +1632,10 @@ class CohortModel {
self.promiseAnnotateWithClinvar(theResultMap, theGene, theTranscript, options.isBackground)
.then(function(data) {
resolve(data)
})
})
.catch(function(error) {
console.log(error)
})
} else {
resolve(theResultMap)
}
Expand Down
2 changes: 1 addition & 1 deletion client/app/models/GeneModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -1939,7 +1939,7 @@ class GeneModel {
isKnownGene(geneName) {
if (geneName in this.allKnownGeneNames) {
return true;
} else if (geneName.toUpperCase() in allKnowGeneNames) {
} else if (geneName.toUpperCase() in this.allKnownGeneNames) {
return true;
} else {
return false;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gene-iobio-vue",
"version": "4.9.0",
"version": "4.9.0a",
"scripts": {
"start": "DEBUG=http ./node_modules/nodemon/bin/nodemon.js --inspect --ignore client/ www.js",
"build": "./node_modules/webpack/bin/webpack.js",
Expand Down

0 comments on commit 995b471

Please sign in to comment.