从细菌基因组中提取噬菌体变异序列工具PhaseFinder的介绍、安装和使用方法

PhaseFinder

## 概览,不翻译了,大家自己看吧
The PhaseFinder algorithm is designed to detect DNA inversion mediated phase variation in bacterial genomes using genomic or metagenomic sequencing data. It works by identifying regions flanked by inverted repeats, mimicking their inversion in silico, and identifying regions where sequencing reads support both orientations. Here, we define phase variation as "a process employed by bacteria to generate frequent and reversible changes within specific hypermutable loci, introducing phenotypic diversity into clonal populations”. Not every region detected by PhaseFinder will directly result in phase variation, but the results should be highly enriched for regions that do. 

github: https://github.com/XiaofangJ/PhaseFinder

## Prerequisites,安装依赖
+ [Biopython](https://biopython.org/)
+ [pandas](https://pandas.pydata.org)
+ [samtools](http://samtools.sourceforge.net/) (>=1.4)
+ [bowtie](https://github.com/BenLangmead/bowtie)(>=version 1.2.0)
+ [einverted](http://emboss.sourceforge.net/apps/release/6.6/emboss/apps/einverted.html)
+ [bedops](https://bedops.readthedocs.io/en/latest/)
+ [bedtools](https://bedtools.readthedocs.io/en/latest/)

To install PhaseFinder,安装

git clone git@github.com:nlm-irp-jianglab/PhaseFinder.git
cd PhaseFinder
conda env create --file environment.yml
conda activate PhaseFinder

快速开始
All you need to get started is a genome (in fasta format) you would like to search for invertible DNA regions and genomic sequencing data (preferrably Illumina in fastq format) from the same organism, or metagenomic sequencing data from a sample containing the organism (preferrably Illumina in fastq format). 

To test PhaseFinder, you can use the example files (genome: test.fa, genomic data: p1.fq, p2.fq) Example:

# Identify regions flanked by inverted repeats 
python PhaseFinder.py locate -f ./data/test.fa -t ./data/test.einverted.tab -g 15 85 -p # Mimic inversion
python PhaseFinder.py create -f ./data/test.fa -t ./data/test.einverted.tab -s 1000 -i ./data/test.ID.fasta# Identify regions where sequencing reads support both orientations 
python PhaseFinder.py ratio -i ./data/test.ID.fasta -1 ./data/p1.fq -2 ./data/p2.fq -p 16 -o ./data/out

If successful, the output will be in data/out.ratio.txt

In this example, there is one real example of an invertible DNA region "am_0171_0068_d5_0006:81079-81105-81368-81394" because only this region has reads supporting both the F and R orientation. 

---

教程Tutorial
1. Generate a position table of regions flanked by inverted repeats 
Users can identify inverted repeats using the "PhaseFinder.py locate" command, or generate their own table.

1.1. Generate the position table with the PhaseFinder script

Usage: PhaseFinder.py locate [OPTIONS]Locate putative inverted regionsOptions:-f, --fasta PATH        Input genome sequence file in fasta format[required]-t, --tab PATH          Output table with inverted repeats coordinates[required]-e, --einv TEXT         Einverted parameters, if unspecified run withPhaseFinder default pipeline-m, --mismatch INTEGER  Max number of mismatches allowed between IR pairs,used with -einv (default:3)-r, --IRsize INTEGER    Max size of the inverted repeats, used with -einv(default:50)-g, --gcRatio MIN MAX   The minimum and maximum value of GC ratio-p, --polymer           Remove homopolymer inverted repeats--help                  Show this message and exit.

Input: A fasta file containing the genome sequence
Output: A table file containing the postion information of invereted repeats in the genome

Examples:
* Run the default PhaseFinder locate parameters

python PhaseFinder.py locate -f ./data/test.fa -t ./data/test.einverted.tab 

Run the default PhaseFinder locate parameters and remove inverted repeats with GC content lower than 15% and higher than 85% or with homopolymers

python PhaseFinder.py locate -f ./data/test.fa -t ./data/test.einverted.tab -g 15 85 -p 

* Run with the specified einverted parameters "-maxrepeat 750 -gap 100 -threshold 51 -match 5 -mismatch -9" 

python PhaseFinder.py locate -f ./data/test.fa -t ./data/test.einverted.tab -e "-maxrepeat 750 -gap 100 -threshold 51 -match 5 -mismatch -9" 


1.2. Generate the position table with other tools
You can identify regions flanked by inverted repeats directly with tools such as [einverted](http://emboss.sourceforge.net/apps/release/6.6/emboss/apps/einverted.html) and [palindrome](http://emboss.sourceforge.net/apps/cvs/emboss/apps/palindrome.html). 

Prepare the output into the following format:

A table file with five columns (tab delimited):

 Column name | Explanation                                                   |
-------------|---------------------------------------------------------------|Scaffold    | The scaffold or contig name where the inverted repeat is detectedpos A       | The start coordinate of the first inverted repeat (0-based)pos B       | The end coordinate of the first inverted repeat (1-based)pos C       | The start coordinate of the second inverted repeat (0-based)pos D       | The end coordinate of the second inverted repeat (1-based)---

2. Mimic inversion in silico to create a database of inverted sequences

Usage: PhaseFinder.py create [OPTIONS]Create inverted fasta fileOptions:-f, --fasta PATH         Input genome sequence file in fasta format[required]-t, --tab PATH           Table with inverted repeat coordinates  [required]-s, --flanksize INTEGER  Base pairs of flanking DNA on both sides of theidentified inverted repeats  [required]-i, --inv PATH           Output path of the inverted fasta file  [required]--help                   Show this message and exit.

Input
* The position table from step 1

 Output
* A fasta file containing inverted (R) and non-inverted (F) putative invertible DNA regions flanked by sequences of specified length (bowtie indexed)
* A table file (with suffix ".info.tab") describing the location of inverted repeats in the above fasta file---
3. Align sequence reads to inverted sequence database and calculate the ratio of reads aligning to the F or R orienation. 

Usage: PhaseFinder.py ratio [OPTIONS]Align reads to inverted fasta fileOptions:-i, --inv PATH         Input path of the inverted fasta file  [required]-1, --fastq1 PATH      First pair in fastq  [required]-2, --fastq2 PATH      Second pair in fastq  [required]-p, --threads INTEGER  Number of threads-o, --output TEXT      Output prefix  [required]--help                 Show this message and exit.

输入 Input
* Output from step 2
* fastq file of genomic or metagenomic sequence used to verify DNA inversion
* Number of threads used for bowtie alignment and samtools process
输出Output
* A table file (with suffix ".ratio.txt") containing the reads that supporting either R or F orientation of invertible DNA

 Column name | Explanation                                                                 |
-------------|-----------------------------------------------------------------------------|
Sequence     | Putative invertible regions(Format:Scaffold:posA-posB-posC-posD)
Pe_F         | The number of reads supprting the F orientation with paired-end information
Pe_R         | The number of reads supprting the R orientation with paired-end information
Pe_ratio     | Pe_R/(Pe_F + Pe_R). The percent of reads supporting the R orientation with the paired-end method
Span_F       | The number of reads supporting the F orientation spanning the inverted repeat by at least 10 bp on either side
Span_R       | The number of reads supporting the R orientation spanning the inverted repeat by at least 10 bp on either side
Span_ratio   | Span_R/(Span_F + Span_R). The percent of reads supporting the R orientation with the spanning method. 

True invertible regions have reads supporting both the F and R orientation. We recommend combining the information from both the paired-end (Pe) and spanning (Span) methods to find valid invertible DNA regions. Our default is to classify a region as invertible if at least 1% of reads support the R orientation with a minimum Pe_R > 5 and Span_R > 3. 

4. (Optional) Subset for intergenic invertible DNA regions 

If you are especially interested in intergenic regulatory regions, such as promoters, you can remove predicted invertible regions overlapping with coding sequences (CDS). First, obtain an annotation for the genome of interest from the NCBI or that you genereate yourself in GFF3 format. Second, subsubset the annotation for CDS regions only. Third, use the following command to process the output of PhaseFinder step 3 to obtain a list of intergenic putative invertible DNA regions.

sed '1d' output_from_phasefinder.ratio.txt| awk '{print $1"\t"$0}'|sed 's/:/\t/;s/-[^\t]*-/\t/'|sortBed |closestBed  -a - -b annotation.gff  -d |awk '$20!=0{print $3}' > intergenic_IDR.txt

Citation
Jiang X, Hall AB, et al. Invertible promoters mediate bacterial phase variation, antibiotic resistance, and host adaptation in the gut, *Science* (2019) [DOI: 10.1126/science.aau5238](http://science.sciencemag.org/content/363/6423/181)http://science.sciencemag.org/content/363/6423/181

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/325153.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

windows通过ssh连接Liunx服务器并实现上传下载文件

连接ssh 输入:ssh空格用户名ip地址,然后按Enter 有可能出现下图提示,输入yes 回车即可 输入 password ,注意密码是不显示的,输入完,再按回车就行了 以上是端口默认22情况下ssh连接,有些公司它…

Docker一键极速安装Nacos,并配置数据库!

1 部署方式 1.1 DockerHub javaedgeJavaEdgedeMac-mini ~ % docker run --name nacos \ -e MODEstandalone \ -e JVM_XMS128m \ -e JVM_XMX128m \ -e JVM_XMN64m \ -e JVM_MS64m \ -e JVM_MMS64m \ -p 8848:8848 \ -d nacos/nacos-server:v2.2.3 a624c64a1a25ad2d15908a67316d…

虚拟机快照

1.为什么使用快照 在学习阶段我们无法避免的可能损坏Linux操作系统。 如果损坏的话,重新安装一个Linux操作系统就会十分麻烦。 VMware虚拟机(Workstation和Funsion)支持为虚拟机制作快照。 通过快照将当前虚拟机的状态保存下来,在…

集合-及其各种特征详解

集合 概念:是提供一种存储空间 可变 的存储模型,存储的数据容量可以发生改变。(也就是集合容量不固定) 集合关系图 绿色的代表接口,蓝色的代表接口的实现类 单列集合 Collection(接口) 概述:单列集合的…

OpenCV-16图像的基本变换

一、图像的放大与缩小 1. 对小狗图片进行缩放 使用API----resize(src, dsize, [,dst,[fx[,fy[,interpolation]]]]) src:要缩放的图像。 dsize:缩放之后的图像大小,元组和列表表示都可以。 dst:可选参数…

通过使用别名让 SQL 更简短-数据库教程shulanxt.com-帆软软件有限公司

MySQL视频教程导航 https://www.shulanxt.com/database/mysqlvideo/p1 SQL 别名 SQL 别名 通过使用 SQL,可以为表名称或列名称指定别名。 基本上,创建别名是为了让列名称的可读性更强。 列的 SQL 别名语法 SELECT column_name AS alias_name FROM …

计算机基础面试题 |12.精选计算机基础面试题

🤍 前端开发工程师(主业)、技术博主(副业)、已过CET6 🍨 阿珊和她的猫_CSDN个人主页 🕠 牛客高级专题作者、在牛客打造高质量专栏《前端面试必备》 🍚 蓝桥云课签约作者、已在蓝桥云…

硬盘检测软件 SMART Utility mac功能特色

SMART Utility for mac是一款苹果电脑上磁盘诊断工具,能够自动检测磁盘的状态和错误情况,分析并提供错误报告,以直观的界面让用户可明确地知道自己的磁盘状况。SMART Utility 支持普通硬盘HDD和固态硬盘SSD,能够显示出详细的磁盘信息&#xf…

自存react crash course(1)

1.创建一个react 项目 确保有node.js 创建名为react-task-tracker的react项目 npx create-react-app react-task-tracker 启动项目 npm start2.项目结构 所有组件都是放在src下面的 3. jsx // jsx语法 和html很像&#xff0c;class用的是className来使用css的样式<div…

【AI视野·今日Robot 机器人论文速览 第六十七期】Mon, 1 Jan 2024

AI视野今日CS.Robotics 机器人学论文速览 Mon, 1 Jan 2024 Totally 16 papers &#x1f449;上期速览✈更多精彩请移步主页 Daily Robotics Papers MURP: Multi-Agent Ultra-Wideband Relative Pose Estimation with Constrained Communications in 3D Environments Authors A…

【go语言】select多路选择

select基础知识 select 是 Go 语言中用于处理通道操作的控制结构&#xff0c;它类似于 switch 语句&#xff0c;但专门用于通道的选择。select 语句使得一个 goroutine 可以等待多个通道操作&#xff0c;当其中任意一个通道操作可以进行时&#xff0c;就会执行相应的 case 分支…

春招冲刺第一天:Excel入门

春招冲刺第一天 前言&#xff1a; 转行换方向了家人们&#xff0c;准备往数据分析那转了&#xff0c;实习我现在也找不到&#xff0c;打算先猛学两周技术&#xff0c;过完年再投简历了。 时间确实非常紧张&#xff0c;目前一天计划学8小时以上&#xff0c;主要参考视频——&g…