怎么从bam文件中提取出比对OR没比对上的paired reads | bamToFastq | STAR
折腾这么多都是白瞎,STAR就有输出没有别对上的pair-end reads的功能
参见:How To Filter Mapped Reads With Samtools
I had the same issue but with Paired End Reads, and I solved using samtools and bamToFastq. You can find bamToFastq here: https://code.google.com/p/hydra-sv/
- If you need unmappedR1.fastq (containing both paired and unpaired R1 unmapped reads) and unmappedR2.fastq ( containing both paired and unpaired R2 unmapped reads).
Use samtools -f 4 to extract all unmapped reads :
samtools view -b -f 4 file.bam > file_unmapped.bam
bamToFastq -bam file_unmapped.bam -fq1 unmappedR1.fastq -fq2 unmappedR2.fastq
- If you need unmappedpairedR1.fastq (containing only paired R1 unmapped reads) and unmappedpairedR2.fastq ( containing only paired R2 unmapped reads). Meaning you need all paired reads where at least one of them is unmapped.
Use samtools -F 2 to discard only reads mapped in proper pair:
samtools view -b -F 2 file.bam > file_unmapped.bam
bamToFastq -bam file_unmapped.bam -fq1 unmappedpairedR1.fastq -fq2 unmappedpairedR2.fastq
怎么从bam文件中提取出比对OR没比对上的paired reads | bamToFastq | STAR的更多相关文章
- [数据科学] 从csv, xls文件中提取数据
在python语言中,用丰富的函数库来从文件中提取数据,这篇博客讲解怎么从csv, xls文件中得到想要的数据. 点击下载数据文件http://seanlahman.com/files/databas ...
- 调用opencv相关函数,从视频流中提取出图片序列&&&&jpg图片序列,转化成avi格式视频
/************************ @HJ 2017/3/30 参考http://blog.sina.com.cn/s/blog_4b0020f301010qcz.html修改的代码 ...
- psfgettable - 从控制台字体中提取出嵌入的Unicode字符表
总览 psfgettable 字体文件 [输出文件] 描述 psfgettable 命令从一个 .psf 格式的控制台字体中提取出嵌入的 Unicode字符表, 以易读格式输入到一个ASCII文件, ...
- JSFinder:一个在js文件中提取URL和子域名的脚本
JSFinder介绍 JSFinder是一款用作快速在网站的js文件中提取URL,子域名的脚本工具. 支持用法 简单爬取 深度爬取 批量指定URL/指定JS 其他参数 以往我们子域名多数使用爆破或DN ...
- 使用Python从PDF文件中提取数据
前言 数据是数据科学中任何分析的关键,大多数分析中最常用的数据集类型是存储在逗号分隔值(csv)表中的干净数据.然而,由于可移植文档格式(pdf)文件是最常用的文件格式之一,因此每个数据科学家都应该了 ...
- [SimplePlayer] 4. 从视频文件中提取音频
提取音频,具体点来说就是提取音频帧.提取方法与从视频文件中提取图像的方法基本一样,这里仅列出其中的不同点: 1. 由于目的提取音频,因此在demux的时候需要指定的是提取audio stream Au ...
- 利用ROS工具从bag文件中提取图片
bag文件是ROS常用的数据存储格式,因此要从bag文件中提取数据就需要了解一点ROS的背景知识. 1. 什么是ROS及其优势 ROS全称Robot Operating System,是BSD-lic ...
- [转]【流媒體】H264—MP4格式及在MP4文件中提取H264的SPS、PPS及码流
[流媒體]H264—MP4格式及在MP4文件中提取H264的SPS.PPS及码流 SkySeraph Apr 1st 2012 Email:skyseraph00@163.com 一.MP4格式基本 ...
- 从ROS bag文件中提取图像
从ROS bag文件中提取图像 创建launch文件,如下: export.launch <launch> <node pkg="rosbag" type=&qu ...
随机推荐
- 网络 --- 3 socket模块 粘包
一 .socket 模块参数及方法 二.缓冲区 三.粘包 1.两种粘包现象 ①连续的小包可能会被优化算法给组合到一起进行发送 ②第一次如果发送的数据大小2000B接收端一次性接受大小为1024, 这就 ...
- Hacker
https://hackertarget.com/nikto-website-scanner/
- RedHat7安装Docker
RedHat 启动 docker报错: 错误:Error starting daemon: SELinux is not supported with the overlay2 graph drive ...
- linux内核中的IPIs是什么?
答: 处理器间中断(Interprocessor Interrupts)
- Visual Studio Code 的 launch.json 解析
{ "version": "0.2.0", "configurations": [ { "name": "(g ...
- CF113D 高斯消元、dp
题目链接 https://codeforces.com/contest/113/problem/D 思路 \(k[i]=\frac{1-p[i]}{ru[i]}\) f[i][j]表示经过i和j的次数 ...
- P3979 遥远的国度
P3979 遥远的国度 思路 一开始我用这个函数得到左端点 int get_l(int x,int y) { if(top[x]==top[y]) return son[x]; int last=to ...
- C++变量的默认初始化规则
定义没有初始化式的变量时,系统有时候会帮我们初始化变量.系统如何初始化取决于变量的类型以及变量定义的位置. 内置类型变量是否自动初始化取决于变量定义的位置.函数体外定义的变量初始成0:函数体内定义的变 ...
- 关不掉.vbs
创建: 1.在桌面新建一个 关不掉.txt 文本文档 2.打开输入一下内容 do msgbox"信不信你关不掉我" msgbox"哈哈,你相信了吧" msgbo ...
- NIO小纪
我们通常说的NIO大多数场景下都是基于I/O复用技术的NIO,比如jdk中的NIO,当然Tomcat8以后的NIO也是指的基于I/O复用的NIO.注意,使用NIO != 高性能,当连接数<100 ...