-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
349 additions
and
450 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
/** @type {import("ts-jest/dist/types").InitialOptionsTsJest} */ | ||
/** @type {import('ts-jest').JestConfigWithTsJest} */ | ||
module.exports = { | ||
preset: 'ts-jest', | ||
transform: { | ||
'^.+\\.(ts|js)x?$': 'ts-jest', | ||
}, | ||
testEnvironment: 'node', | ||
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\](?!quick-lru/).+\\.js$'], | ||
testTimeout: 1000, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//@ts-nocheck | ||
import { CramMalformedError } from '../errors' | ||
|
||
import { TF_SHIFT } from './constants' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//@ts-nocheck | ||
import { TF_SHIFT } from './constants' | ||
import Decoding from './decoding' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//@ts-nocheck | ||
import { CramMalformedError } from '../errors' | ||
|
||
import { RANS_BYTE_L } from './constants' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//@ts-nocheck | ||
import { CramMalformedError } from '../errors' | ||
|
||
import { TOTFREQ } from './constants' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
//@ts-nocheck | ||
import { CramMalformedError } from '../errors' | ||
|
||
import Decoding from './decoding' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`bzip2 1`] = ` | ||
{ | ||
"code": "X", | ||
"data": 1, | ||
"pos": 51, | ||
"ref": "A", | ||
"refPos": 1050, | ||
"sub": "G", | ||
} | ||
`; | ||
|
||
exports[`lzma 1`] = ` | ||
{ | ||
"code": "X", | ||
"data": 1, | ||
"pos": 51, | ||
"ref": "A", | ||
"refPos": 1050, | ||
"sub": "G", | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
//@ts-nocheck | ||
import { testDataFile } from './lib/util' | ||
import { dumpWholeFile } from './lib/dumpFile' | ||
import { CramFile } from '../src/index' | ||
import { FetchableSmallFasta } from './lib/fasta' | ||
|
||
test('lzma', async () => { | ||
const fasta = new FetchableSmallFasta(testDataFile('hts-specs/ce.fa')) | ||
const seqFetch = fasta.fetch.bind(fasta) | ||
const file = new CramFile({ | ||
filehandle: testDataFile('hts-specs/0903_comp_lzma.cram'), | ||
seqFetch, | ||
}) | ||
const fileData = await dumpWholeFile(file) | ||
const feat = fileData[2].data[1].features[0] | ||
const hardClip = feat.readFeatures[0] | ||
expect(hardClip).toMatchSnapshot() | ||
}) | ||
|
||
test('bzip2', async () => { | ||
const fasta = new FetchableSmallFasta(testDataFile('hts-specs/ce.fa')) | ||
const seqFetch = fasta.fetch.bind(fasta) | ||
const file = new CramFile({ | ||
filehandle: testDataFile('hts-specs/0902_comp_bz2.cram'), | ||
seqFetch, | ||
}) | ||
const fileData = await dumpWholeFile(file) | ||
const feat = fileData[2].data[1].features[0] | ||
const hardClip = feat.readFeatures[0] | ||
expect(hardClip).toMatchSnapshot() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.