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]]; |
16 |
function explainFlags() { |
17 |
var flagValue = parseInt(document.getElementById('tb').value); //returns 0 or NaN if can't parse |
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; |
25 |
checkbox.checked = false; |
29 |
document.getElementById('summary').innerHTML = summary; |
32 |
function checkboxClicked() { |
33 |
//compute the new flag value |
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]; |
41 |
var textbox = document .getElementById('tb'); |
42 |
textbox.value = newFlagValue ; |
47 |
< noscript >This page requires JavaScript. Please enable it in your browser settings.</ noscript > |
51 |
This utility explains SAM flags in plain English. < br > |
54 |
< form onsubmit = "explainFlags(); return false;" > |
56 |
< input id = "tb" type = "text" size = "10" > |
57 |
< input type = "submit" value = "Explain" >< 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 >"); |
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 > |
68 |
</ div ></ form ></ body ></ html > |
参考:https://www.plob.org/article/1697.html
- 推荐一个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等软件序列比对结果都会输出这 ...
- 推荐一个可以直接在Visual Studio中看到complexity的插件CodeMaid
博客搬到了fresky.github.io - Dawei XU,请各位看官挪步.最新的一篇是:推荐一个可以直接在Visual Studio中看到complexity的插件CodeMaid.
- 推荐一个免费的生成词云(word cloud)的在线工具
"词云"这个概念由美国西北大学新闻学副教授.新媒体专业主任里奇·戈登(Rich Gordon)提出. "词云"就是对网络文本中出现频率较高的"关键词& ...
- bat脚本中%~dp0含义解释
在Windows脚本中,%i类似于shell脚本中的$i,%0表示脚本本身,%1表示脚本的第一个参数,以此类推到%9,在%和i之间可以有"修饰符"(完整列表可通过"for ...
- SAMTOOLS使用 SAM BAM文件处理
[怪毛匠子 整理] samtools学习及使用范例,以及官方文档详解 #第一步:把sam文件转换成bam文件,我们得到map.bam文件 system"samtools view -bS m ...
- bam文件测序深度统计-bamdst
最近接触的数据都是靶向测序,或者全外测序的数据.对数据的覆盖深度及靶向捕获效率的评估成为了数据质量监控中必不可少的一环. 以前都是用samtools depth 算出单碱基的深度后,用perl来进行深 ...
- SAM/BAM文件处理
当测序得到的fastq文件map到基因组之后,我们通常会得到一个sam或者bam为扩展名的文件.SAM的全称是sequence alignment/map format.而BAM就是SAM的二进制文件 ...
- 文件格式——Sam&bam文件
Sam&bam文件 SAM是一种序列比对格式标准, 由sanger制定,是以TAB为分割符的文本格式.主要应用于测序序列mapping到基因组上的结果表示,当然也可以表示任意的多重比对结果.当 ...
随机推荐
- ES6语法 Promise Iterator
类和对象 基本定义: class Parent{ constructor(name='lmx'){ //name= 默认值 this.name=name } } let v_parent = new ...
- Json对象扩展
1.JSON.stringify(obj/arr) js对象(数组)转换为json对象(数组) 2.JSON.parse(json) json对象(数组)转换为js对象(数组)
- C#博客目录
基础加强 1.索引器 2.密闭类.静态类及扩展方法 3.值.引用类型及结构体 4.秒懂IL.CTS.CLS和CLR 5.装箱与拆箱 6.引用相等与运算符重载 7.ref与out 8.委托和事件 9.对 ...
- 部署的docker image总是太大,怎么办?
sudo docker images REPOSITORY TAG IMAGE ID CREATED ...
- 3#Java案例
以下内容引用Github地址https://github.com/DuGuQiuBai/Java/blob/master/day01/code/02_%E5%B8%A6%E6%B3%A8%E9%87% ...
- 在CentOS上安装Python3的三种方法
Centos7默认自带了Python2.7版本,但是因为项目需要使用Python3.x你可以按照此文的三个方法进行安装. 注:本文示例安装版本为Python3.5, 一.Python源代码编译安装 安 ...
- java操作git简单实现
记录瞬间 import org.eclipse.jgit.api.Git; import org.eclipse.jgit.api.ListBranchCommand; import org.ecli ...
- puppeteer(六)启动参数——浏览器扩展应用的添加及应用
前言 最近再做浏览器的自动化,首页是定制化的,是通过extension(扩展)实现的,由于通过puppeteer默认是以无参(即首次以干净的环境)运行的,导致登录页无法正常显示,首先想当然是直接找扩展 ...
- rpgmakermv \c 常用颜色一览
1 2 3 4 5 6 7 14 18
- Windows7 IIS 出现错误,并非所有的功能被成功更改
(1)进入UAC,将其调至最低. 具体操作方法:点击[开始],在程序搜索中输入UAC,回车后则进入UAC控制界面. UAC,用户帐户控制设置如下,这个设置主要是避免Windows7种由于用户帐户权限控 ...