Skip to content

Commit

Permalink
Merge pull request #25 from nicgirault/v2
Browse files Browse the repository at this point in the history
V2
  • Loading branch information
nicgirault authored Mar 11, 2017
2 parents dcc517e + eaf9bcd commit 99b8a06
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
10 changes: 9 additions & 1 deletion demo/line/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ var gieStainColor = {
}

var drawCircos = function (error, GRCh37, cytobands, snp250, snp, snp1m) {
cytobands = cytobands.map(function (d) {
GRCh37 = GRCh37.filter(function (d) {
return d.id === 'chr1' || d.id === 'chr2' || d.id === 'chr3'
})

cytobands = cytobands
.filter(function (d) {
return d.chrom === 'chr1' || d.chrom === 'chr2' || d.chrom === 'chr3'
})
.map(function (d) {
return {
block_id: d.chrom,
start: parseInt(d.chromStart),
Expand Down
8 changes: 7 additions & 1 deletion src/tracks/Heatmap.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ describe('Heatmap', () => {
{block_id: 'chr1', start: 1000001, end: 2000000, value: 2},
{block_id: 'chr2', start: 0, end: 1000000, value: 3},
{block_id: 'chr2', start: 1000001, end: 2000000, value: 4}
])
],
{
color: 'Spectral',
opacity: 0.8
}
)
.render()

const expectedColors = [
Expand All @@ -38,6 +43,7 @@ describe('Heatmap', () => {
forEach(tiles.nodes(), (tileNode, i) => {
const tile = select(tileNode)
expect(tile.attr('fill')).to.equal(expectedColors[i])
expect(tile.attr('opacity')).to.equal('0.8')
})
})
})

0 comments on commit 99b8a06

Please sign in to comment.