Skip to content

Commit

Permalink
Update snaps
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed Feb 7, 2025
1 parent 2d294b6 commit e89f0de
Show file tree
Hide file tree
Showing 3 changed files with 766 additions and 750 deletions.
4 changes: 3 additions & 1 deletion plugins/gtf/src/GtfAdapter/GtfAdapter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ describe('adapter can fetch features from volvox.sorted.gtf', () => {
refName: 'ctgA',
start: 0,
end: 100000,
assemblyName: 'volvox',
})
expect(await adapter.hasDataForRefName('ctgA')).toBe(true)
expect(await adapter.hasDataForRefName('ctgB')).toBe(false)
const featuresArray = await firstValueFrom(features.pipe(toArray()))
// There are only 4 features in ctgB
expect(featuresArray.length).toBe(6)
expect(featuresArray.length).toBe(4)
const featuresJsonArray = featuresArray.map(f => f.toJSON())
expect(featuresJsonArray).toMatchSnapshot()
})
Expand All @@ -47,6 +48,7 @@ test('can instantiate new GtfAdapter and check for demo data', async () => {
refName: 'GeneScaffold_1',
start: 0,
end: 1100000,
assemblyName: 'volvox',
})
const featuresArray = await firstValueFrom(features.pipe(toArray()))
const featuresJsonArray = featuresArray.map(f => f.toJSON())
Expand Down
4 changes: 2 additions & 2 deletions plugins/gtf/src/GtfAdapter/GtfAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ export default class GtfAdapter extends BaseFeatureDataAdapter {
} else {
observer.next(
new SimpleFeature({
id: `${this.id}-${feat.uniqueId}`,
id: feat.uniqueId,
data: feat,
}),
)
Expand All @@ -211,7 +211,7 @@ export default class GtfAdapter extends BaseFeatureDataAdapter {
const { uniqueId, strand } = subfeatures[0]!
observer.next(
new SimpleFeature({
id: `${this.id}-${uniqueId}-parent`,
id: `${uniqueId}-parent`,
data: {
type: 'gene',
subfeatures,
Expand Down
Loading

0 comments on commit e89f0de

Please sign in to comment.