Skip to content

Commit

Permalink
Fix straggling style errors
Browse files Browse the repository at this point in the history
  • Loading branch information
eweitz committed Aug 15, 2019
1 parent 0d3aa69 commit 79f13ac
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 104 deletions.
5 changes: 2 additions & 3 deletions src/js/annotations/heatmap-2d.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion src/js/annotations/heatmap-lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/js/annotations/heatmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,4 +191,4 @@ function deserializeAnnotsForHeatmap(rawAnnotsContainer) {
reportPerformance(t0, ideo);
}

export {drawHeatmaps, deserializeAnnotsForHeatmap}
export {drawHeatmaps, deserializeAnnotsForHeatmap};
2 changes: 1 addition & 1 deletion src/js/annotations/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions src/js/init/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand All @@ -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 = {};
Expand Down
2 changes: 1 addition & 1 deletion src/js/init/write-container.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function getContainerSvgClass(ideo) {
svgClass += 'faint';
}

return svgClass
return svgClass;
}

/**
Expand Down
95 changes: 0 additions & 95 deletions src/js/layouts/paired-layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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;
}
Expand Down

0 comments on commit 79f13ac

Please sign in to comment.