@gmod/bgzf- filehandle (英语)
读取 块- gzip (BGZF) 使用 未压缩坐标. 翻译:, (中文(简体) ), @gmod/tabix (英语) 财务报告和审定财务报表 @gmod/indexedfasta (英语) 以它为基础.
- 在: bgzip 文件及其内容
.gzi指数,或 BAI/TBI 指数的块 - 输出 : 解压字节
- 充气装置 无罪释放 编译为
Web Assembly)和内嵌为基数64,所以没有
.wasm要服务的文件 。 打开 这个雷波的固定装置 它运行速度比帕克快2 -3x (单位:千美元)基准(中文(简体) )
安装
npm install @gmod/bgzf-filehandle
Bgzf Filehandle (英语)
import { BgzfFilehandle } from '@gmod/bgzf-filehandle'
import { LocalFile } from 'generic-filehandle2'
const f = new BgzfFilehandle({
filehandle: new LocalFile('my_file.gz'),
gziFilehandle: new LocalFile('my_file.gz.gzi'),
})
const data = await f.read(300, 0) // length, position
创建索引 bgzip -i my_file,或 bgzip -r my_file.gz 用于
已有文件。 对于远程文件,请将其包入
@gmod/range-cache-filehandle。 。 。 .
调色调
解压缩 BGZF 或平方 gzip 缓冲 :
import { unzip } from '@gmod/bgzf-filehandle'
const decompressed = await unzip(compressedData)
unzipChunk 切片
解压缩块 {minv, maxv} 取自 BAI 或 TBI 指数,每端为 a
页:1 {blockPosition, dataPosition}数字 :
import { MAX_BGZF_BLOCK_SIZE, unzipChunkSlice } from '@gmod/bgzf-filehandle'
// read one max-size block past maxv, since nothing records that block's length
const compressedData = await filehandle.read(
maxv.blockPosition + MAX_BGZF_BLOCK_SIZE - minv.blockPosition,
minv.blockPosition,
)
const { buffer, cpositions, dpositions } = await unzipChunkSlice(
compressedData,
{ minv, maxv },
)
cpositions 财务报告和审定财务报表 dpositions 持有块边界,用于构建特性标识
保持稳定 跨越块.
第三个论点将块块分散在网络工人之间,这就使得 多兆字节块 1.1-2.0x 更快 (单位:千美元)医生/工人库:
import { getSharedWorkerPool } from '@gmod/bgzf-filehandle'
const pool = await getSharedWorkerPool() // undefined without Worker support
const result = await unzipChunkSlice(compressedData, { minv, maxv }, pool)
unzipChunkSegments 将相同的参数并跳过最后副本为一
缓冲器,用于可以分解分界的读取器
(单位:千美元)医生/工人库) (中文(简体) ).
文档
- 文件/优化: 术语、基准和
为什么
DecompressionStream - 医生/工人库:规模、生命周期和测量
学术用途
写为 (原始内容存档于2018-09-21) (韩语). NHGRI 供资,作为 J 浏览如果您在出版物中使用,请引用 最近JBrowse的论文 jbrowse.org (英语)。 。 。 .