Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log2 scale on Summary Report Heatmaps #124

Open
ababaian opened this issue Mar 20, 2021 · 0 comments
Open

log2 scale on Summary Report Heatmaps #124

ababaian opened this issue Mar 20, 2021 · 0 comments
Labels
feature New feature

Comments

@ababaian
Copy link
Member

ababaian commented Mar 20, 2021

Currently the Summary heatmap function displays the data using a linear color scale.
Screenshot from 2021-03-19 19-11-23

Current Encoding

The data in a summary file is encoded in 13 symbols which increase on a log2 scale. With the current-set up when the read depth is high then it gives a nice show of coverage, but when the read-depth is low across a genome the colors all wash to the same "white". One cannot see a difference between 4 reads per bin and say 128 when the scale goes up to 4000+

From src/components/Explorer/Result/Chart/ChartHelper.jsx

export const cvgCartoonMap = {
    "_": 0,
    ".": 1,
    ":": 2,
    "u": 4,
    "w": 8,
    "a": 16,
    "o": 32,
    "m": 64,
    "U": 128,
    "W": 256,
    "A": 512,
    "O": 1024,
    "M": 2048,
    "^": 4096,

Which then maps to color-space

var cvgLims = [0, 4000];
const defaultColorMap = d3.scaleSequentialSymlog(d3.interpolateYlGnBu).domain(cvgLims);

log2 encoding

export const cvgCartoonMapLog = {
    "_": 0,
    ".": 1,
    ":": 2,
    "u": 3,
    "w": 4,
    "a": 5,
    "o": 6,
    "m": 7,
    "U": 8,
    "W": 9,
    "A": 10,
    "O": 11,
    "M": 12,
    "^": 13,
}
...
var cvgLimsLog = [0, 13];
const defaultColorMapLog = d3.scaleSequentialSymlog(d3.interpolateYlGnBu).domain(cvgLimsLog);
@ababaian ababaian added the feature New feature label Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

No branches or pull requests

1 participant