劉小澤寫于2020.4.6
記錄一個(gè)小知識(shí)點(diǎn)突琳,比對(duì)后SAM/BAM的CIGAR這一列中的含義北苟,重點(diǎn)是soft clipping 和 hard clipping的理解
首先了解SAM/BAM中的CIGAR含義
看這篇:再次理解SAM/BAM操作
根據(jù)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)
然后來看什么是clipped alignment和spliced alignment
-
clipped alignment:read只有中間部分能比對(duì)上型型,而兩側(cè)在比對(duì)過程中被忽略
# 3S4M1D5M3S(3 soft, 4 match, 1 deletion, 5 match and 3 soft) Read: CGATTGC-TCCGCCAGG | |||| |||||| Ref:CCGATCGAGACTTGCGTCCGCCTCCCGATCA
-
spliced alignment:read一端比對(duì)上硕勿,跳過了中間,然后另一端也比對(duì)上【CIGAR中用“N”表示】如果是轉(zhuǎn)錄組數(shù)據(jù)的比對(duì)結(jié)果,N表示內(nèi)含子极阅;其他類型組學(xué)數(shù)據(jù)中N也可以用涨享,但沒有意義筋搏,和deletion一個(gè)意思(參考: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測(cè)序reads的比對(duì)奔脐,也可以全部用D來表示:即3M1D4M13D3M
然后clipped alignment有兩種形式
分為soft和hard(在SAM/BAM的CIGAR列分別用“S”和“H”表示),它們很相似吁讨,不同是:
soft-clipped: bases in 5' and 3' of the read are NOT part of the alignment. 這部分沒比對(duì)上但保留在了SAM/BAM比對(duì)結(jié)果中
-
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 這部分沒比對(duì)上并且沒有保留在SAM/BAM比對(duì)結(jié)果中
# 還是上面??clipped alignment的例子: # 如果是:3H4M1D5M3H,那么保留在SAM中的結(jié)果就是:TTGCTCCGCC建丧,而不是CGATTGCTCCGCCAGG(雖然CGA沒有比對(duì)上,但依然在soft clipped結(jié)果中保留下來) Read: TTGC-TCCGCC | |||| |||||| Ref:CCGATCGAGACTTGCGTCCGCCTCCCGATCA
- soft-clipped: if your cigar is
10S10M10S
then the SEQ and base-quals will be 30 bases long. 利用soft-clipping算法可以避開由于read兩側(cè)質(zhì)量低而導(dǎo)致整條read比對(duì)不上的現(xiàn)象橄维。不過即使被標(biāo)記為soft clipped保留下來尺铣,依然不會(huì)在找變異争舞、基因組瀏覽器可視化凛忿、計(jì)算覆蓋度等過程中被使用(例如https://www.biostars.org/p/255062/中就提到:在計(jì)算基因組覆蓋度時(shí)竞川,幾乎全部工具bamCoverage/multiBamSummary
甚至samtools view -c
都會(huì)忽略soft clip情況) - hard-clipped: if your cigar is:
10H10M10H
then the SEQ will only be 10 bases long.
那么什么時(shí)候標(biāo)記Hard clip,什么時(shí)候標(biāo)記Soft clip呢委乌?
參考: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 clippingchimeric alignment: “嵌合比對(duì)” 的形成是由于一條測(cè)序read比對(duì)到基因組上時(shí)分別比對(duì)到兩個(gè)不同的區(qū)域遭贸,而這兩個(gè)區(qū)域基本沒有overlap戈咳。因此它在sam文件中需要占用多行記錄顯示。只有第一個(gè)記錄被稱作"representative",其他的都是"supplementary"【Chimeric reads are also called split reads】革砸;RNA-seq中的chimeric read或許可以說明有融合基因存在除秀,但在基因組中一般作為結(jié)構(gòu)變異的證據(jù)
歡迎關(guān)注我們的公眾號(hào)~_~
我們是兩個(gè)農(nóng)轉(zhuǎn)生信的小碩糯累,打造生信星球算利,想讓它成為一個(gè)不拽術(shù)語、通俗易懂的生信知識(shí)平臺(tái)泳姐。需要幫助或提出意見請(qǐng)后臺(tái)留言或發(fā)送郵件到jieandze1314@gmail.com