mismatch位置(MD tag)- sam/bam格式解读进阶
格式 进阶 解读 位置 md TAG MISMATCH SAM
2023-09-27 14:27:39 时间
这算是第二讲了,前面一讲是:Edit Distance编辑距离(NM tag)- sam/bam格式解读进阶
MD是mismatch位置的字符串的表示形式,貌似在call SNP和indel的时候会用到。
当然我这里要说的只是利用它来计算mismatch的个数
MD = line.get_tag('MD') pat = "[0-9]+[ATGC]+" MD_list = re.findall(pat,MD) for i in MD_list: for j in i: if j == 'A' or j == 'T' or j == 'G' or j == 'C': total_mismatch_MD += 1
几行代码简单搞定~~~
额,那这篇文章是不是太水了
好吧,那就再深入一点
先看一篇文章:SAM/BAM MD tag
The MD field aims to achieve SNP/indel calling without looking at the reference. For example, a string "10A5^AC6" means from the leftmost reference base in the alignment, there are 10 matches followed by an A on the reference which is different from the aligned read base; the next 5 reference bases are matches followed by a 2bp deletion from the reference; the deleted sequence is AC; the last 6 bases are matches. The MD field ought to match the CIGAR string.
相关文章
- Qt5开发从入门到精通——第六篇四节( 图像与图片——显示SVG格式图片 )
- Druid 从控制台(Druid console)从 SQL 脚本转换为 JSON 格式的方法
- 图数据库-Neo4j(五):利用Apoc进行数据的导入、导出【Neo4j插件】【csv格式、json格式、Cypher脚本】
- [na]二层+tcp/udp数据包格式
- 转: utf16编码格式(unicode与utf16联系)
- 转换vmware的vmdk格式到qcow2或者raw格式
- M3U8格式讲解及实际应用分析
- list、map、对象对应json的格式
- linux下hexdump和od命令:显示文件十六进制格式
- (scala书籍编写)word 2007 目录格式乱的解决办法:编辑word 宏
- ASTC纹理压缩格式详解
- Matplotlib从入门到精通03-布局格式定方圆
- IM通信协议逆向分析、Wireshark自定义数据包格式解析插件编程学习
- 前向纠错码(FEC)的RTP荷载格式
- linux的几个内核镜像格式Image 和 u-boot启动内核和文件系统时的一些环境变量的设置