Filter FASTA files
Use a regular expression for filtering sequences by id from a FASTA file, e.g. just certain chromosomes from a genome. There are other tools as part of bigger packages to install (and no regex support), mostly awk-based awkward (sorry for the pun) bash solutions, and scripts using packages that one needs to install and with still no support for regular expressions. This however is a simple, straightforward little python script for a simple task. It doesn’t do anything else and doesn’t need anything but a stock python installation. Based on the FASTA reader snippet.
Usage:
python FASTAfilter.py [-h] regex infile outfile
From a FASTA-file with multiple >entries, filter by sequence ids using a
regex.
positional arguments:
regex Regex to filter entry ids, e.g. ‘chr[1-4]’. Note that the id does not contain the initial > character.
infile A FASTA input file, usually with multiple entries.
outfile The new file with only the matching entries.
optional arguments:
-h, –help show this help message and exit
INSTALL:
cd /data/software
wget http://dm516.user.srcf.net/fastafilter/FASTAfilter.zip
unzip FASTAfilter.zip
easy_install argparse
USAGE:
python FASTAfilter.py [1-9,10,11,12,13,14,15,16,17,18,X] \
/dat2/INPUT.fa \
/dat2/OUTPUT.fa
Error:
Traceback (most recent call last):
File "FASTAfilter.py", line 3, in <module>
import argparse
ImportError: No module named argparse
Solution:
run "easy_install argparse" as root user.
http://dm516.user.srcf.net/?p=314
Filter FASTA files的更多相关文章
- Extract Fasta Sequences Sub Sets by position
cut -d " " -f 1 sequences.fa | tr -s "\n" "\t"| sed -s 's/>/\n/g' & ...
- elfinder中通过DirectoryStream.Filter实现筛选隐藏目录(二)
今天还是没事看了看elfinder源码,发现之前说的两个版本实现都是基于不同的jdkelfinder源码浏览-Volume文件系统操作类(1), 带前端页面的是基于1.6中File实现,另一个是基于1 ...
- OpenFileDialog.Filter 属性
如果 Filter 属性为 Empty,将显示所有文件. 始终显示文件夹. Filter 由以下部分组成:筛选器说明,后跟竖线 (|) 和筛选模式. 筛选器可以指定一个或多个文件类型. 说明描述了对话 ...
- python 高阶函数之filter
前文说到python高阶函数之map,相信大家对python中的高阶函数有所了解,此次继续分享python中的另一个高阶函数filter. 先看一下filter() 函数签名 >>> ...
- Falcon Genome Assembly Tool Kit Manual
Falcon Falcon: a set of tools for fast aligning long reads for consensus and assembly The Falcon too ...
- Linux command line exercises for NGS data processing
by Umer Zeeshan Ijaz The purpose of this tutorial is to introduce students to the frequently used to ...
- 构建NCBI本地BLAST数据库 (NR NT等) | blastx/diamond使用方法 | blast构建索引 | makeblastdb
参考链接: FTP README 如何下载 NCBI NR NT数据库? 下载blast:ftp://ftp.ncbi.nlm.nih.gov/blast/executables/blast+ 先了解 ...
- STAR manual
来源:STARmanual.pdf 来源:Calling variants in RNAseq PART0 准备工作 #STAR 安装前的依赖的工具 #Red Hat, CentOS, Fedora. ...
- <二代測序> 下载 NCBI sra 文件
本文近期更新地址: http://blog.csdn.net/tanzuozhev/article/details/51077222 随着測序技术的不断提高.二代測序数据成指数增长. NCBI提供了S ...
随机推荐
- zoj3659(经典并查集)
这种思想很经典. 从最小的边选择,那么可以知道的是,在除去这条边的另外两个联通块,选其中一块中的点做为源点到另一块所得到的费用和. 如果你已经知道了这两个联通块内部选一个点时的最大费用和.那么这题就可 ...
- linux 项目自动部署脚本
1.使用maven获取源码部署,并可替换配置文件(金融数据分析平台) #!/bin/bash#设置变量cd /home#停止tomcatecho "开始停止tomcat..." p ...
- HDU 3695 / POJ 3987 Computer Virus on Planet Pandora
Computer Virus on Planet Pandora Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 1353 ...
- Oracle的聚合函数group by结合CUBE和ROLLUP的使用
转自:https://docs.oracle.com/cd/E11882_01/server.112/e25554/aggreg.htm#DWHSG8618 CUBE Syntax CUBE appe ...
- eslint Rules
Rules 为了让你对规则有个更好的理解,ESLint 对其进行了分门别类. 所有的规则默认都是禁用的.在配置文件中,使用 "extends": "eslint:reco ...
- ZooKeeper 基本介绍
Zookeeper 作为一个分布式的服务框架,主要用来解决分布式集群中应用系统的一致性问题,它能提供基于类似于文件系统的目录节点树方式的数据存储, Zookeeper 作用主要是用来维护和监控存储的数 ...
- 获取文档版本版本值 滚动标识符 游标 控制查询如何执行 控制查询在哪些分片执行 boost加权
映射mapping.json{ "book": { "_index": { "enabled": true }, "_id&quo ...
- 我有一台 PC,上面有摄像头,怎么进行一场直播?
如何推流与播放_Web端直播实践_最佳实践_视频直播-阿里云 https://help.aliyun.com/document_detail/57251.html?spm=a2c4g.11186623 ...
- 微信公众号开发 但是服务端仅仅接收到了 p1 p2 没有接收到p3
w 栗子 js window.location = www.xx.com?p1=123&p2=456&p3=789 但是服务端仅仅接收到了 p1 p2 没有接收到p3 原因有哪些呢? ...
- VC++SDK编程——鼠标的应用示例
#include <Windows.h> #include <tchar.h> BOOLEAN InitWindowClass(HINSTANCE hInstance, int ...