Skip to content
Snippets Groups Projects
Commit 85db52f0 authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

display exchangeables

parent 4f2ce63e
No related branches found
No related tags found
No related merge requests found
Pipeline #130580 failed
...@@ -354,7 +354,10 @@ function drawLinks(operonGroup: d3.Selection<SVGGElement, any, SVGElement | null ...@@ -354,7 +354,10 @@ function drawLinks(operonGroup: d3.Selection<SVGGElement, any, SVGElement | null
.attr("d", d3.link(d3.curveBumpY)) .attr("d", d3.link(d3.curveBumpY))
} }
/**
* Using D3, draw image structure if available
* @param operonGroup
*/
function drawStructure(operonGroup: d3.Selection<SVGGElement, any, SVGElement | null, any>) { function drawStructure(operonGroup: d3.Selection<SVGGElement, any, SVGElement | null, any>) {
const structureNodeVal = toValue(structureNodes) const structureNodeVal = toValue(structureNodes)
const structureSelection = operonGroup const structureSelection = operonGroup
...@@ -404,7 +407,10 @@ function drawStructure(operonGroup: d3.Selection<SVGGElement, any, SVGElement | ...@@ -404,7 +407,10 @@ function drawStructure(operonGroup: d3.Selection<SVGGElement, any, SVGElement |
} }
/**
* Using D3, draw each gene within the operon
* @param operonGroup
*/
function drawGenes(operonGroup: d3.Selection<SVGGElement, any, SVGElement | null, any>) { function drawGenes(operonGroup: d3.Selection<SVGGElement, any, SVGElement | null, any>) {
const genesWithCoordVal = toValue(geneNodesWithY) const genesWithCoordVal = toValue(geneNodesWithY)
const genes = genesWithCoordVal const genes = genesWithCoordVal
...@@ -430,7 +436,6 @@ function drawGenes(operonGroup: d3.Selection<SVGGElement, any, SVGElement | null ...@@ -430,7 +436,6 @@ function drawGenes(operonGroup: d3.Selection<SVGGElement, any, SVGElement | null
geneToHighlight.value = null geneToHighlight.value = null
}) })
gGene gGene
.append("path") .append("path")
.classed("gene", true) .classed("gene", true)
...@@ -440,9 +445,6 @@ function drawGenes(operonGroup: d3.Selection<SVGGElement, any, SVGElement | null ...@@ -440,9 +445,6 @@ function drawGenes(operonGroup: d3.Selection<SVGGElement, any, SVGElement | null
.classed("gene-label", true) .classed("gene-label", true)
.attr("fill", "currentColor") .attr("fill", "currentColor")
.attr("dominant-baseline", "middle") .attr("dominant-baseline", "middle")
return gGene return gGene
}, },
update => update, update => update,
...@@ -482,11 +484,16 @@ function operonTitle(d: StructureOperonGeneWithCoordinate) { ...@@ -482,11 +484,16 @@ function operonTitle(d: StructureOperonGeneWithCoordinate) {
function geneTitle(d: StructureOperonGeneWithCoordinate) { function geneTitle(d: StructureOperonGeneWithCoordinate) {
if (d?.exchangeables && d.exchangeables?.length > 0) { if (d?.exchangeables && d.exchangeables?.length > 0) {
return `\nExchangeables: ${d.exchangeables.map(d => d.split("__")[1]).join(", ")}` return `\nExchangeables: ${d.exchangeables.join(", ")}`
} }
return '' return ''
} }
/**
* using d3, draw the label for each genes within operon
* @param operonGroup
*/
function drawGenesLabel(operonGroup: d3.Selection<SVGGElement, any, SVGElement | null, any>) { function drawGenesLabel(operonGroup: d3.Selection<SVGGElement, any, SVGElement | null, any>) {
const genes = toValue(genesLabel) const genes = toValue(genesLabel)
const updateSelection = operonGroup const updateSelection = operonGroup
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment