Skip to content

Commit fb08bc7

Browse files
authored
Merge pull request #1122 from iobio/gene_4.11
Gene 4.11.3 merged to master
2 parents ec7aad5 + f638ae2 commit fb08bc7

22 files changed

Lines changed: 1561 additions & 543 deletions

client/app/components/pages/GeneHome.vue

Lines changed: 257 additions & 51 deletions
Large diffs are not rendered by default.

client/app/components/partials/AlertPanel.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
padding-right: 0px
7070
max-width: 280px
7171
overflow-wrap: break-word
72+
line-height: 20px
7273
7374
&.success--text
7475
div

client/app/components/partials/FilesDialog.vue

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
padding-right: 20px
1111
1212
13-
#invalid-build-alert
13+
#invalid-build-alert,
14+
#invalid-file-combo-alert
1415
margin-left: 40px
1516
padding: 5px
1617
min-width: 510px
@@ -160,18 +161,23 @@
160161

161162
<v-layout row nowrap class="mt-0">
162163
<v-card-title class="headline">Files</v-card-title>
164+
<div style="display:flex; flex-direction:column">
165+
<v-alert id="invalid-file-combo-alert" v-if="!isValidFileCombo" :value="true" color="error" icon="warning" outline>
166+
Invalid file combination for trio. If one of the trio samples loads alignments but not a variant file, the other samples must follow the same pattern, loading the alignment files only.
167+
</v-alert>
163168

164-
<v-alert id="invalid-build-alert" v-if="!isValidBuild" :value="true" color="error" icon="warning" outline>
165-
{{ invalidBuildMessage}}
169+
<v-alert id="invalid-build-alert" v-if="!isValidBuild" :value="true" color="error" icon="warning" outline>
170+
{{ invalidBuildMessage}}
166171
</v-alert>
172+
</div>
167173
<v-flex xs12 class="mt-2 text-xs-right">
168174
<div class="loader" v-show="inProgress">
169175
<img src="../../../assets/images/wheel.gif">
170176
</div>
171177

172178
<v-btn class="load-button action-button"
173179
@click="onLoad"
174-
:disabled="!isValid || !buildName">
180+
:disabled="!isValid || !buildName || !isValidFileCombo">
175181
Load
176182
</v-btn>
177183

