翻译:
读取 .hic 联系人矩阵文件,在Node.js或浏览器中.
@gmod/hic 是一个叉子 高地画, (中文(简体) ),
在 TypeScript 中重写为获取多个区域对的基因组浏览器
一次超过任意的取景窗口.
安装
$ npm install @gmod/hic
使用量
import { HicFile } from '@gmod/hic'
const hic = new HicFile({ path: 'path/to/file.hic' })
const meta = await hic.getMetaData()
// { version, genome, chromosomes: [{ index, name, size }], resolutions }
await hic.getNormalizationOptions() // ['NONE', 'VC', 'VC_SQRT', 'KR', 'SCALE']
const region = { chr: '1', start: 0, end: 20_000_000 }
const { records, appliedNormalization, transposed } =
await hic.getContactRecords('KR', region, region, 2_500_000)
// records is struct-of-arrays: three parallel typed arrays
records.bin1 // Int32Array of bin indices along region1
records.bin2 // Int32Array of bin indices along region2
records.counts // Float32Array of contact counts
getNormalizationOptions() 财务报告和审定财务报表 getContactRecords() 使用可选的跟踪
{ onProgress },称为 (current, total); 见
文件/附录。 。 。 .
await hic.getContactRecords('KR', region, region, 2_500_000, {
onProgress: (current, total) => showBar(current / total),
})
每个同步方法也都需要一个 AbortSignal 同样的方式, { signal },以及
转发到每个已读;见 文件/附录。 。 。 .
在浏览器中,或对于HTTP上的文件,通过一个 filehandle 从
generic-filehandle2
而不是一个 path数字 :
import { RemoteFile } from 'generic-filehandle2'
const hic = new HicFile({
filehandle: new RemoteFile('https://example.com/file.hic'),
})
通过HTTP,在下面放一个字节距缓存. 一个查询读取了许多小
分散的块,所以请求数设置了负载时间.
@gmod/range-cache-filehandle
从 69 GB ENCODE 文件切换到 24.0 s 到 1. 8 s
(单位:千美元)文件/优化) (中文(简体) ).
import { RemoteFileWithRangeCache } from '@gmod/range-cache-filehandle'
const hic = new HicFile({
filehandle: new RemoteFileWithRangeCache('https://example.com/file.hic'),
})
拥有自己的 IO 层或缓存的呼叫者可以提供任何读取 length
字节数 position数字 :
const hic = new HicFile({
reader: { read: (position, length) => myCache.read(position, length) },
})
见 文件/附录 用于完整的API参考.
页:1
- Bin 指数为 绝对的染色体,而不是相对于 请求区域.
- A 类
.hic只存储bin1 <= bin2矩阵的一半,所以查询其x 窗口的右侧是 y 窗口被交换.transposed标记交换, 财务报告和审定财务报表bin1然后继续走region2。 。 。 . appliedNormalization用户名称 和你要求的不一样 文件存储矢量每( 类型 :, 染色体,单位,二进制大小,可以提供KR以5kb,而无提供为2.5mb.- Bins 仅是碱基对;此叉会降低FRAG( 限制- 分解) 代码路径.
- 与文件本身完全吻合,没有
chr别名. - 每个
HicFile缓存最多128 MB 已解压的联系人,并丢入 a 屏蔽三分钟内没有读取。 过blockCacheMaxBytes更改 或共享的blockCacheBudget将多个文件绑在一起. - 记录顺序未说明——结果将整块组合,缓存 先来一杯.
文档
- 文件/附录 ——每个构造器选项,方法和返回形状
- 文件/数据流.md ——取来如何流出,为什么路径 叉入两条链
- 文件/优化 业绩对照 高高地画,什么衡量它
- 文件/正确性 ——分析与 高地画
- 捐款额 - 发展和释放步骤
学术用途
这一一揽子计划是利用来自 (原始内容存档于2018-09-21) (韩语). NHGRI 作为 页:1 J 浏览 项目。 如果你在学术中使用它 请引用最近发表的JBrowse论文 链接从 jbrowse.org (英语)。 。 。 .
如果您使用 .hic 请同时引用来自
艾登实验室由谁做的.
许可证
麻省理工学院,如上游高地画;见 自由主义。 。 。 .