Skip to content

Commit

Permalink
Allow direct cut and paste of UBERON id list.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathancrabtree committed Dec 1, 2021
1 parent 09d964e commit 844b5ab
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/components/ViolinPlot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
</v-col>

<v-col cols="8" class="ma-0 pa-0 pl-4">
<h3>CFDE Anatomy Terms: <span v-if="uberon_ids" class="font-italic">{{ uberon_ids.join(",") }}</span><span v-else class="font-italic">none</span></h3>
<h3>CFDE Anatomy Terms: <v-text-field dense v-model="uberon_ids_txt"></v-text-field></h3>
<v-btn v-on:click="uberon_ids_txt=default_uberon_ids_txt" :disabled="uberon_ids_txt == default_uberon_ids_txt">reset</v-btn>

<h3 class="pt-2 mt-4">Selected Gene: <span v-if="sel_gencodeId">{{ sel_geneSymbol }} | {{ sel_gencodeId }}</span><span v-else class="font-italic">none</span></h3>
<span v-if="sel_gene">{{ sel_gene['description'] }}</span>
Expand Down Expand Up @@ -110,6 +111,8 @@ var SUBSET_COLORS = {
'female' : '#ffaa99',
};
var DEFAULT_UBERON_IDS_TXT = 'UBERON:0002037,UBERON:0013756';
// GTEx anatomy terms from CFDE:
/*
UBERON:0002190 subcutaneous adipose tissue
Expand Down Expand Up @@ -237,7 +240,10 @@ export default {
tissue_info: null,
uberon2tissues: null,
detailId2tissue: null,
uberon_ids: ['UBERON:0002037', 'UBERON:0013756'], // cerebellum, venous blood
// cerebellum, venous blood
uberon_ids: DEFAULT_UBERON_IDS_TXT.split(/\s*,\s*/),
uberon_ids_txt: DEFAULT_UBERON_IDS_TXT,
default_uberon_ids_txt: DEFAULT_UBERON_IDS_TXT,
// gene expression data
expression_data: null,
Expand Down Expand Up @@ -307,7 +313,11 @@ export default {
log_scale(so) {
this.clearExpressionData();
this.getGeneExpressionData(this.sel_gencodeId);
}
},
uberon_ids_txt(nt) {
let ids = nt.split(/\s*,\s*/);
this.uberon_ids = ids;
},
},
mounted() {
this.getTissueInfo(GTEX_VER);
Expand Down Expand Up @@ -354,6 +364,7 @@ export default {
resetAll() {
this.clearSelectedGene();
this.gene_ss = '';
this.uberon_ids_txt = this.default_uberon_ids_txt;
},
gtexURLSuffix(datasetId, pageSize, format) {
var suffix ="&gencodeVersion=" + GENCODE_VER + "&genomeBuild=" + encodeURIComponent(GENOME_VER);
Expand Down

0 comments on commit 844b5ab

Please sign in to comment.