htseq-count 的使用
Given a file with aligned sequencing reads and a list of genomic features, a common task is to count how many reads map to each feature.
加入某个样有以下bam文件:
RCS48-1_CTTGTA_L003.sorted.rmp.bam
RCS48-2_CCGTCC_L005.sorted.rmp.bam
RCS48-2_CCGTCC_L007.sorted.rmp.bam
RCS48-3_GTCCGC_L006.sorted.rmp.bam
RCS48-3_GTCCGC_L007.sorted.rmp.bam
先将属于这个样的bam文件merge:
命令:
samtools merge RCS48.merged.bam RCS48-1_CTTGTA_L003.sorted.rmp.bam RCS48-2_CCGTCC_L005.sorted.rmp.bam RCS48-2_CCGTCC_L007.sorted.rmp.bam RCS48-3_GTCCGC_L006.sorted.rmp.bam RCS48-3_GTCCGC_L007.sorted.rmp.bam
merge后得到RCS48.merged.bam文件,
对合并好的bam文件重新进行sort, 按照read name 而不是coordinate,
命令:
samtools sort -n RCS48.merged.bam RCS48.merged.namesorted
sort之后得到RCS48.merged.namesorted.bam
如果你是老版本的htseq-count, 要将上面的bam文件转化为sam文件:
命令:
samtools view -h RCS48.merged.namesorted.bam > RCS48.merged.namesorted.sam
最后执行htseq-count
命令:
htseq-count -s no RCS48.merged.namesorted.sam ../../refseq/Osativa_204.gtf > RCS48_count
由于我的bam经过了remove duplicate步骤,所以会出现以下warning:
Warning: Read HWI-D00258:40:C2D73ACXX:2:2316:20611:80446 claims to have an aligned mate which could not be found. (Is the SAM file properly sorted?)
33638504 sam line pairs processed.
更详细阅读:
http://www-huber.embl.de/users/anders/HTSeq/doc/count.html
by freemao
FAFU.
htseq-count 的使用的更多相关文章
- nodejs api 中文文档
文档首页 英文版文档 本作品采用知识共享署名-非商业性使用 3.0 未本地化版本许可协议进行许可. Node.js v0.10.18 手册 & 文档 索引 | 在单一页面中浏览 | JSON格 ...
- C#中Length和Count的区别(个人观点)
这篇文章将会很短...短到比你的JJ还短,当然开玩笑了.网上有说过Length和count的区别,都是很含糊的,我没有发现有 文章说得比较透彻的,所以,虽然这篇文章很短,我还是希望能留在首页,听听大家 ...
- [PHP源码阅读]count函数
在PHP编程中,在遍历数组的时候经常需要先计算数组的长度作为循环结束的判断条件,而在PHP里面对数组的操作是很频繁的,因此count也算是一个常用函数,下面研究一下count函数的具体实现. 我在gi ...
- EntityFramework.Extended 实现 update count+=1
在使用 EF 的时候,EntityFramework.Extended 的作用:使IQueryable<T>转换为update table set ...,这样使我们在修改实体对象的时候, ...
- 学习笔记 MYSQL报错注入(count()、rand()、group by)
首先看下常见的攻击载荷,如下: select count(*),(floor(rand(0)*2))x from table group by x; 然后对于攻击载荷进行解释, floor(rand( ...
- count(*) 与count (字段名)的区别
count(*) 查出来的是:结果集的总条数 count(字段名) 查出来的是: 结果集中'字段名'不为空的记录的总条数
- BZOJ 2588: Spoj 10628. Count on a tree [树上主席树]
2588: Spoj 10628. Count on a tree Time Limit: 12 Sec Memory Limit: 128 MBSubmit: 5217 Solved: 1233 ...
- [LeetCode] Count Numbers with Unique Digits 计算各位不相同的数字个数
Given a non-negative integer n, count all numbers with unique digits, x, where 0 ≤ x < 10n. Examp ...
- [LeetCode] Count of Range Sum 区间和计数
Given an integer array nums, return the number of range sums that lie in [lower, upper] inclusive.Ra ...
- [LeetCode] Count of Smaller Numbers After Self 计算后面较小数字的个数
You are given an integer array nums and you have to return a new counts array. The counts array has ...
随机推荐
- changepassword.c 0.9:一个通过WEB界面更改LINUX用户密码的程序
偶然看到一个用C语言写的CGI程序,可以以WEB界面(无需单独再写HTML)的方式修改用户自己的密码.该程序具有同时修改samba及squid密码的能力. 步骤: 1.下载并解压,并读一下README ...
- 判断子元素(or属性)是否存在
if(typeof($("#aid").attr("rel"))=="undefined") 即可
- [开发笔记]-Windows Service服务相关注意事项
注意一:报错:“本地计算机上的 *** 服务启动后停止.某些服务在未由其他服务或程序使用时将自动停止.” 该问题主要的原因是 Service服务程序中有错误. 遇到这个问题时,无论是重新安装服务,还是 ...
- SQL Server 索引介绍
数据库索引是对数据表中一个或多个列的值进行排序的结构,就像一本书的目录一样,索引提供了在行中快速查询特定行的能力 详细出处参考:http://www.jb51.net/article/30950.ht ...
- 腾讯微博数据抓取(java实现)
不多说,同样贴出相关代码 参数实体: package token.def; import java.io.Serializable; import java.util.Properties; publ ...
- subline快捷键
折叠所有代码: 按ctrl+k,再按ctrl+1 展开所有代码: 按ctrl+k,再按ctrl+j 折叠此处代码: ctrl+shift+[ 展开此处代码: ctrl+shift+]
- 银行支票和汇票中使用的专用字体MICR E13B条形码控件字体
MICR E13B条形码控件字体是一种在美国.加拿大.波多黎各.巴拿马.英国和其它少数国家的银行支票和汇票中使用的专用字体,主要用来打印适用于磁性和光学字符识别系统的MICR字符.MICR E13B条 ...
- dialog参数、方法以及事件
参数(options) DOM方式初始化dialog的,推荐使用集合属性data-options定义参数,如果使用data属性定义参数,注意转换成对应的名称. 名称 类型 默认值 描述 id stri ...
- 一张图告诉你为什么 Gmail 是最好的邮箱,以及大量私货
今天早上,我的同事详细介绍了 Gmail 相比其他邮箱的优势,比如强大的垃圾邮件过滤.简单的使用界面.强大的功能设置等等.但是对我来说,这些并不是我使用 Gmail 的最重要原因. 我第一个正式的邮箱 ...
- MySQL语句45道练习题及答案
一. 设有一数据库,包括四个表:学生表(Student).课程表(Course).成绩表(Score)以及教师信息表(Teacher).四个表的结构分别如表1-1的表(一)~表( ...