推荐一个SAM文件中flag含义解释工具--转载
SAM是Sequence Alignment/Map 的缩写。像bwa等软件序列比对结果都会输出这样的文件。samtools网站上有专门的文档介绍SAM文件。具体地址:http://samtools.sourceforge.net/SAM1.pdf
很多人困惑SAM文件中的第二列FLAG值是什么意思。根据文档介绍我们可以计算,但是为了方便大家,下面给大家提供一个脚本工具,大家直接输入flag值就可以知道它代表的含义了。
该脚本的使用方法如下截图所示:
脚本工具的使用方法:
将下面的代码保存在记事本里面,另存为一个html文件,如文件名:FlagExplain.html(拓展名一定要为.html)。双击既可以在浏览器里面打开了。
01
|
< html >< head >< meta http-equiv = "Content-Type" content = "text/html; charset=GBK" >
|
02
|
< title >Explain SAM Flags</ title >
|
03
|
< script type = "text/javascript" >
|
04
|
lstFlags = [["read paired", 0x1],
|
05
|
["read mapped in proper pair", 0x2],
|
06
|
["read unmapped", 0x4],
|
07
|
["mate unmapped", 0x8],
|
08
|
["read reverse strand", 0x10],
|
09
|
["mate reverse strand", 0x20],
|
10
|
["first in pair", 0x40],
|
11
|
["second in pair", 0x80],
|
12
|
["not primary alignment", 0x100],
|
13
|
["read fails platform/vendor quality checks", 0x200],
|
14
|
["read is PCR or optical duplicate", 0x400]];
|
15
|
16
|
function explainFlags() {
|
17
|
var flagValue = parseInt(document.getElementById('tb').value); //returns 0 or NaN if can't parse
|
18
|
var summary = "";
|
19
|
for(var i = 0; i < lstFlags.length ; i++) {
|
20
|
var checkbox = document .getElementById('cb' + i)
|
21
|
if(lstFlags[i][1] & flagValue) {
|
22
|
summary += " " + lstFlags[i][0] + "<br>";
|
23
|
checkbox.checked = true;
|
24
|
} else {
|
25
|
checkbox.checked = false;
|
26
|
}
|
27
|
}
|
28
|
29
|
document.getElementById('summary').innerHTML = summary;
|
30
|
}
|
31
|
32
|
function checkboxClicked() {
|
33
|
//compute the new flag value
|
34
|
var newFlagValue = 0;
|
35
|
for(var i = 0; i < lstFlags.length ; i++) {
|
36
|
var checkBox = document .getElementById('cb' + i);
|
37
|
if(checkBox.checked) {
|
38
|
newFlagValue |= lstFlags[i][1];
|
39
|
}
|
40
|
}
|
41
|
var textbox = document .getElementById('tb');
|
42
|
textbox.value = newFlagValue ;
|
43
|
explainFlags();
|
44
|
}
|
45
|
</script>
|
46
|
47
|
< noscript >This page requires JavaScript. Please enable it in your browser settings.</ noscript >
|
48
|
</ head >
|
49
|
< body >
|
50
|
51
|
This utility explains SAM flags in plain English. < br >
|
52
|
< br >
|
53
|
54
|
< form onsubmit = "explainFlags(); return false;" >
|
55
|
Flag:
|
56
|
< input id = "tb" type = "text" size = "10" >
|
57
|
< input type = "submit" value = "Explain" >< br >
|
58
|
< br >
|
59
|
Explanation:< br >
|
60
|
< script type = "text/javascript" >
|
61
|
for(var i = 0; i < lstFlags.length ; i++) {
|
62
|
document.write("<input type = checkbox name = cb " + i + " id = 'cb" + i + "' onclick = 'checkboxClicked();' > " +lstFlags[i][0] + "</ input >< br >");
|
63
|
}
|
64
|
</ script >< input type = "checkbox" name = "cb0" id = "cb0" onclick = "checkboxClicked();" > read paired< br >< input type = "checkbox" name = "cb1" id = "cb1" onclick = "checkboxClicked();" > read mapped in proper pair< br >< input type = "checkbox" name = "cb2" id = "cb2" onclick = "checkboxClicked();" > read unmapped< br >< input type = "checkbox" name = "cb3" id = "cb3" onclick = "checkboxClicked();" > mate unmapped< br >< input type = "checkbox" name = "cb4" id = "cb4" onclick = "checkboxClicked();" > read reverse strand< br >< input type = "checkbox" name = "cb5" id = "cb5" onclick = "checkboxClicked();" > mate reverse strand< br >< input type = "checkbox" name = "cb6" id = "cb6" onclick = "checkboxClicked();" > first in pair< br >< input type = "checkbox" name = "cb7" id = "cb7" onclick = "checkboxClicked();" > second in pair< br >< input type = "checkbox" name = "cb8" id = "cb8" onclick = "checkboxClicked();" > not primary alignment< br >< input type = "checkbox" name = "cb9" id = "cb9" onclick = "checkboxClicked();" > read fails platform/vendor quality checks< br >< input type = "checkbox" name = "cb10" id = "cb10" onclick = "checkboxClicked();" > read is PCR or optical duplicate< br >
|
65
|
< br >
|
66
|
Summary:< br >
|
67
|
< div id = "summary" >
|
68
|
</ div ></ form ></ body ></ html >
|
推荐一个SAM文件中flag含义解释工具--转载相关推荐
- html文件下的flag,推荐一个SAM文件中flag含义解释工具
SAM是Sequence Alignment/Map 的缩写.像bwa等软件序列比对结果都会输出这样的文件.samtools网站上有专门的文档介绍SAM文件.具体地址:http://samtools. ...
- 31、SAM文件中flag含义解释工具--转载
转载:http://www.cnblogs.com/nkwy2012/p/6362996.html SAM是Sequence Alignment/Map 的缩写.像bwa等软件序列比对结果都会输出这样 ...
- Java main方法_解释Java中的main方法,及其作用_一个java文件中可包含多个main方法
public static void main(String[] args) {} 或者 public static void main(String args[]) {} main方法是我们学习Ja ...
- 如何在另一个JavaScript文件中包含一个JavaScript文件?
JavaScript中是否有类似于CSS中@import的内容,可让您在另一个JavaScript文件中包含一个JavaScript文件? #1楼 而不是在运行时添加,而是使用脚本在上传之前进行串联. ...
- 是否可以在另一个CSS文件中包含一个?
是否可以在另一个CSS文件中包含一个? #1楼 是的,可以使用@import并提供css文件的路径,例如 @import url("mycssfile.css"); 要么 @imp ...
- 调用另一个python文件中的代码
python3.*版本下好像不一样,正确引用方法: utils是同级目录,options是文件,后面是函数 from .utils.options import parseOptions from . ...
- 转:如何调用另一个python文件中的代码
原文地址:https://www.cnblogs.com/jiuyigirl/p/7146223.html 如何调用另一个python文件中的代码 无论我们选择用何种语言进行程序设计时,都不可能只有一 ...
- 一个java文件中多个类
一个.java文件中可以有很多类.不过注意以下几点: 1.public 权限的类只能有一个(也可以一个都没有,但最多只有1个) 2.这个.java文件的文件名必须是public类的类名(一般的情况下, ...
- 将类的定义放在头文件中,把成员函数的实现代码放在一个cpp文件中
将类的定义放在头文件中,把成员函数的实现代码放在一个cpp文件中 写这种.h和.cpp文件分开的大程序,虽然对很多人来说很简单,对自己来说算是第一次吧,好好学C++,加油~ 题目:定义Point类,由 ...
最新文章
- lol简介/html
- JMeter 将上一个请求的结果作为下一个请求的参数——使用正则提取器(转载)...
- Ajax监测开始执行及结束执行
- java中的builder模式
- java中的年轻态,14、Java垃圾回收机制(示例代码)
- python集合数据结构_Python数据结构-集合
- 实现iframe_面试官:来说说单点登录的三种实现方式
- JVM优化系列-常用GC参数总结
- STM32工作笔记0066---待机唤醒实验-设备低功耗-M3H
- android自定义view设置高度,自定义View的宽高设定
- 银行账户系统需求分析实例
- html5跳转页面接收参数,HTML页面跳转及参数传递问题
- qq红包领取支付宝红包功能,qqxml跳转技术
- 有关微信小程序接入腾讯云IM即时通讯内容
- 写论文同义替换的软件.v.1.2.3
- 1236mysql_mysql报1236错误解决方法
- input的button类型,点击页面跳转
- 大数据培训班,一般需要支付多少学费?
- 在职研究生读计算机专业,读计算机专业在职研究生让我择业自如高升有望
- 学术不端网查重靠谱吗_学术不端网知网查重万方哪一个权威
热门文章
- python中进制chr_python中的chr() 如何返回字符?
- js打印到控制台_8个问题看你是否真的懂 JS
- 机器人学习--扩展卡尔曼滤波算法用于机器人定位
- 北斗导航 | 复杂环境下卫星导航算法(理论)
- oracle 10g进入ascmd,oracle 10g 默许用户名密码及解锁
- SVN服务器搭建和使用(二)
- MFC 常用系统函数
- Windows下C/C++获取当前系统时间
- 视频图像处理平台对比_情绪管理考勤机人脸识别原理与指纹识别性能对比-微幼科技...
- html5 文字转换烟花,HTML5交互式烟花(点击并保持)