-
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.
Add lzma codec with xz-decompress package (#130)
- Loading branch information
Showing
30 changed files
with
1,854 additions
and
1,504 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"semi": false, | ||
"trailingComma": "all", | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"arrowParens": "avoid", | ||
"endOfLine": "auto" | ||
"proseWrap": "always" | ||
} |
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
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
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
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('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('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() | ||
}) |
Binary file not shown.
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,7 @@ | ||
@SQ SN:CHROMOSOME_I LN:1009800 M5:8ede36131e0dbf3417807e48f77f3ebd UR:/nfs/users/nfs_j/jkb/work/samtools_master/hts-specs/test/CRAM/passed/ce.fa | ||
@RG ID:rg SM:test | ||
@RG ID:rg2 SM:test | ||
r1 99 CHROMOSOME_I 1000 40 100M = 1200 300 ATTTTTCGGGTTTTTTGAAATGAATATCGTAGCTACAGAAACGGTTGTGCGNGCATCTGAAAGTTTGTTTTTCTTGTTTTCTTGCACTTTGTGCAGAATT #############################@B?8B?BA@@DDBCDDCBC@CDCDCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC RG:Z:rg | ||
r1 147 CHROMOSOME_I 1200 40 100M = 1000 -300 TTTTTTTAGAAAAATTATTTTTAAGAATTTTTCATTTTAGGAATATTGTTCNCTCAGAAAATAGCTAAATGTGATTTCTGTAATTTTGCCTGCCAAATTC #############################@B?8B?BA@@DDBCDDCBC@CDCDCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC RG:Z:rg | ||
r2 99 CHROMOSOME_I 1000 40 100M = 1200 300 ATTTTTCGGGTTTTTTGAAATGAATATCGTAGCTACAGAAACGGTTGTGCGNGCATCTGAAAGTTTGTTTTTCTTGTTTTCTTGCACTTTGTGCAGAATT #############################@B?8B?BA@@DDBCDDCBC@CDCDCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC RG:Z:rg2 | ||
r2 147 CHROMOSOME_I 1200 40 100M = 1000 -300 TTTTTTTAGAAAAATTATTTTTAAGAATTTTTCATTTTAGGAATATTGTTCNCTCAGAAAATAGCTAAATGTGATTTCTGTAATTTTGCCTGCCAAATTC #############################@B?8B?BA@@DDBCDDCBC@CDCDCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC RG:Z:rg2 |
Binary file not shown.
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,7 @@ | ||
@SQ SN:CHROMOSOME_I LN:1009800 M5:8ede36131e0dbf3417807e48f77f3ebd UR:/nfs/users/nfs_j/jkb/work/samtools_master/hts-specs/test/CRAM/passed/ce.fa | ||
@RG ID:rg SM:test | ||
@RG ID:rg2 SM:test | ||
r1 99 CHROMOSOME_I 1000 40 100M = 1200 300 ATTTTTCGGGTTTTTTGAAATGAATATCGTAGCTACAGAAACGGTTGTGCGNGCATCTGAAAGTTTGTTTTTCTTGTTTTCTTGCACTTTGTGCAGAATT #############################@B?8B?BA@@DDBCDDCBC@CDCDCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC RG:Z:rg | ||
r1 147 CHROMOSOME_I 1200 40 100M = 1000 -300 TTTTTTTAGAAAAATTATTTTTAAGAATTTTTCATTTTAGGAATATTGTTCNCTCAGAAAATAGCTAAATGTGATTTCTGTAATTTTGCCTGCCAAATTC #############################@B?8B?BA@@DDBCDDCBC@CDCDCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC RG:Z:rg | ||
r2 99 CHROMOSOME_I 1000 40 100M = 1200 300 ATTTTTCGGGTTTTTTGAAATGAATATCGTAGCTACAGAAACGGTTGTGCGNGCATCTGAAAGTTTGTTTTTCTTGTTTTCTTGCACTTTGTGCAGAATT #############################@B?8B?BA@@DDBCDDCBC@CDCDCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC RG:Z:rg2 | ||
r2 147 CHROMOSOME_I 1200 40 100M = 1000 -300 TTTTTTTAGAAAAATTATTTTTAAGAATTTTTCATTTTAGGAATATTGTTCNCTCAGAAAATAGCTAAATGTGATTTCTGTAATTTTGCCTGCCAAATTC #############################@B?8B?BA@@DDBCDDCBC@CDCDCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC RG:Z:rg2 |
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
Oops, something went wrong.