Skip to content

Commit

Permalink
Fix "Color by CDS" for BED12 features (#4773)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin authored Jan 17, 2025
1 parent e57c843 commit ba16ba9
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 0 deletions.
13 changes: 13 additions & 0 deletions plugins/bed/src/BedAdapter/__snapshots__/BedAdapter.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ exports[`adapter can fetch features from volvox-bed12.bed 1`] = `
{
"end": 1500,
"parentId": "test-ctgA-0",
"phase": 0,
"refName": "ctgA",
"start": 1200,
"strand": 1,
Expand All @@ -283,6 +284,7 @@ exports[`adapter can fetch features from volvox-bed12.bed 1`] = `
{
"end": 3902,
"parentId": "test-ctgA-0",
"phase": 0,
"refName": "ctgA",
"start": 2999,
"strand": 1,
Expand All @@ -292,6 +294,7 @@ exports[`adapter can fetch features from volvox-bed12.bed 1`] = `
{
"end": 5500,
"parentId": "test-ctgA-0",
"phase": 0,
"refName": "ctgA",
"start": 4999,
"strand": 1,
Expand All @@ -301,6 +304,7 @@ exports[`adapter can fetch features from volvox-bed12.bed 1`] = `
{
"end": 7608,
"parentId": "test-ctgA-0",
"phase": 0,
"refName": "ctgA",
"start": 6999,
"strand": 1,
Expand Down Expand Up @@ -342,6 +346,7 @@ exports[`adapter can fetch features from volvox-bed12.bed 1`] = `
{
"end": 1500,
"parentId": "test-ctgA-1",
"phase": 0,
"refName": "ctgA",
"start": 1200,
"strand": 1,
Expand All @@ -351,6 +356,7 @@ exports[`adapter can fetch features from volvox-bed12.bed 1`] = `
{
"end": 5500,
"parentId": "test-ctgA-1",
"phase": 0,
"refName": "ctgA",
"start": 4999,
"strand": 1,
Expand All @@ -360,6 +366,7 @@ exports[`adapter can fetch features from volvox-bed12.bed 1`] = `
{
"end": 7608,
"parentId": "test-ctgA-1",
"phase": 0,
"refName": "ctgA",
"start": 6999,
"strand": 1,
Expand Down Expand Up @@ -410,6 +417,7 @@ exports[`adapter can fetch features from volvox-bed12.bed 1`] = `
{
"end": 3902,
"parentId": "test-ctgA-2",
"phase": 0,
"refName": "ctgA",
"start": 3300,
"strand": 1,
Expand All @@ -419,6 +427,7 @@ exports[`adapter can fetch features from volvox-bed12.bed 1`] = `
{
"end": 5500,
"parentId": "test-ctgA-2",
"phase": 0,
"refName": "ctgA",
"start": 4999,
"strand": 1,
Expand All @@ -428,6 +437,7 @@ exports[`adapter can fetch features from volvox-bed12.bed 1`] = `
{
"end": 7600,
"parentId": "test-ctgA-2",
"phase": 0,
"refName": "ctgA",
"start": 6999,
"strand": 1,
Expand Down Expand Up @@ -469,6 +479,7 @@ exports[`adapter can fetch features from volvox-bed12.bed 1`] = `
{
"end": 18800,
"parentId": "test-ctgA-3",
"phase": 0,
"refName": "ctgA",
"start": 17999,
"strand": 1,
Expand All @@ -478,6 +489,7 @@ exports[`adapter can fetch features from volvox-bed12.bed 1`] = `
{
"end": 19500,
"parentId": "test-ctgA-3",
"phase": 0,
"refName": "ctgA",
"start": 18999,
"strand": 1,
Expand All @@ -487,6 +499,7 @@ exports[`adapter can fetch features from volvox-bed12.bed 1`] = `
{
"end": 21200,
"parentId": "test-ctgA-3",
"phase": 0,
"refName": "ctgA",
"start": 20999,
"strand": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ exports[`adapter can fetch features from volvox-bed12.bed.gz 1`] = `
{
"end": 1500,
"parentId": "test-45690",
"phase": 0,
"refName": "ctgA",
"start": 1200,
"strand": 1,
Expand All @@ -283,6 +284,7 @@ exports[`adapter can fetch features from volvox-bed12.bed.gz 1`] = `
{
"end": 3902,
"parentId": "test-45690",
"phase": 0,
"refName": "ctgA",
"start": 2999,
"strand": 1,
Expand All @@ -292,6 +294,7 @@ exports[`adapter can fetch features from volvox-bed12.bed.gz 1`] = `
{
"end": 5500,
"parentId": "test-45690",
"phase": 0,
"refName": "ctgA",
"start": 4999,
"strand": 1,
Expand All @@ -301,6 +304,7 @@ exports[`adapter can fetch features from volvox-bed12.bed.gz 1`] = `
{
"end": 7608,
"parentId": "test-45690",
"phase": 0,
"refName": "ctgA",
"start": 6999,
"strand": 1,
Expand Down Expand Up @@ -342,6 +346,7 @@ exports[`adapter can fetch features from volvox-bed12.bed.gz 1`] = `
{
"end": 1500,
"parentId": "test-45787",
"phase": 0,
"refName": "ctgA",
"start": 1200,
"strand": 1,
Expand All @@ -351,6 +356,7 @@ exports[`adapter can fetch features from volvox-bed12.bed.gz 1`] = `
{
"end": 5500,
"parentId": "test-45787",
"phase": 0,
"refName": "ctgA",
"start": 4999,
"strand": 1,
Expand All @@ -360,6 +366,7 @@ exports[`adapter can fetch features from volvox-bed12.bed.gz 1`] = `
{
"end": 7608,
"parentId": "test-45787",
"phase": 0,
"refName": "ctgA",
"start": 6999,
"strand": 1,
Expand Down Expand Up @@ -410,6 +417,7 @@ exports[`adapter can fetch features from volvox-bed12.bed.gz 1`] = `
{
"end": 3902,
"parentId": "test-45875",
"phase": 0,
"refName": "ctgA",
"start": 3300,
"strand": 1,
Expand All @@ -419,6 +427,7 @@ exports[`adapter can fetch features from volvox-bed12.bed.gz 1`] = `
{
"end": 5500,
"parentId": "test-45875",
"phase": 0,
"refName": "ctgA",
"start": 4999,
"strand": 1,
Expand All @@ -428,6 +437,7 @@ exports[`adapter can fetch features from volvox-bed12.bed.gz 1`] = `
{
"end": 7600,
"parentId": "test-45875",
"phase": 0,
"refName": "ctgA",
"start": 6999,
"strand": 1,
Expand Down Expand Up @@ -469,6 +479,7 @@ exports[`adapter can fetch features from volvox-bed12.bed.gz 1`] = `
{
"end": 18800,
"parentId": "test-45972",
"phase": 0,
"refName": "ctgA",
"start": 17999,
"strand": 1,
Expand All @@ -478,6 +489,7 @@ exports[`adapter can fetch features from volvox-bed12.bed.gz 1`] = `
{
"end": 19500,
"parentId": "test-45972",
"phase": 0,
"refName": "ctgA",
"start": 18999,
"strand": 1,
Expand All @@ -487,6 +499,7 @@ exports[`adapter can fetch features from volvox-bed12.bed.gz 1`] = `
{
"end": 21200,
"parentId": "test-45972",
"phase": 0,
"refName": "ctgA",
"start": 20999,
"strand": 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ exports[`adapter can fetch features from volvox.bb 1`] = `
{
"end": 1500,
"parentId": "test-bb-358912",
"phase": 0,
"refName": "ctgA",
"start": 1200,
"strand": 1,
Expand All @@ -37,6 +38,7 @@ exports[`adapter can fetch features from volvox.bb 1`] = `
{
"end": 3902,
"parentId": "test-bb-358912",
"phase": 0,
"refName": "ctgA",
"start": 2999,
"strand": 1,
Expand All @@ -46,6 +48,7 @@ exports[`adapter can fetch features from volvox.bb 1`] = `
{
"end": 5500,
"parentId": "test-bb-358912",
"phase": 0,
"refName": "ctgA",
"start": 4999,
"strand": 1,
Expand All @@ -55,6 +58,7 @@ exports[`adapter can fetch features from volvox.bb 1`] = `
{
"end": 7608,
"parentId": "test-bb-358912",
"phase": 0,
"refName": "ctgA",
"start": 6999,
"strand": 1,
Expand Down Expand Up @@ -101,6 +105,7 @@ exports[`adapter can fetch features from volvox.bb 1`] = `
{
"end": 1500,
"parentId": "test-bb-359006",
"phase": 0,
"refName": "ctgA",
"start": 1200,
"strand": 1,
Expand All @@ -110,6 +115,7 @@ exports[`adapter can fetch features from volvox.bb 1`] = `
{
"end": 5500,
"parentId": "test-bb-359006",
"phase": 0,
"refName": "ctgA",
"start": 4999,
"strand": 1,
Expand All @@ -119,6 +125,7 @@ exports[`adapter can fetch features from volvox.bb 1`] = `
{
"end": 7608,
"parentId": "test-bb-359006",
"phase": 0,
"refName": "ctgA",
"start": 6999,
"strand": 1,
Expand Down Expand Up @@ -174,6 +181,7 @@ exports[`adapter can fetch features from volvox.bb 1`] = `
{
"end": 3902,
"parentId": "test-bb-359091",
"phase": 0,
"refName": "ctgA",
"start": 3300,
"strand": 1,
Expand All @@ -183,6 +191,7 @@ exports[`adapter can fetch features from volvox.bb 1`] = `
{
"end": 5500,
"parentId": "test-bb-359091",
"phase": 0,
"refName": "ctgA",
"start": 4999,
"strand": 1,
Expand All @@ -192,6 +201,7 @@ exports[`adapter can fetch features from volvox.bb 1`] = `
{
"end": 7600,
"parentId": "test-bb-359091",
"phase": 0,
"refName": "ctgA",
"start": 6999,
"strand": 1,
Expand Down Expand Up @@ -238,6 +248,7 @@ exports[`adapter can fetch features from volvox.bb 1`] = `
{
"end": 18800,
"parentId": "test-bb-359185",
"phase": 0,
"refName": "ctgA",
"start": 17999,
"strand": 1,
Expand All @@ -247,6 +258,7 @@ exports[`adapter can fetch features from volvox.bb 1`] = `
{
"end": 19500,
"parentId": "test-bb-359185",
"phase": 0,
"refName": "ctgA",
"start": 18999,
"strand": 1,
Expand All @@ -256,6 +268,7 @@ exports[`adapter can fetch features from volvox.bb 1`] = `
{
"end": 21200,
"parentId": "test-bb-359185",
"phase": 0,
"refName": "ctgA",
"start": 20999,
"strand": 1,
Expand Down
4 changes: 4 additions & 0 deletions plugins/bed/src/generateUcscTranscript.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export function generateUcscTranscript(data: TranscriptFeat) {
},
{
type: 'CDS',
phase: 0,
start: thickStart,
end,
refName,
Expand All @@ -69,6 +70,7 @@ export function generateUcscTranscript(data: TranscriptFeat) {
// CDS
subfeatures.push({
type: 'CDS',
phase: 0,
start,
end,
refName,
Expand All @@ -84,6 +86,7 @@ export function generateUcscTranscript(data: TranscriptFeat) {
},
{
type: 'CDS',
phase: 0,
start: thickStart,
end: thickEnd,
refName,
Expand All @@ -100,6 +103,7 @@ export function generateUcscTranscript(data: TranscriptFeat) {
subfeatures.push(
{
type: 'CDS',
phase: 0,
start,
end: thickEnd,
refName,
Expand Down

0 comments on commit ba16ba9

Please sign in to comment.