diff --git a/src/js/annotations/heatmap-2d.js b/src/js/annotations/heatmap-2d.js index a0000497..f179d589 100644 --- a/src/js/annotations/heatmap-2d.js +++ b/src/js/annotations/heatmap-2d.js @@ -3,7 +3,7 @@ * 2D heatmaps enable showing many (100+) tracks of data in one dimension, * for features (e.g. genes) along a dimension of genomic coordinates in * chromosome context. - * + * * TO DO: * - Horizontal orientation * - Multiple chromosomes @@ -91,8 +91,7 @@ function drawHeatmaps2d(annotContainers, ideo) { function add2dAnnotsForChr(annots, omittedAnnots, annotsByChr, chrModel, m, keys, ideo) { var j, k, annot, ra, stop, stopPx, color, - thresholds = ideo.config.heatmapThresholds, - omittedAnnots = []; + thresholds = ideo.config.heatmapThresholds; for (j = 0; j < annotsByChr.annots.length; j++) { ra = annotsByChr.annots[j]; diff --git a/src/js/annotations/heatmap-lib.js b/src/js/annotations/heatmap-lib.js index 3543f4fd..6ab6987c 100644 --- a/src/js/annotations/heatmap-lib.js +++ b/src/js/annotations/heatmap-lib.js @@ -10,7 +10,7 @@ var defaultHeatmapColors = { 3: ['00B', 'DDD', 'F00'], 5: ['00D', '66D', 'DDD', 'F88', 'F00'], 17: ['00D', '00D', '00D', '00D', '00D', '44D', '44D', 'DDD', 'DDD', 'DDD', 'DDD', 'F88', 'F66', 'F22', 'F22', 'F00', 'F00', 'F00'] -} +}; /** * Get label text for displayed tracks from annotation container metadata, diff --git a/src/js/annotations/heatmap.js b/src/js/annotations/heatmap.js index 842b1e38..99ea4f20 100644 --- a/src/js/annotations/heatmap.js +++ b/src/js/annotations/heatmap.js @@ -191,4 +191,4 @@ function deserializeAnnotsForHeatmap(rawAnnotsContainer) { reportPerformance(t0, ideo); } -export {drawHeatmaps, deserializeAnnotsForHeatmap} \ No newline at end of file +export {drawHeatmaps, deserializeAnnotsForHeatmap}; diff --git a/src/js/annotations/process.js b/src/js/annotations/process.js index 9a0fd096..70543b60 100644 --- a/src/js/annotations/process.js +++ b/src/js/annotations/process.js @@ -222,7 +222,7 @@ function processAnnotData(rawAnnots) { [annots, omittedAnnots] = addAnnots(rawAnnots, keys, ideo); annots = orderAnnotContainers(annots, ideo); - sendTrackAndAnnotWarnings(omittedAnnots, ideo) + sendTrackAndAnnotWarnings(omittedAnnots, ideo); return annots; } diff --git a/src/js/init/init.js b/src/js/init/init.js index c09ac6aa..3fb0eb01 100644 --- a/src/js/init/init.js +++ b/src/js/init/init.js @@ -201,7 +201,7 @@ function getBandsAndPrepareContainer(taxids, t0, ideo) { bandFileNames = {}; for (taxid in organismMetadata) { bandFileNames[taxid] = ''; - }; + } for (i = 0; i < taxids.length; i++) { taxid = String(taxids[i]); @@ -216,7 +216,7 @@ function getBandsAndPrepareContainer(taxids, t0, ideo) { * fetches band and annotation data if needed, and * writes an SVG element to the document to contain the ideogram */ -// Prevents race condition when init is called multiple times in quick succession. +// Prevents race condition when init is called multiple times in quick succession. // See https://github.com/eweitz/ideogram/pull/154. var ideoNext = {}; var ideoQueued = {}; diff --git a/src/js/init/write-container.js b/src/js/init/write-container.js index b3eca14f..2c5c7db4 100644 --- a/src/js/init/write-container.js +++ b/src/js/init/write-container.js @@ -40,7 +40,7 @@ function getContainerSvgClass(ideo) { svgClass += 'faint'; } - return svgClass + return svgClass; } /** diff --git a/src/js/layouts/paired-layout.js b/src/js/layouts/paired-layout.js index 35875e09..52285f32 100644 --- a/src/js/layouts/paired-layout.js +++ b/src/js/layouts/paired-layout.js @@ -4,7 +4,6 @@ * This enables ploidy support beyond the default haploid; e.g. diploid genomes. */ -import {d3} from '../lib'; import Layout from './layout'; class PairedLayout extends Layout { @@ -19,100 +18,6 @@ class PairedLayout extends Layout { }; } - rotateForward(setIndex, chrIndex, chrElement, callback) { - console.warn('rotateForward not implemented for PairedLayout'); - // var self = this; - // var ideo = this._ideo; - // - // // Get ideo container and chromosome set dimensions - // var ideoBox = d3.select(ideo.selector).node().getBoundingClientRect(); - // var chrBox = chrElement.getBoundingClientRect(); - // - // // Evaluate dimensions scale coefficients - // var scaleX = (ideoBox.width / chrBox.height) * 0.97; - // var scaleY = this._getYScale(); - // - // // Evaluate y offset of chromosome. - // // It is different for first and the second one - // var yOffset = setIndex ? 150 : 25; - // - // var transform = - // 'translate(15, ' + yOffset + ') scale(' + scaleX + ', ' + scaleY + ')'; - // - // // Run rotation procedure - // d3.select(chrElement.parentNode) - // .transition() - // .attr("transform", transform) - // .on('end', function() { - // // Run callback function if provided - // if (callback) { - // callback(); - // } - // - // var translateY = (6 * Number(!setIndex)); - // - // // Rotate band labels - // d3.select(chrElement.parentNode).selectAll('g.bandLabel text') - // .attr('transform', 'rotate(90) translate(0, ' + translateY + ')') - // .attr('text-anchor', 'middle'); - // - // // Hide syntenic regions - // d3.selectAll(ideo.selector + ' .syntenicRegion') - // .style('display', 'none'); - // }); - // - // // Append new chromosome labels - // var labels = this.getChromosomeLabels(chrElement); - // - // d3.select(this._ideo.getSvg()) - // .append('g') - // .attr('class', 'tmp') - // .selectAll('text') - // .data(this.getChromosomeLabels(chrElement)) - // .enter() - // .append('text') - // .attr('class', function(d, i) { - // return i === 0 && labels.length === 2 ? 'chrSetLabel' : null; - // }) - // .attr('x', 0) - // .attr('y', yOffset + (self._config.chrWidth * scaleX / 2) * 1.15) - // .style('opacity', 0) - // .text(String) - // .transition() - // .style('opacity', 1); - } - - rotateBack(setIndex, chrIndex, chrElement, callback) { - console.warn('rotateBack not implemented for PairedLayout'); - // - // var ideo = this._ideo; - // - // // Get intial transformation string for chromosome set - // var translate = this.getChromosomeSetTranslate(setIndex); - // - // // Run rotation procedure - // d3.select(chrElement.parentNode) - // .transition() - // .attr('transform', translate) - // .on('end', function() { - // // Run callback fnuction if provided - // callback(); - // - // // Show syntenic regions - // d3.selectAll(ideo.select + ' .syntenicRegion') - // .style('display', null); - // - // // Reset changed attributes to original state - // d3.select(chrElement.parentNode).selectAll('g.bandLabel text') - // .attr('transform', null) - // .attr('text-anchor', setIndex ? null : 'end'); - // }); - // - // d3.selectAll(ideo.selector + ' g.tmp') - // .style('opacity', 0) - // .remove(); - } - getHeight() { return this._config.chrHeight + this.margin.left * 1.5; }