Commit 72796f71 authored by Remi  PLANEL's avatar Remi PLANEL
Browse files

Can handle an array of chromosomes

parent 5b458af4
Pipeline #64215 passed with stages
in 2 minutes and 43 seconds
......@@ -9,7 +9,7 @@ import { GenomeScanData, SignificanceThreshold } from "../../types";
export default function () {
function genomeScan(
_selection: d3Selection.Selection<HTMLDivElement, GenomeScanData, any, any>, chromosome: String | undefined = undefined
_selection: d3Selection.Selection<HTMLDivElement, GenomeScanData, any, any>, chromosome: String[] | undefined = undefined
// legendClickCallback: (event: Plotly.LegendClickEvent) => boolean,
// legendDoubleClickCallback: (event: Plotly.LegendClickEvent) => boolean
) {
......@@ -23,7 +23,7 @@ export default function () {
// const thresholdColor = scaleLinear<string, string>().domain([80, 100]).range(["red", "blue"])
const maxLodScore = maxLodScoreStr;
const filteredLodScorePerChromosome = chromosome
? lod_score_per_chromosome.filter(d => d.chr === chromosome)
? lod_score_per_chromosome.filter(d => chromosome.some(el => el === d.chr))
: lod_score_per_chromosome
const chrDatasMap = d3Array.group(filteredLodScorePerChromosome, d => d.chr);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment