Skip to content

Commit

Permalink
add tupro aml
Browse files Browse the repository at this point in the history
  • Loading branch information
monicadragan2 committed Nov 9, 2024
1 parent 475984c commit 9f8cbc8
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 6 deletions.
1 change: 1 addition & 0 deletions data/aml_tupro/trees_aml_tupro.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions data/gene_chr_map.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion display_tree.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ function displayTree(div_id, tree_label, tree_data, target_gene, target_drug, dr
}
var gene_events = d.data.gene_event_categories
var gene_events_with_details = d.data.gene_event_categories_details
if (gene_events && mapSize(gene_events)) {
if (gene_events && gene_events.size) {
html_info += "<p style='margin:6px;'></p><b>Gene events:</b><br/>"
var keys = Array.from(gene_events.keys()).sort().reverse()
for (event of keys) {
Expand Down
5 changes: 3 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
<script src="data/tracerx/tracerx_lung/trees_tracerx_lung.json"></script>
<script src="data/tracerx/tracerx421/trees_tracerx421.json"></script>
<script src="data/noble2022/trees_noble2022.json"></script>

<script src="data/aml_tupro/trees_aml_tupro.json"></script>
<script src="data/gene_chr_map.json"></script>
</head>

<body style="margin-top: 5px; margin-left: 5px; margin-right: 5px;">
Expand Down Expand Up @@ -83,9 +84,9 @@
<script>
datasets = {
"[CLUSTERED] 123 AML point mutation trees (Morita et al. 2020)": {"data": data_aml_morita},
//"[CLUSTERED] 25 TumorProfiler AML CN trees": {"data": data_tupro_aml},
"[CLUSTERED] 43 tumor evolution trees (Noble et al. 2022)": {"data": data_noble2022},
"[CLUSTERED] 99 non-small cell lung cancer point mutation trees (TRACERx, Jamal-Hanjani et al. 2017)": {"data": data_tracerx_lung},
"[CLUSTERED] 21 TumorProfiler AML CN trees": {"data": data_tupro_aml},
"145 AML joint CN-point mutation trees (COMPASS, Sollier et al. 2022)": {"data": data_aml_compass},
"4,843 alternative mutation trees for 126 non-small cell lung metastatic cancer point patients (TRACERx421, Al Bakir et al. 2023)": {"data": data_tracerx421},
"1,214 Breast cancer mutation trees (Razavi et al. 2018)": {"data": data_brca_razavi},
Expand Down
26 changes: 23 additions & 3 deletions oncotreevis.js
Original file line number Diff line number Diff line change
Expand Up @@ -1562,6 +1562,9 @@ function isAntibody(interaction_types) {
//// Populate cluster info ////
///////////////////////////////
function applyTextStyle(gene, highlighted_genes) {
if (gene in gene_chr_map) {
gene = "<span style='cursor:default;' title='chr" + gene_chr_map[gene] + "'>" + gene + "</span>"
}
if (highlighted_genes) {
if (gene in highlighted_genes) {
style = highlighted_genes[gene]
Expand Down Expand Up @@ -1620,8 +1623,21 @@ function showClusterInfo_slow(args) {
div_matches.innerHTML = "<strong style='background-color:" + bg_color + "; display:block;'>&nbsp;Genes in matching nodes<br/></strong>"
appendLineBreak(div_matches)

//div_matches.append(createChromosomeTable([]))
//appendLineBreak(div_matches)
affected_chromosomes = new Set()
for (let [color, events] of matching_nodes_details.entries()) {
for (let [event, gene_set] of events.entries()) {
for (let gene of Array.from(gene_set)) {
if (gene in gene_chr_map) {
affected_chromosomes.add(gene_chr_map[gene])
}
}
}
}
if (affected_chromosomes.size) {
div_matches.innerHTML += "<b>Affected chromosomes:<br/></b>"
div_matches.append(createChromosomeTable(Array.from(affected_chromosomes)))
appendLineBreak(div_matches)
}

for (let [color, events] of matching_nodes_details.entries()) {
div_matches.innerHTML += '<i class="fa fa-circle" style="font-size:18px;color:' + color + '"></i> &nbsp;'
Expand Down Expand Up @@ -1720,14 +1736,18 @@ function createChromosomeTable(affected_chromosomes) {
chr_list = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16',
'17', '18', '19', '20', '21', '22', 'X', 'Y']
var table = document.createElement("table")
table.style.border = "1px solid darkgray"
var tr = document.createElement('TR')
table.appendChild(tr)
for (chr of chr_list) {
var td = document.createElement('TD')
td.style.border = "1px solid darkgray"
td.fontWeight = "bold"
td.appendChild(document.createTextNode(chr))
if (affected_chromosomes.includes("<b>" + chr + "</b>")) {
if (affected_chromosomes.includes(chr)) {
td.style.backgroundColor = "tomato"
}
tr.appendChild(td)
}
return table
}
Expand Down

0 comments on commit 9f8cbc8

Please sign in to comment.