Skip to content

Commit

Permalink
#43 Now that we are using async service for gene typeahead, we can de…
Browse files Browse the repository at this point in the history
…crease the memory footprint of the app significantly by removing genes.json (~10MB). Also, GeneModel was upgraded based on the latest functionality in gene.iobio (v 4.11), which utilizes HGNC gene synonymns in the latest version of the geneinfo service. The GeneModel also contains new functionality for gene:phenotype and gene:disease associations, which can now be shown in the rnasplice app's gene card.
  • Loading branch information
tonydisera committed Sep 24, 2024
1 parent 6059994 commit 1324ad0
Show file tree
Hide file tree
Showing 6 changed files with 1,029 additions and 354 deletions.
7 changes: 0 additions & 7 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
ref="ref_Navigation"
:geneModel="geneModel"
:appVersion="appVersion"
:genes="genes"
:alerts="appAlerts"
:alertCounts="appAlertCounts"
:sampleNames="sampleNames"
Expand Down Expand Up @@ -81,7 +80,6 @@
<SpliceJunctionHome
ref="ref_SpliceJunctionHome"
:loadInfo="loadInfo"
:genes="genes"
:searchedGene="searchedGene"
:selectedGene="selectedGene"
:alerts="appAlerts"
Expand Down Expand Up @@ -126,9 +124,6 @@ import ObjectDetails from './components/ObjectDetails.vue';
import LegendPanel from './components/LegendPanel.vue';
import genesData from '@/data/genes.json'
import qs from 'qs'
Expand All @@ -147,8 +142,6 @@ export default {
data: () => ({
appVersion: import.meta.env.PACKAGE_VERSION,
genes: genesData,
geneModel: null,
searchedGene: null,
Expand Down
14 changes: 0 additions & 14 deletions src/components/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,6 @@

<v-spacer></v-spacer>

<!--<div id="search-gene-box" style="min-width:200px">
<v-text-field id="search-gene-input" class="pl-2"
hide-details
v-model="searchedGeneInput"
density="compact"
label="Gene"
prepend-icon="mdi-magnify"
/>
<Typeahead v-model="searchedGene"
target="#search-gene-input"
:data="genes"
item-key="gene_name" />
</div>
-->

<div id="search-gene-box" style="min-width:200px">
<v-text-field id="search-gene-name"
Expand Down
19 changes: 6 additions & 13 deletions src/components/SpliceJunctionHome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ import { reject } from 'async'
},
props: {
loadInfo: Object,
genes: Array,
genomeBuild: Array,
searchedGene: Object,
Expand Down Expand Up @@ -171,8 +170,9 @@ import { reject } from 'async'
true,
{ DEFAULT_BUILD: 'GRCh38' });
self.geneModel = new GeneModel(self.globalApp,
self.genomeBuildHelper)
self.geneModel.setAllKnownGenes(self.genes)
self.genomeBuildHelper,
self.launchedFromMosaic)
self.geneModel.addEventListener("alertIssued", function(eventArgs) {
let [type, message, genes, details] = eventArgs
self.addAppAlert(type, message, genes, details)
Expand Down Expand Up @@ -243,15 +243,8 @@ import { reject } from 'async'
loadInfo.genes = genes;
let promises = []
if (genes && genes.length > 0) {
genes.forEach(function(geneName){
if (self.geneModel.isKnownGene(geneName)) {
let p = self.geneModel.promiseAddGeneName(geneName)
promises.push(p)
} else {
self.addAppAlert("warn", "Bypassing unknown gene <pre>" + geneName + "</pre>.")
}
})
return Promise.all(promises)
return self.geneModel.promiseAddGenesOrAliases(genes);
} else {
return Promise.resolve();
}
Expand Down Expand Up @@ -297,7 +290,7 @@ import { reject } from 'async'
let self = this;
self.geneModel.promiseAddGeneName(geneName)
.then(function() {
self.geneModel.promiseGetGeneObject(geneName)
self.geneModel.promiseGetCachedGeneObject(geneName, true)
.then(function(theGeneObject) {
self.geneModel.adjustGeneRegion(theGeneObject);
self.geneRegionStart = theGeneObject.start;
Expand Down
1 change: 0 additions & 1 deletion src/data/genes.json

This file was deleted.

9 changes: 8 additions & 1 deletion src/globals/GlobalApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ class GlobalApp {
this.HTTP_SERVICES = null;
this.useSSL = true;
this.geneInfoServer = null;
this.geneToPhenoServer = null;
this.genomeBuildServer = null;

this.phenolyzerOnlyServer = null;
this.hpoLookupUrl = null;
}


Expand All @@ -24,7 +26,12 @@ class GlobalApp {
}

this.geneInfoServer = this.HTTP_SERVICES + "/geneinfo/";
this.geneToPhenoServer = this.HTTP_SERVICES + "/gene2pheno/";
this.genomeBuildServer = this.HTTP_SERVICES + "/genomebuild/"
this.phenolyzerOnlyServer = this.HTTP_SERVICES + "/phenolyzer/";
this.hpoLookupUrl = this.HTTP_SERVICES + "/hpo/hot/lookup/?term=";


}

initServices(useMosaicBackend) {
Expand Down
Loading

0 comments on commit 1324ad0

Please sign in to comment.