Skip to content

Commit

Permalink
Larger SNPs
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Feb 22, 2023
1 parent e514a51 commit ec77170
Show file tree
Hide file tree
Showing 23 changed files with 98 additions and 98 deletions.
2 changes: 1 addition & 1 deletion plugins/alignments/src/PileupRenderer/PileupRenderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ export default class PileupRenderer extends BoxRendererType {
default:
if (defaultColor) {
// avoid a readConfObject call here
ctx.fillStyle = '#ccc'
ctx.fillStyle = 'lightgrey'
} else {
ctx.fillStyle = readConfObject(config, 'color', { feature })
}
Expand Down
2 changes: 1 addition & 1 deletion plugins/alignments/src/PileupRenderer/configSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const PileupRenderer = ConfigurationSchema(
type: 'number',
description:
'the minimum width in px for a pileup mismatch feature. use for increasing/decreasing mismatch marker widths when zoomed out, e.g. 0 or 1',
defaultValue: 1,
defaultValue: 1.5,
},
/**
* #slot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export default class SNPCoverageRenderer extends WiggleBaseRenderer {
C: bases.C.main,
G: bases.G.main,
T: bases.T.main,
total: '#ccc',
total: 'lightgrey',
insertion: 'purple',
softclip: 'blue',
hardclip: 'red',
Expand Down Expand Up @@ -144,7 +144,7 @@ export default class SNPCoverageRenderer extends WiggleBaseRenderer {

const score = feature.get('score') as number
const snpinfo = feature.get('snpinfo') as SNPInfo
const w = Math.max(rightPx - leftPx + fudgeFactor, 1)
const w = Math.max(rightPx - leftPx + fudgeFactor, 1.5)
const totalScore = snpinfo.total
const keys = Object.keys(snpinfo.cov).sort()

Expand All @@ -160,7 +160,7 @@ export default class SNPCoverageRenderer extends WiggleBaseRenderer {
const height = toHeight(score)
const bottom = toY(score) + height
ctx.fillRect(
Math.floor(leftPx),
Math.round(leftPx),
bottom - ((total + curr) / score) * height,
w,
(total / score) * height,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1571,7 +1571,7 @@ exports[`ConfigurationEditor widget renders with defaults of the PileupTrack sch
class="MuiInputBase-input MuiOutlinedInput-input css-1t8l2tu-MuiInputBase-input-MuiOutlinedInput-input"
id="mui-21"
type="number"
value="0.7"
value="1.5"
/>
<fieldset
aria-hidden="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ exports[`renders with one feature reversed with a correct seq, zoomed in, should
B
</text>
<rect
fill="#ffc107"
fill="#ff9800"
height="20"
stroke="#555"
width="20"
Expand All @@ -178,7 +178,7 @@ exports[`renders with one feature reversed with a correct seq, zoomed in, should
/>
<text
dominant-baseline="middle"
fill="black"
fill="white"
text-anchor="middle"
x="19930"
y="70"
Expand Down Expand Up @@ -390,7 +390,7 @@ exports[`renders with one feature reversed with a correct seq, zoomed in, should
F
</text>
<rect
fill="#ffc107"
fill="#ff9800"
height="20"
stroke="#555"
width="20"
Expand All @@ -399,7 +399,7 @@ exports[`renders with one feature reversed with a correct seq, zoomed in, should
/>
<text
dominant-baseline="middle"
fill="black"
fill="white"
text-anchor="middle"
x="19850"
y="90"
Expand Down Expand Up @@ -807,7 +807,7 @@ exports[`renders with one feature with a correct seq, zoomed in, should render n
F
</text>
<rect
fill="#ffc107"
fill="#ff9800"
height="20"
stroke="#555"
width="20"
Expand All @@ -816,7 +816,7 @@ exports[`renders with one feature with a correct seq, zoomed in, should render n
/>
<text
dominant-baseline="middle"
fill="black"
fill="white"
text-anchor="middle"
x="150"
y="70"
Expand Down Expand Up @@ -892,7 +892,7 @@ exports[`renders with one feature with a correct seq, zoomed in, should render n
B
</text>
<rect
fill="#ffc107"
fill="#ff9800"
height="20"
stroke="#555"
width="20"
Expand All @@ -901,7 +901,7 @@ exports[`renders with one feature with a correct seq, zoomed in, should render n
/>
<text
dominant-baseline="middle"
fill="black"
fill="white"
text-anchor="middle"
x="70"
y="90"
Expand Down Expand Up @@ -1276,7 +1276,7 @@ exports[`renders with one feature with an incorrect seq, zoomed in, should throw
B
</text>
<rect
fill="#ffc107"
fill="#ff9800"
height="20"
stroke="#555"
width="20"
Expand All @@ -1285,7 +1285,7 @@ exports[`renders with one feature with an incorrect seq, zoomed in, should throw
/>
<text
dominant-baseline="middle"
fill="black"
fill="white"
text-anchor="middle"
x="70"
y="90"
Expand Down
Loading

0 comments on commit ec77170

Please sign in to comment.