今天是生信星球陪你的第587天
大神一句话,菜鸟跑半年。我不是大神,但我可以缩短你走弯路的半年~
就像歌儿唱的那样,如果你不知道该往哪儿走,就留在这学点生信好不好~
这里有豆豆和花花的学习历程,从新手到进阶,生信路上有你有我!
豆豆写于2020.4.6
发现昨天被花花吐槽了一下,不行,赶快还花花一篇,作为补偿
记录一个小知识点,比对后SAM/BAM的CIGAR这一列中的含义,重点是soft clipping 和 hard clipping的理解
看这篇:再次理解SAM/BAM操作
根据sam的帮助文档:http://samtools.sourceforge.net/SAM1.pdf
op Description
M Alignment match (can be a sequence match or mismatch
I Insertion to the reference
D Deletion from the reference
N Skipped region from the reference
S Soft clip on the read (clipped sequence present in <seq>)
H Hard clip on the read (clipped sequence NOT present in <seq>)
P Padding (silent deletion from the padded reference sequence)
参考:https://davetang.org/wiki/tiki-index.php?page=SAM
clipped alignment:read只有中间部分能比对上,而两侧在比对过程中被忽略
# 3S4M1D5M3S(3 soft, 4 match, 1 deletion, 5 match and 3 soft)
Read: CGATTGC-TCCGCCAGG
| |||| ||||||
Ref:CCGATCGAGACTTGCGTCCGCCTCCCGATCA
spliced alignment:read一端比对上,跳过了中间,然后另一端也比对上【CIGAR中用“N”表示】如果是转录组数据的比对结果,N表示内含子;其他类型组学数据中N也可以用,但没有意义,和deletion一个意思(参考:https://www.biostars.org/p/96347/)
# 3M1D4M13N5M
# This only makes sense when you're aligning things like cDNA/expression data.
REF: ATCGATCGATCGATCGATCGATCGATCGATCG
||||||||||||||||||||||||||
QUERY: ATC-ATCG-------------ATCAT
# 如果是DNA测序reads的比对,也可以全部用D来表示:即3M1D4M13D3M
分为soft和hard(在SAM/BAM的CIGAR列分别用“S”和“H”表示),它们很相似,不同是:
来自:https://www.biostars.org/p/119537/
soft-clipped: bases in 5' and 3' of the read are NOT part of the alignment. 这部分没比对上但保留在了SAM/BAM比对结果中
hard-clipped: bases in 5' and 3' of the read are NOT part of the alignment AND those bases have been removed from the read sequence in the BAM file 这部分没比对上并且没有保留在SAM/BAM比对结果中
# 还是上面👆clipped alignment的例子:
# 如果是:3H4M1D5M3H,那么保留在SAM中的结果就是:TTGCTCCGCC,而不是CGATTGCTCCGCCAGG(虽然CGA没有比对上,但依然在soft clipped结果中保留下来)
Read: TTGC-TCCGCC
| |||| ||||||
Ref:CCGATCGAGACTTGCGTCCGCCTCCCGATCA
来自:https://www.biostars.org/p/109333/
soft-clipped: if your cigar is 10S10M10S
then the SEQ and base-quals will be 30 bases long. 利用soft-clipping算法可以避开由于read两侧质量低而导致整条read比对不上的现象。不过即使被标记为soft clipped保留下来,依然不会在找变异、基因组浏览器可视化、计算覆盖度等过程中被使用(例如https://www.biostars.org/p/255062/中就提到:在计算基因组覆盖度时,几乎全部工具bamCoverage/multiBamSummary
甚至samtools view -c
都会忽略soft clip情况)
hard-clipped: if your cigar is: 10H10M10H
then the SEQ will only be 10 bases long.
参考:https://www.biostars.org/p/310722/ 和 https://www.biostars.org/p/109333/
in bwa, HARD clipping is used for supplementary reads.
if the read has a chimeric alignment, the paired
or the top hit uses soft clipping ;All the other hits part of the chimeric alignment will use hard clipping
chimeric alignment: “嵌合比对” 的形成是由于一条测序read比对到基因组上时分别比对到两个不同的区域,而这两个区域基本没有overlap。因此它在sam文件中需要占用多行记录显示。只有第一个记录被称作"representative",其他的都是"supplementary"【Chimeric reads are also called split reads】;RNA-seq中的chimeric read或许可以说明有融合基因存在,但在基因组中一般作为结构变异的证据
点击底部的“阅读原文”,获得更好的阅读体验哦😻
初学生信,很荣幸带你迈出第一步
🤓生信星球 🌎~ 一个不拽术语、通俗易懂的生信知识平台