@@ -331,6 +337,7 @@ export default {
331337
return {
332338
showFilesDialog: false,
333339
isValid: false,
340+
isValidFileCombo: true,
334341
isValidBuild: true,
335342
invalidBuildMessage: '',
336343
areAnyDuplicates: false,
@@ -680,6 +687,7 @@ export default {
680687
})
681688
},
682689
validate: function() {
690+
this.isValidFileCombo = false;
683691
this.isValid = false;
684692
this.cohortModel.isLoaded = false;
685693
if (this.mode == 'single') {
@@ -691,10 +699,16 @@ export default {
691699
if (this.modelInfoMap.proband && this.modelInfoMap.proband.model && this.modelInfoMap.proband.model.isReadyToLoad()
692700
&& this.modelInfoMap.mother && this.modelInfoMap.mother.model && this.modelInfoMap.mother.model.isReadyToLoad()
693701
&& this.modelInfoMap.father && this.modelInfoMap.father.model && this.modelInfoMap.father.model.isReadyToLoad()) {
694-
this.isValid = true;
695-
this.cohortModel.isLoaded = true;
702+
703+
this.isValid = true;
704+
this.cohortModel.isLoaded = true;
705+
696706
}
697707
}
708+
if (this.cohortModel.isValidAlignmentsOnly()) {
709+
this.isValidFileCombo = true;
710+
}
711+
698712
if (this.isValid && this.cohortModel.isLoaded) {
699713
this._validateBuild();
700714
}

client/app/components/partials/GenesMenu.vue

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ a {
186186
<phenotype-search
187187
v-if="isEduMode"
188188
:isNav="false"
189-
:defaultTopGenes="isEduMode ? '6' : '30'"
189+
:defaultTopGenes="isEduMode ? '10' : '30'"
190190
:phenotypeLabel="isEduMode ? 'Disorder' : 'Phenotype'"
191191
:geneModel="geneModel"
192192
:phenotypeLookupUrl="phenotypeLookupUrl"
@@ -391,23 +391,24 @@ export default {
391391
promiseValidateGene: function(geneName) {
392392
let self = this;
393393
return new Promise(function(resolve, reject) {
394-
let theGeneName = geneName.toUpperCase();
395-
let lookupObject = self.validGenesMap[theGeneName]
394+
let theGeneName = geneName;
395+
let theGeneNameUC = geneName.toUpperCase();
396+
let lookupObject = self.validGenesMap[theGeneNameUC]
396397
if (lookupObject) {
397398
resolve(lookupObject)
398399
} else {
399-
self.geneModel.promiseLookupGene(theGeneName)
400+
self.geneModel.promiseGetValidGeneName(theGeneName, false)
400401
.then(function(lookupObject) {
401402
let match = null;
402-
if (lookupObject && typeof(lookupObject) == 'string' && lookupObject.toUpperCase() == theGeneName) {
403+
if (lookupObject && typeof(lookupObject) == 'string' && lookupObject.toUpperCase() == theGeneNameUC) {
403404
match = lookupObject;
404-
self.validGenesMap[theGeneName] = theGeneName;
405-
} else if (lookupObject && lookupObject.hasOwnProperty('gene_alias') && lookupObject.gene_alias.toUpperCase() == theGeneName) {
405+
self.validGenesMap[theGeneNameUC] = lookupObject;
406+
} else if (lookupObject && lookupObject.hasOwnProperty('gene_alias') && lookupObject.gene_alias.toUpperCase() == theGeneNameUC) {
406407
match = lookupObject;
407-
self.validGenesMap[theGeneName] = lookupObject;
408+
self.validGenesMap[theGeneNameUC] = lookupObject;
408409
}
409410
if (match == null) {
410-
self.validGenesMap[theGeneName] = false;
411+
self.validGenesMap[theGeneNameUC] = false;
411412
}
412413
resolve(match)
413414
})
@@ -441,6 +442,8 @@ export default {
441442
let lookupObject = self.validGenesMap[geneName.toUpperCase()];
442443
if (lookupObject && lookupObject.hasOwnProperty('gene_alias')) {
443444
theGeneName = lookupObject['gene_name']
445+
} else if (lookupObject && typeof(lookupObject) == "string") {
446+
theGeneName = lookupObject
444447
}
445448
return theGeneName;
446449
}).join(", ")
@@ -498,7 +501,6 @@ export default {
498501
return gene.geneName;
499502
})
500503
.join(", ");
501-
502504
}
503505
},
504506
onClearAllGenes: function() {

client/app/components/viz/DepthViz.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ export default {
167167
},
168168
formatCircleText: {
169169
type: Function,
170-
default: function(pos, depth) {
171-
return depth + 'x' ;
170+
default: function(pos, depth, depthSource) {
171+
return + depth + (depthSource && depthSource == "average_base_coverage" ? "x" : " reads");
172172
}
173173
}
174174
@@ -242,7 +242,7 @@ export default {
242242
this.$emit('updateDepthChart', this.depthChart);
243243
},
244244
showCurrentPoint: function(point) {
245-
this.depthChart.showCircle()(point.pos, point.depth, point.altCount);
245+
this.depthChart.showCircle()(point.pos, point.depth, point.altCount, point.depthSource);
246246
},
247247
hideCurrentPoint: function(point) {
248248
this.depthChart.hideCircle()();

client/app/components/viz/GeneVariantsCard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@
310310
promisePopulateAliases: function() {
311311
let self = this;
312312
self.aliases = ""
313-
self.cohortModel.geneModel.promiseGetKnownGene(self.selectedGene.gene_name)
313+
self.cohortModel.geneModel.promiseGetGeneEntry(self.selectedGene.gene_name)
314314
.then(function(knownGeneEntry) {
315315
if (knownGeneEntry && knownGeneEntry.aliases && knownGeneEntry.aliases.length > 0) {
316316
// Add a space after the comma for word wrapping

client/app/components/viz/Navigation.vue

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,16 @@ nav.toolbar, nav.v-toolbar
361361
padding: 0px 5px
362362
font-size: 11px
363363
font-weight: 500
364+
365+
#project-badge
366+
margin-left: -20px
367+
.v-chip__content
368+
max-width: 120px
369+
white-space: normal
370+
line-height: 11px
371+
padding: 5px 5px 5px 5px
372+
text-align: center
373+
height: min-content
364374
365375
.toolbar__content
366376
margin-top: 2px
@@ -797,6 +807,11 @@ nav.toolbar, nav.v-toolbar
797807
v-tooltip.bottom-left="{content: 'Patient phenotypes'}">
798808
<v-icon style="font-size: 26px;padding-top: 3px;">account_box</v-icon>
799809
</v-btn>
810+
<v-chip v-if="cohortModel && launchedFromHub && cohortModel.isLoaded && project && project.name"
811+
id="project-badge" class="settings-badge" text-color="white">
812+
{{ project.name }}
813+
</v-chip>
814+
800815

801816
<v-btn class="navbar-icon-button" v-if="appAlerts" id="notification-button" @click="onShowNotificationDrawer" flat
802817
v-tooltip.bottom-left="{content: 'Notifications (errors, warnings and information). Click to see detailed list.'}">
@@ -1259,18 +1274,21 @@ nav.toolbar, nav.v-toolbar
12591274
<div id="versions" >
12601275
<div><span class="version-label">Human Genome Reference</span><span class="number">GRCh37, GRCh38</span></div>
12611276
<div><span class="version-label">Gencode Human Reference</span><span class="number">19, 25</span></div>
1277+
12621278
<div><span class="version-label">REFSEQ Human Reference</span><span class="number">ref_GRCh37.p5, ref_GRCh38.p7</span></div>
12631279
<div><span class="version-label">Human Phenotype Ontology</span><span class="number">Build #102 (12-15-2015)</span></div>
1264-
<div><div class="version-label">Phenolyzer</div><div class="number">Oct 2019</div></div>
1280+
<div><div class="version-label">gnomAD</div><div class="number">v2.1 for GRCh37, v4 for GRCh38 </div></div>
1281+
<div><div class="version-label">ACMG Genes</div> <div class="number">v3.2</div></div>
1282+
<div><span class="version-label">phyloP</span><span class="number">phyloP100way</span></div>
1283+
12651284
<div><div class="version-label">Variant Effect Predictor</div><div class="number">Version 105</div></div>
1285+
<div><div class="version-label">Phenolyzer</div><div class="number">Oct 2019</div></div>
12661286
<div><div class="version-label">REVEL</div> <div class="number">v1.3</div></div>
12671287
<div><div class="version-label">FreeBayes</div><div class="number">v1.3.1</div></div>
12681288
<div><div class="version-label">Samtools</div><div class="number">
12691289
1.9</div></div>
12701290
<div><div class="version-label">Tabix</div><div class="number">1.9</div></div>
12711291
<div><div class="version-label">vt subset, normalize</div><div class="number">v0.57721</div></div>
1272-
<div><div class="version-label">gnomAD </div><div class="number">v2.1 for GRCh37, v4 for GRCh38 </div></div>
1273-
<div><div class="version-label">ACMG Genes</div> <div class="number">v3.2</div></div>
12741292

12751293

12761294
</div>
@@ -1329,7 +1347,7 @@ nav.toolbar, nav.v-toolbar
13291347
2078-9. [PMID: <a href="http://www.ncbi.nlm.nih.gov/pubmed/19505943">19505943</a>]
13301348

13311349
<div class="citation-title">Bamtools</div>
1332-
BamTools: a C++ API and toolkit for analyzing and managing BAM files</span>. Bioinformatics 2011;27:1691-1692.
1350+
BamTools: a C++ API and toolkit for analyzing and managing BAM files. Bioinformatics 2011;27:1691-1692.
13331351
<a href="/cgi/ijlink?linkType=ABST&amp;journalCode=bioinfo&amp;resid=27/12/1691" class="cit-ref-sprinkles cit-ref-sprinkles-ijlinks"><span class="cit-reflinks-abstract">Abstract</span><span class="cit-sep cit-reflinks-variant-name-sep">/</span><span class="cit-reflinks-full-text"><span class="free-full-text">FREE </span>Full Text</span></a>
13341352

13351353
<div class="citation-title">vt</div>
@@ -1490,6 +1508,7 @@ export default {
14901508
settingsCoverageOnly: null,
14911509
settingsGeneSourceOnly: null,
14921510
analysisModel: null,
1511+
project: null
14931512
},
14941513
data () {
14951514
let self = this;
@@ -1950,7 +1969,6 @@ export default {
19501969
onShowAlertsForGene: function(geneName) {
19511970
this.$emit('show-alerts-for-gene', geneName)
19521971
}
1953-
19541972
},
19551973
created: function() {
19561974
},

client/app/components/viz/VariantAllCard.vue

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -806,21 +806,24 @@ export default {
806806
}
807807
},
808808
depthVizRegionGlyph: function(exon, regionGroup, regionX, modelName) {
809-
let exonId = 'exon' + exon.exon_number.replace("/", "-");
810-
if (regionGroup.select("g#" + exonId).empty()) {
811-
regionGroup.append('g')
812-
.attr("id", exonId)
813-
.attr('class', 'region-glyph coverage-problem-glyph')
814-
.attr("modelName", modelName)
815-
.attr('transform', 'translate(' + (regionX - 6) + ',-6)')
816-
.data([exon])
817-
.append('use')
818-
.attr('height', '16')
819-
.attr('width', '16')
820-
.attr('href', '#coverage-problem-symbol')
821-
.attr('xlink','http://www.w3.org/1999/xlink')
822-
.data([exon])
823-
.attr("modelName", this.sampleModel.name);
809+
if (exon.hasOwnProperty('exon_number') && exon.exon_number && exon.exon_number.length > 0) {
810+
let exonId = 'exon' + exon.exon_number.replace("/", "-");
811+
if (regionGroup.select("g#" + exonId).empty()) {
812+
regionGroup.append('g')
813+
.attr("id", exonId)
814+
.attr('class', 'region-glyph coverage-problem-glyph')
815+
.attr("modelName", modelName)
816+
.attr('transform', 'translate(' + (regionX - 6) + ',-6)')
817+
.data([exon])
818+
.append('use')
819+
.attr('height', '16')
820+
.attr('width', '16')
821+
.attr('href', '#coverage-problem-symbol')
822+
.attr('xlink','http://www.w3.org/1999/xlink')
823+
.data([exon])
824+
.attr("modelName", this.sampleModel.name);
825+
}
826+
824827
}
825828
},
826829
onVariantClick: function(variant, model) {
@@ -1086,19 +1089,22 @@ export default {
10861089
const matchingVariants = self.sampleModel.loadedVariants.features.filter(function(v) {
10871090
return v.start === variant.start && v.alt === variant.alt && v.ref === variant.ref;
10881091
})
1092+
let theDepthSource = "genotype_depth"
10891093
if (matchingVariants.length > 0) {
1090-
theDepth = matchingVariants[0].bamDepth;
1091-
// If samtools mpileup didn't return coverage for this position, use the variant's depth field
1094+
theDepth = matchingVariants[0].genotypeDepth;
1095+
// If we don't have the read count from the genotype depth on the variant,
1096+
// use the average base coverage (from samtools pileup) that was calculated for this position
10921097
if (theDepth == null || theDepth === '') {
1093-
theDepth = matchingVariants[0].genotypeDepth;
1098+
theDepth = matchingVariants[0].bamDepth;
1099+
theDepthSource = "average_base_coverage"
10941100
}
10951101
if (matchingVariants[0].genotype && matchingVariants[0].genotype.altCount) {
10961102
theAltCount = matchingVariants[0].genotype.altCount;
10971103
}
10981104
}
10991105
// If we have the exact depth for this variant, show it. Otherwise, we will show
11001106
// the calculated (binned, averaged) depth at this position.
1101-
let currentPoint = {pos: variant.start, depth: theDepth, altCount: theAltCount}
1107+
let currentPoint = {pos: variant.start, depth: theDepth, depthSource: theDepthSource}
11021108
self.$refs.depthVizRef.showCurrentPoint(currentPoint);
11031109
}
11041110
self.showCoverageCircleOther(variant);

client/app/components/viz/VariantInspectCard.vue

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1772,19 +1772,25 @@ export default {
17721772
},
17731773
17741774
depthVizRegionGlyph: function(exon, regionGroup, regionX) {
1775-
var exonId = 'exon' + exon.exon_number.replace("/", "-");
1776-
if (regionGroup.select("g#" + exonId).empty()) {
1777-
regionGroup.append('g')
1778-
.attr("id", exonId)
1779-
.attr('class', 'region-glyph coverage-problem-glyph')
1780-
.attr('transform', 'translate(' + (regionX - 6) + ',-25)')
1781-
.data([exon])
1782-
.append('use')
1783-
.attr('height', '12')
1784-
.attr('width', '12')
1785-
.attr('href', '#coverage-problem-symbol')
1786-
.attr('xlink','http://www.w3.org/1999/xlink')
1787-
.data([exon]);
1775+
if (exon.hasOwnProperty('exon_number')) {
1776+
var exonId = 'exon' + exon.exon_number.replace("/", "-");
1777+
if (exonId && exonId.length > 0) {
1778+
if (regionGroup.select("g#" + exonId).empty()) {
1779+
regionGroup.append('g')
1780+
.attr("id", exonId)
1781+
.attr('class', 'region-glyph coverage-problem-glyph')
1782+
.attr('transform', 'translate(' + (regionX - 6) + ',-25)')
1783+
.data([exon])
1784+
.append('use')
1785+
.attr('height', '12')
1786+
.attr('width', '12')
1787+
.attr('href', '#coverage-problem-symbol')
1788+
.attr('xlink','http://www.w3.org/1999/xlink')
1789+
.data([exon]);
1790+
}
1791+
1792+
}
1793+
17881794
}
17891795
},
17901796
getExonClass: function(exon, i) {

client/app/d3/Line.d3.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ export default function lineD3() {
5757
return { x: xn, y: yn };
5858
}
5959

60-
var formatCircleText = function(pos, depth) {
61-
return pos + ',' + depth;
60+
var formatCircleText = function(pos, depth, depthSource) {
61+
return pos + ',' + depth + " " + (depthSource && depthSource == "average_base_coverage" ? "x" : " reads");
6262
}
63-
var showCircle = function(start, theDepth, altCount) {
63+
var showCircle = function(start, theDepth, altCount, depthSource) {
6464
if (container == null) {
6565
return;
6666
}
@@ -93,7 +93,7 @@ export default function lineD3() {
9393
if (theDepth == null || theDepth == "") {
9494
theDepth = depthy.toString();
9595
}
96-
var circleText = formatCircleText(posx, theDepth);
96+
var circleText = formatCircleText(posx, theDepth, depthSource);
9797
if (debug) {
9898
circleText += ' ' + posx + ':' + depthy + ' ' + invertedx + ':' + invertedy;
9999
}

0 commit comments

Comments
 (0)