日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

sam格式的结构和意义_SAM格式的学习

發布時間:2024/9/30 编程问答 29 豆豆
生活随笔 收集整理的這篇文章主要介紹了 sam格式的结构和意义_SAM格式的学习 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Sam格式在NGS中是一個不可或缺的格式,所以我們必須對其有一定了解。網上有很多文章對其有講解,我當初也是看了那些文章入門的,當然最后只懂了每列是干嘛用的,但是具體每個標識代表什么含義卻一知半解。雖然這不影響后續的學習以及相關的分析,但是對于這個一個這么重要的格式來說,這是不夠的。

比如我們都知道SAM格式分為頭部分和比對部分,那么頭部分每個符號代表什么意思呢

我們知道SAM格式主要應用在測序數據mapping到參考基因組上(或者其他序列),那么知道什么是線性比對,什么是嵌合比對以及多重比對;還有片段(segment)和讀段(read)的區別呢

我們也知道SAM格式的第2列是FLAG,那我們了解每個FLAG的含義嗎,等等

以上我們一般只能說粗略了解,直到我看到一朋友分享的 https://github.com/samtools/hts-specs的SAM格式介紹,才發現自己以前所了解的實在太淺薄了

因此不打算自己來寫SAM格式的介紹,推薦大家看這個pdf

這PDF從比對的基礎術語到SAM格式的每個標識的含義都做了非常詳細的解釋,自認為如果我自己來寫的話,也一般只能說清楚其他一小部分的內容,最后還是半懂不懂。

比如這PDF先以一個小例子初步說明比對是怎么樣的

然后介紹了幾個關鍵的術語,有助于后面的理解

接著介紹頭部分的的幾個標簽的含義以及如何使用;比對部分的每列的含義,其中個人覺得比較需要理解的是FLAG列和CIGAR列;前者比較常見,用處也比較大;后者我也是看了才明白其含義,之前也是一知半解,其簡要的用字母和數字表達了比對的信息

接著推薦了SAM格式的操作

最后還介紹了下BAM格式

如果上述的pdf還無法讓人明白FLAG的話(比如我自己),推薦看http://www.samformat.info/sam-format-flag,你可以選擇輸入任何一個FLAG值來看其對應的含義,其右邊也對FLAG進行了分類,比如:

只有一端比對上的FLAG值有

73, 133, 89, 121, 165, 181, 101, 117, 153, 185, 69, 137

雙端都沒比對上的有FLAG值有

77, 141

雙端比對在正確的insert size以及正確的方向上的FLAG值有

99, 147, 83, 163

如果還是有些不明白的話,可以看http://seqanswers.com/forums/showthread.php?p=71753,作者在2012年就很好的將SAM格式的FLAG做了通俗的解釋及分類,比如:

其對paired reads分為了"All Good"和"All Bad";并對"All Good"再次細分為:

Some values mean "all good" i.e. that both reads in the pair have aligned

65 - 0001000001 - this is first read in pair and both reads aligned the forward strand.

129 - 0010000001 - This is second read of pair and both reads aligned the forward strand.

Sometimes both reads of a pair are flipped (reverse complemented) before mapping

113 - 0001110001 - "this is the first read of a pair, both reads in pair were flipped and both mapped".

177 - 0001110001 - "this is the second read of a pair, both reads in pair were flipped and both mapped".

Other times only one of the reads in a pair is flipped though both of them map

81 - 0001010001 - "this is the first read of pair, both reads mapped, we had to flip this read, but mate is in forward orientation".

161 - 0010100001 - "this is second read, this one is forward but we flipped its mate and both reads mapped".

97 - 0001100001 - "this is first read, its mate is flipped but this is forward. Both mapped".

145 - 0010010001 - "this is second read. it is flipped but its mate is not. Both mapped".

這些可以很好的對上面的理解進行了補充說明,非常不錯。

總體上,對于SAM格式的理解,在上述資料看完后絕對會有很好的提升

總結

以上是生活随笔為你收集整理的sam格式的结构和意义_SAM格式的学习的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。