mismatch位置(MD tag)- sam/bam格式解读进阶
这算是第二讲了,前面一讲是: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.
mismatch位置(MD tag)- sam/bam格式解读进阶的更多相关文章
- Edit Distance编辑距离(NM tag)- sam/bam格式解读进阶
		
sam格式很精炼,几乎包含了比对的所有信息,我们平常用到的信息很少,但特殊情况下,我们会用到一些较为生僻的信息,关于这些信息sam官方文档的介绍比较精简,直接看估计很难看懂. 今天要介绍的是如何通过b ...
 - sam/bam格式
		
1)Sam (Sequence Alignment/Map) ------------------------------------------------- 1) SAM 文件产生背景 随着Ill ...
 - pysam - 多种格式基因组数据(sam/bam/vcf/bcf/cram/…)读写与处理模块(python)--转载
		
pysam 模块介绍!!!! http://pysam.readthedocs.io/en/latest/index.html 在开发基因组相关流程或工具时,经常需要读取.处理和创建bam.vcf.b ...
 - SAMTOOLS使用 SAM BAM文件处理
		
[怪毛匠子 整理] samtools学习及使用范例,以及官方文档详解 #第一步:把sam文件转换成bam文件,我们得到map.bam文件 system"samtools view -bS m ...
 - 文件格式——Sam&bam文件
		
Sam&bam文件 SAM是一种序列比对格式标准, 由sanger制定,是以TAB为分割符的文本格式.主要应用于测序序列mapping到基因组上的结果表示,当然也可以表示任意的多重比对结果.当 ...
 - SAM/BAM文件处理
		
当测序得到的fastq文件map到基因组之后,我们通常会得到一个sam或者bam为扩展名的文件.SAM的全称是sequence alignment/map format.而BAM就是SAM的二进制文件 ...
 - bwa比对软件的使用以及其结果文件(sam)格式说明
		
一.bwa比对软件的使用 1.对参考基因组构建索引 bwa index -a bwtsw hg19.fa # -a 参数:is[默认] or bwtsw,即bwa构建索引的两种算法,两种算法都是 ...
 - 非IMU模式下DML语句产生的REDO日志内容格式解读
		
实验内容:非IMU模式下DML语句产生的REDO日志内容格式解读 最详细的解读是UPDATE的. 实验环境准备 11G中默认是开启IMU特性的,做此实验需要关闭此特性. alter system se ...
 - 创世区块配置文件genesis.json的格式解读
		
创世区块配置文件genesis.json的格式解读 中文网站上关于genesis 的解析大多数都来自于这个Gist:Ethereum private network configuration gui ...
 
随机推荐
- SharePoint自动化系列——创建MMS terms
			
转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ PowerShell脚本实现MMS group.termSet.terms的自动化创建: Add- ...
 - Testing Round #12 A
			
A. Divisibility time limit per test 1 second memory limit per test 256 megabytes input standard inpu ...
 - 2016年6月26日 星期日 --出埃及记 Exodus 14:23
			
2016年6月26日 星期日 --出埃及记 Exodus 14:23 The Egyptians pursued them, and all Pharaoh's horses and chariots ...
 - 在centos6.3用yum安装redis
			
一.centos默认的安装源在官方centos.org上,而redis在第三方的yum源里,所以无法安装,非官方的yum推荐用fedora的epel仓库.当然也可通过配置 /etc/yum.repos ...
 - activiti学习总结
			
Activiti界面元素的使用总结 一.图形设计中元素的使用 1.SequenceFlow:连接线,可以连接两个任务,来管理流程实例的流向 -----General -----id:流程的id,用与程 ...
 - 我的android学习经历14
			
LinearLayout线性布局中gravity和Layout_gravity的解释 这两个都是说明对齐方式的.‘ gravity说明的是子控件的对齐方式,比如把gravity写在LinearLayo ...
 - Android-表格布局 计算器 修改版
			
<?xml version="1.0" encoding="utf-8"?> <TableLayout xmlns:android=" ...
 - The Pilots Brothers' refrigerator
			
2965 he Pilots Brothers' refrigerator Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 1 ...
 - JS中 window.location 与window.location.href的区别
			
疑惑:window.location='url' 与window.lcoation.href='url'效果一样,都会跳转到新页面,区别在哪?查得的资料如下: 1:window.location是页 ...
 - nancy的诊断2
			
接上文. 一 再看看第二个面板内容 点击带文号 的 Interactive Diagnostics 这个面板 如下 上面的是诊断程序,默认是系统提供的测试用的诊断程序. 你可以 通过实现IDiag ...