Skip to content

Commit

Permalink
Improve support of UCSC repeatmasker BigBed and BED files (#4638)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin authored Nov 6, 2024
1 parent c5ba32e commit 32ad1a6
Show file tree
Hide file tree
Showing 11 changed files with 443 additions and 89 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ export default class CytobandAdapter extends BaseAdapter {
refName: refName!,
start: +start!,
end: +end!,
name: name!,
type: type!,
name,
type,
gieStain: type || name,
})
})
}
Expand Down
3 changes: 2 additions & 1 deletion packages/core/util/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1469,10 +1469,11 @@ export function isGzip(buf: Buffer) {
}

export {
isFeature,
default as SimpleFeature,
type Feature,
type SimpleFeatureSerialized,
isFeature,
type SimpleFeatureSerializedNoId,
} from './simpleFeature'

export { blobToDataURL } from './blobToDataURL'
25 changes: 25 additions & 0 deletions plugins/bed/src/BedAdapter/__snapshots__/BedAdapter.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
exports[`adapter can fetch bed with header 1`] = `
[
{
"description": undefined,
"end": 3009,
"refName": "contigA",
"score": undefined,
Expand All @@ -13,6 +14,7 @@ exports[`adapter can fetch bed with header 1`] = `
"uniqueId": "test-contigA-0",
},
{
"description": undefined,
"end": 3114,
"refName": "contigA",
"score": undefined,
Expand All @@ -23,6 +25,7 @@ exports[`adapter can fetch bed with header 1`] = `
"uniqueId": "test-contigA-1",
},
{
"description": undefined,
"end": 3161,
"refName": "contigA",
"score": undefined,
Expand All @@ -33,6 +36,7 @@ exports[`adapter can fetch bed with header 1`] = `
"uniqueId": "test-contigA-2",
},
{
"description": undefined,
"end": 3180,
"refName": "contigA",
"score": undefined,
Expand All @@ -43,6 +47,7 @@ exports[`adapter can fetch bed with header 1`] = `
"uniqueId": "test-contigA-3",
},
{
"description": undefined,
"end": 3183,
"refName": "contigA",
"score": undefined,
Expand All @@ -53,6 +58,7 @@ exports[`adapter can fetch bed with header 1`] = `
"uniqueId": "test-contigA-4",
},
{
"description": undefined,
"end": 3222,
"refName": "contigA",
"score": undefined,
Expand All @@ -63,6 +69,7 @@ exports[`adapter can fetch bed with header 1`] = `
"uniqueId": "test-contigA-5",
},
{
"description": undefined,
"end": 3474,
"refName": "contigA",
"score": undefined,
Expand All @@ -73,6 +80,7 @@ exports[`adapter can fetch bed with header 1`] = `
"uniqueId": "test-contigA-6",
},
{
"description": undefined,
"end": 3804,
"refName": "contigA",
"score": undefined,
Expand All @@ -83,6 +91,7 @@ exports[`adapter can fetch bed with header 1`] = `
"uniqueId": "test-contigA-7",
},
{
"description": undefined,
"end": 4044,
"refName": "contigA",
"score": undefined,
Expand All @@ -93,6 +102,7 @@ exports[`adapter can fetch bed with header 1`] = `
"uniqueId": "test-contigA-8",
},
{
"description": undefined,
"end": 4082,
"refName": "contigA",
"score": undefined,
Expand Down Expand Up @@ -125,6 +135,7 @@ exports[`adapter can fetch features bed with autosql 1`] = `
"days_to_death": "--",
"dbSNP_RS": "novel",
"dbSNP_Val_Status": "",
"description": undefined,
"end": 10,
"ethnicity": "not hispanic or latino",
"freq": "0.0108695652174",
Expand Down Expand Up @@ -160,6 +171,7 @@ exports[`adapter can fetch features bed with autosql 1`] = `
exports[`adapter can fetch features from volvox.sort.bed simple bed3 1`] = `
[
{
"description": undefined,
"end": 3009,
"refName": "contigA",
"score": undefined,
Expand All @@ -170,6 +182,7 @@ exports[`adapter can fetch features from volvox.sort.bed simple bed3 1`] = `
"uniqueId": "test-contigA-0",
},
{
"description": undefined,
"end": 3114,
"refName": "contigA",
"score": undefined,
Expand All @@ -180,6 +193,7 @@ exports[`adapter can fetch features from volvox.sort.bed simple bed3 1`] = `
"uniqueId": "test-contigA-1",
},
{
"description": undefined,
"end": 3161,
"refName": "contigA",
"score": undefined,
Expand All @@ -190,6 +204,7 @@ exports[`adapter can fetch features from volvox.sort.bed simple bed3 1`] = `
"uniqueId": "test-contigA-2",
},
{
"description": undefined,
"end": 3180,
"refName": "contigA",
"score": undefined,
Expand All @@ -200,6 +215,7 @@ exports[`adapter can fetch features from volvox.sort.bed simple bed3 1`] = `
"uniqueId": "test-contigA-3",
},
{
"description": undefined,
"end": 3183,
"refName": "contigA",
"score": undefined,
Expand All @@ -210,6 +226,7 @@ exports[`adapter can fetch features from volvox.sort.bed simple bed3 1`] = `
"uniqueId": "test-contigA-4",
},
{
"description": undefined,
"end": 3222,
"refName": "contigA",
"score": undefined,
Expand All @@ -220,6 +237,7 @@ exports[`adapter can fetch features from volvox.sort.bed simple bed3 1`] = `
"uniqueId": "test-contigA-5",
},
{
"description": undefined,
"end": 3474,
"refName": "contigA",
"score": undefined,
Expand All @@ -230,6 +248,7 @@ exports[`adapter can fetch features from volvox.sort.bed simple bed3 1`] = `
"uniqueId": "test-contigA-6",
},
{
"description": undefined,
"end": 3804,
"refName": "contigA",
"score": undefined,
Expand All @@ -240,6 +259,7 @@ exports[`adapter can fetch features from volvox.sort.bed simple bed3 1`] = `
"uniqueId": "test-contigA-7",
},
{
"description": undefined,
"end": 4044,
"refName": "contigA",
"score": undefined,
Expand All @@ -250,6 +270,7 @@ exports[`adapter can fetch features from volvox.sort.bed simple bed3 1`] = `
"uniqueId": "test-contigA-8",
},
{
"description": undefined,
"end": 4082,
"refName": "contigA",
"score": undefined,
Expand All @@ -265,6 +286,7 @@ exports[`adapter can fetch features from volvox.sort.bed simple bed3 1`] = `
exports[`adapter can fetch features from volvox-bed12.bed 1`] = `
[
{
"description": undefined,
"end": 9000,
"itemRgb": "0,0,0",
"name": "EDEN.1",
Expand Down Expand Up @@ -332,6 +354,7 @@ exports[`adapter can fetch features from volvox-bed12.bed 1`] = `
"uniqueId": "test-ctgA-0",
},
{
"description": undefined,
"end": 9000,
"itemRgb": "0,0,0",
"name": "EDEN.2",
Expand Down Expand Up @@ -390,6 +413,7 @@ exports[`adapter can fetch features from volvox-bed12.bed 1`] = `
"uniqueId": "test-ctgA-1",
},
{
"description": undefined,
"end": 9000,
"itemRgb": "0,0,0",
"name": "EDEN.3",
Expand Down Expand Up @@ -457,6 +481,7 @@ exports[`adapter can fetch features from volvox-bed12.bed 1`] = `
"uniqueId": "test-ctgA-2",
},
{
"description": undefined,
"end": 23000,
"itemRgb": "0,0,0",
"name": "rna-Apple3",
Expand Down
Loading

0 comments on commit 32ad1a6

Please sign in to comment.