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 ...
随机推荐
- Ext grid checkbox 分页 翻页 勾选 问题
timeArray = new Array(); //临时数组变量 var timeStatusBar = new Ext.ux.StatusBar({ id: 'statusbar', defaul ...
- centos 运用ssh的rsa算法实现无密码登录
ssh 公钥和私钥原理 1.客户端机子生成私钥和公钥,将公钥放到服务器证书中,然后就可以实现免密码登录.(服务器认证文件要有该登录用户的读执行权限) 2.a登录b: a机子:test01账号(b也要建 ...
- 李明杰视频 SVN
李明杰视频 SVN 就10-12使用技术SVN 源代码会引发哪些问题? 无法后悔:做错一个操作 版本备份:费控件,费时间 版本混乱:因版本备份太多造成混乱 代码冲突:多人操作同一文件 强烈建议 使用源 ...
- HDU 2676 Network Wars 01分数规划,最小割 难度:4
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1676 对顶点i,j,起点s=1,终点t=n,可以认为题意要求一组01矩阵use ...
- 【STL】- vector的用法
初始化: 1. 默认构造: vector<int> vint; 2. 用包含10个元素的数组初始化: vector<int> vint(ia, ia+10); 算法: 1. v ...
- CSS 水平居中
一.水平居中:行内元素解决方案 居中元素:文字.链接以及其它行内元素(inline或inline-*类型的元素,如inline-block,inline-table,inline-flex)解决方案: ...
- linux命令每日一练习-ls
ls列出目录下所有文件 ls -l列出具体信息. drwxr-xr-x 9 root root 4096 2011-11-01 tomcat6.0.32 第一个d表示是目录,如果是-表示普 ...
- java基础之 异常
Throwable是所有Java程序中错误处理的父类,有两种资类:Error和Exception. Error:表示由JVM所侦测到的无法预期的错误,由于这是属于JVM层次的严重错误,导致JVM无法继 ...
- hashmap和hashtable,arraylist和vector的区别
hashmap线程不安全,hashtable线程安全 hashmap允许使用 null 值和 null 键.(除了非同步和允许使用 null 之外,HashMap 类与 Hashtable 大致相同. ...
- AlarmManager
转自:http://blog.csdn.net/wangxingwu_314/article/details/8060312 1.AlarmManager,顾名思义,就是“提醒”,是Android中常 ...