Skip to content

Commit

Permalink
Fix naming of subtracks produced by "group by tag" operation (#4731)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin authored Dec 19, 2024
1 parent 4af106a commit 4d79a08
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ const GroupByTagDialog = observer(function (props: {
session.addTrackConf({
...trackConf,
trackId: t1,
name: `${trackConf.name} (-)`,
name: `${trackConf.name} (${tag}:${tagValue})`,
displays: [
{
displayId: `${t1}-LinearAlignmentsDisplay`,
Expand Down
4 changes: 2 additions & 2 deletions plugins/alignments/src/PileupRenderer/renderMismatches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ export function renderMismatches({
} else if (mismatch.type === 'insertion' && drawIndels) {
const pos = leftPx + extraHorizontallyFlippedOffset
const len = +mismatch.base || mismatch.length
const insW = Math.max(0, Math.min(1.2, 1 / bpPerPx))
const insW = Math.max(minSubfeatureWidth, Math.min(1.2, 1 / bpPerPx))
if (len < 10) {
fillRect(ctx, pos, topPx, insW, heightPx, canvasWidth, 'purple')
if (1 / bpPerPx >= charWidth && heightPx >= heightLim) {
const l = pos - insW
const l = Math.round(pos - insW)
fillRect(ctx, l, topPx, insW * 3, 1, canvasWidth)
fillRect(ctx, l, topPx + heightPx - 1, insW * 3, 1, canvasWidth)
ctx.fillText(`(${mismatch.base})`, pos + 3, topPx + heightPx)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Large diffs are not rendered by default.

0 comments on commit 4d79a08

Please sign in to comment.