匿名
未登录
登录
医学百科
搜索
查看“CRAM”的源代码
来自医学百科
名字空间
页面
更多
更多
语言
页面选项
Read
查看源代码
历史
←
CRAM
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看和复制此页面的源代码。
<div style="padding: 0 4%; line-height: 1.8; color: #1e293b; font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', Arial, sans-serif; background-color: #ffffff; max-width: 1200px; margin: auto;"> <div style="margin-bottom: 30px; border-bottom: 1.2px solid #e2e8f0; padding-bottom: 25px;"> <p style="font-size: 1.1em; margin: 10px 0; color: #334155; text-align: justify;"> <strong>CRAM</strong>(Compressed Reference-oriented Alignment Map,<strong>压缩参考导向比对图</strong>)是新一代的高通量测序数据存储格式,由 <strong>[[EBI]]</strong>(欧洲生物信息学研究所)和 <strong>[[Sanger Institute]]</strong> 开发,现由 <strong>[[GA4GH]]</strong> 维护。 <br>旨在取代体积庞大的 <strong>[[BAM]]</strong> 格式,CRAM 采用了创新的<strong>“基于参考序列的压缩”</strong>(Reference-based Compression)策略。它不直接存储测序 Reads 的完整序列,而是只记录 Reads 与<strong>[[参考基因组]]</strong>(Reference Genome)之间的<strong>差异</strong>(如变异、测序错误)。 <br>通过这种“做减法”的方式,CRAM 在无损模式下可比 BAM 节省 <strong>30% - 50%</strong> 的存储空间;若启用有损压缩(如对质量值进行分箱),压缩率可达 BAM 的 10 倍以上,大大降低了基因组大数据的存储成本。 </p> </div> <div class="medical-infobox mw-collapsible mw-collapsed" style="width: 100%; max-width: 320px; margin: 0 auto 35px auto; border: 1.2px solid #bae6fd; border-radius: 12px; background-color: #ffffff; box-shadow: 0 8px 20px rgba(0,0,0,0.05); overflow: hidden;"> <div style="padding: 15px; color: #1e40af; background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%); text-align: center; cursor: pointer;"> <div style="font-size: 1.2em; font-weight: bold; letter-spacing: 1.2px;">CRAM</div> <div style="font-size: 0.7em; opacity: 0.85; margin-top: 4px; white-space: nowrap;">High-Compression Alignment Format (点击展开)</div> </div> <div class="mw-collapsible-content"> <div style="padding: 25px; text-align: center; background-color: #f8fafc;"> <div style="font-size: 0.8em; color: #64748b; margin-top: 12px; font-weight: 600;">大数据的“瘦身专家”</div> </div> <table style="width: 100%; border-spacing: 0; border-collapse: collapse; font-size: 0.85em;"> <tr> <th colspan="2" style="padding: 8px 12px; background-color: #e0f2fe; color: #1e40af; text-align: left; font-size: 0.9em; border-top: 1px solid #bae6fd;">格式档案</th> </tr> <tr> <th style="text-align: left; padding: 6px 12px; background-color: #f8fafc; color: #475569; border-bottom: 1px solid #e2e8f0; width: 40%;">全称</th> <td style="padding: 6px 12px; border-bottom: 1px solid #e2e8f0; color: #0f172a;">Compressed Reference-oriented Alignment Map</td> </tr> <tr> <th style="text-align: left; padding: 6px 12px; background-color: #f8fafc; color: #475569; border-bottom: 1px solid #e2e8f0;">扩展名</th> <td style="padding: 6px 12px; border-bottom: 1px solid #e2e8f0; color: #1e40af;"><code>.cram</code></td> </tr> <tr> <th style="text-align: left; padding: 6px 12px; background-color: #f8fafc; color: #475569; border-bottom: 1px solid #e2e8f0;">索引文件</th> <td style="padding: 6px 12px; border-bottom: 1px solid #e2e8f0; color: #e11d48;"><code>.crai</code></td> </tr> <tr> <th style="text-align: left; padding: 6px 12px; background-color: #f8fafc; color: #475569; border-bottom: 1px solid #e2e8f0;">维护机构</th> <td style="padding: 6px 12px; border-bottom: 1px solid #e2e8f0; color: #0f172a;">[[GA4GH]]</td> </tr> <tr> <th style="text-align: left; padding: 6px 12px; background-color: #f8fafc; color: #475569; border-bottom: 1px solid #e2e8f0;">主要依赖</th> <td style="padding: 6px 12px; border-bottom: 1px solid #e2e8f0; color: #e11d48;">原始参考基因组 (Fasta)</td> </tr> <tr> <th colspan="2" style="padding: 8px 12px; background-color: #e0f2fe; color: #1e40af; text-align: left; font-size: 0.9em; border-top: 1px solid #bae6fd;">特性对比</th> </tr> <tr> <th style="text-align: left; padding: 6px 12px; background-color: #f8fafc; color: #475569; border-bottom: 1px solid #e2e8f0;">压缩率</th> <td style="padding: 6px 12px; border-bottom: 1px solid #e2e8f0; color: #16a34a;">极高 (比 BAM 小 50%+)</td> </tr> <tr> <th style="text-align: left; padding: 6px 12px; background-color: #f8fafc; color: #475569; border-bottom: 1px solid #e2e8f0;">独立性</th> <td style="padding: 6px 12px; border-bottom: 1px solid #e2e8f0; color: #e11d48;">低 (依赖参考序列)</td> </tr> <tr> <th style="text-align: left; padding: 6px 12px; background-color: #f8fafc; color: #475569; border-bottom: 1px solid #e2e8f0;">有损压缩</th> <td style="padding: 6px 12px; border-bottom: 1px solid #e2e8f0; color: #1e40af;">支持 (质量值分箱)</td> </tr> <tr> <th style="text-align: left; padding: 6px 12px; background-color: #f8fafc; color: #475569;">支持工具</th> <td style="padding: 6px 12px; color: #0f172a;">[[Samtools]], [[GATK]], [[IGV]]</td> </tr> </table> </div> </div> <h2 style="background: #f1f5f9; color: #0f172a; padding: 10px 18px; border-radius: 0 6px 6px 0; font-size: 1.25em; margin-top: 40px; border-left: 6px solid #0f172a; font-weight: bold;">核心原理:差量编码 (Delta Encoding)</h2> <p style="margin: 15px 0; text-align: justify;"> BAM 像是在抄书,把每个字母都抄下来;而 CRAM 像是在做“改错题”,只记录哪里与标准答案(参考基因组)不一样。 </p> <div style="background-color: #f0f9ff; border-left: 5px solid #1e40af; padding: 15px 20px; margin: 20px 0; border-radius: 4px;"> <ul style="margin: 0; padding-left: 20px; color: #334155;"> <li style="margin-bottom: 12px;"><strong>匹配 (Match):</strong> 如果 Read 上的某个碱基与参考基因组一致,CRAM <strong>不存储</strong>该碱基,只记录“此处匹配”。因为参考基因组是已知的,解码时查表即可恢复。</li> <li style="margin-bottom: 12px;"><strong>差异 (Difference):</strong> 只有当 Read 上的碱基是 [[SNP]]、[[Indel]] 或测序错误时,CRAM 才会记录具体的碱基序列和质量值。</li> <li style="margin-bottom: 0;"><strong>致命依赖:</strong> 由于 CRAM 省略了大量“重复”信息,解码(读取)CRAM 文件时<strong>必须</strong>提供原始的参考基因组文件(.fasta)。如果参考基因组版本搞错或文件丢失,CRAM 文件将无法读取。</li> </ul> </div> <h2 style="background: #f1f5f9; color: #0f172a; padding: 10px 18px; border-radius: 0 6px 6px 0; font-size: 1.25em; margin-top: 40px; border-left: 6px solid #0f172a; font-weight: bold;">无损 vs. 有损:质量值的取舍</h2> <p style="margin: 15px 0; text-align: justify;"> 测序仪产生的质量值(Quality Score)占据了 BAM 文件 50% 以上的体积。CRAM 提供了灵活的策略来处理这些数据。 </p> <div style="overflow-x: auto; margin: 20px auto;"> <table style="width: 100%; border-collapse: collapse; border: 1.2px solid #cbd5e1; font-size: 0.9em; text-align: left;"> <tr style="background-color: #f1f5f9; border-bottom: 2px solid #0f172a;"> <th style="padding: 12px; border: 1px solid #cbd5e1; color: #0f172a; width: 20%;">模式</th> <th style="padding: 12px; border: 1px solid #cbd5e1; color: #1e40af; width: 40%;">处理方式</th> <th style="padding: 12px; border: 1px solid #cbd5e1; color: #475569; width: 40%;">适用场景</th> </tr> <tr> <td style="padding: 10px; border: 1px solid #cbd5e1; font-weight: 600;">无损压缩<br>(Lossless)</td> <td style="padding: 10px; border: 1px solid #cbd5e1;">完整保留每个碱基的 Phred 分数。</td> <td style="padding: 10px; border: 1px solid #cbd5e1;">临床诊断、需要最高精度的变异检测。</td> </tr> <tr> <td style="padding: 10px; border: 1px solid #cbd5e1; font-weight: 600;">质量值分箱<br>(Binning)</td> <td style="padding: 10px; border: 1px solid #cbd5e1;">将相似的分数归为一类(如 Q33, Q34 -> Q30)。减少信息熵,大幅提高压缩率。</td> <td style="padding: 10px; border: 1px solid #cbd5e1;">大规模人群队列研究(如 [[1000 Genomes]]),此时细微的质量差异对统计结果影响不大。</td> </tr> <tr> <td style="padding: 10px; border: 1px solid #cbd5e1; font-weight: 600;">完全丢弃<br>(No Qual)</td> <td style="padding: 10px; border: 1px solid #cbd5e1;">不存储质量值(或全设为默认值)。</td> <td style="padding: 10px; border: 1px solid #cbd5e1;">长期归档存储(Archiving),仅保留序列信息。</td> </tr> </table> </div> <div style="font-size: 0.92em; line-height: 1.6; color: #1e293b; margin-top: 50px; border-top: 2px solid #0f172a; padding: 15px 25px; background-color: #f8fafc; border-radius: 0 0 10px 10px;"> <span style="color: #0f172a; font-weight: bold; font-size: 1.05em; display: inline-block; margin-bottom: 15px;">关键相关概念 [Key Concepts]</span> <p style="margin: 12px 0; border-bottom: 1px solid #e2e8f0; padding-bottom: 10px;"> <strong>1. Reference Cache (参考序列缓存):</strong> 为了避免每次都手动指定参考基因组路径,[[Samtools]] 和 CRAM 使用一个环境变量(<code>REF_PATH</code>)或 EBI 的在线服务,自动下载并缓存所需的参考序列片段。 </p> <p style="margin: 12px 0; border-bottom: 1px solid #e2e8f0; padding-bottom: 10px;"> <strong>2. .crai Index:</strong> CRAM 的索引文件。类似于 BAM 的 <code>.bai</code>,它也是压缩的(gzipped),支持随机访问。通过它,[[IGV]] 可以快速跳转到 CRAM 文件的任意染色体位置。 </p> <p style="margin: 12px 0;"> <strong>3. GA4GH (Global Alliance for Genomics and Health):</strong> 全球基因组学与健康联盟。CRAM 格式的官方维护者。他们推动 CRAM 成为基因组数据的国际交换标准,以应对 EB/PB 级的数据海啸。 </p> </div> <div style="font-size: 0.92em; line-height: 1.6; color: #1e293b; margin-top: 20px; border-top: 2px solid #0f172a; padding: 15px 25px; background-color: #ffffff;"> <span style="color: #0f172a; font-weight: bold; font-size: 1.05em; display: inline-block; margin-bottom: 15px;">学术参考文献 [Academic Review]</span> <p style="margin: 12px 0; border-bottom: 1px solid #e2e8f0; padding-bottom: 10px;"> [1] <strong>Fritz MH, Leinonen R, Silverton T, et al. (2011).</strong> <em>Efficient storage of high-throughput DNA sequencing data using reference-based compression.</em> <strong>[[Genome Res]]</strong>. <br> <span style="color: #475569;">[点评]:CRAM 概念的开创性论文。首次提出了利用参考基因组进行差量压缩的理论框架。</span> </p> <p style="margin: 12px 0; border-bottom: 1px solid #e2e8f0; padding-bottom: 10px;"> [2] <strong>Bonfield JK, et al. (2021).</strong> <em>The SAM/BAM/CRAM format specifications.</em> <strong>[[GitHub / HTS-Specs]]</strong>. <br> <span style="color: #475569;">[点评]:官方技术规范。详细定义了 CRAM v3.0 的编码细节,是软件开发者(如 GATK 团队)必须遵循的标准。</span> </p> </div> <div style="margin: 40px 0; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; font-family: 'Helvetica Neue', Arial, sans-serif; font-size: 0.9em;"> <div style="background-color: #eff6ff; color: #1e40af; padding: 8px 15px; font-weight: bold; text-align: center; border-bottom: 1px solid #dbeafe;"> 生物信息学 · 知识图谱 </div> <table style="width: 100%; border-collapse: collapse; background-color: #ffffff;"> <tr style="border-bottom: 1px solid #f1f5f9;"> <td style="width: 85px; background-color: #f8fafc; color: #334155; font-weight: 600; padding: 10px 12px; text-align: right; vertical-align: middle;">上级分类</td> <td style="padding: 10px 15px; color: #334155;">[[生物信息学]] • 文件格式</td> </tr> <tr style="border-bottom: 1px solid #f1f5f9;"> <td style="width: 85px; background-color: #f8fafc; color: #334155; font-weight: 600; padding: 10px 12px; text-align: right; vertical-align: middle;">核心技术</td> <td style="padding: 10px 15px; color: #334155;">参考导向压缩 • 质量值分箱</td> </tr> <tr> <td style="width: 85px; background-color: #f8fafc; color: #334155; font-weight: 600; padding: 10px 12px; text-align: right; vertical-align: middle;">前身格式</td> <td style="padding: 10px 15px; color: #334155;">[[BAM]] • [[SAM]] • [[FASTQ]]</td> </tr> </table> </div> </div>
返回至
CRAM
。
导航
导航
症状百科
疾病百科
药品百科
中医百科
中药百科
人体穴位图
全国医院列表
功能菜单
最近更改
随机页面
Wiki工具
Wiki工具
特殊页面
页面工具
页面工具
用户页面工具
更多
链入页面
相关更改
页面信息
页面日志