基于PASA進(jìn)行基因預(yù)測

PASA, acronym for Program to Assemble** S**pliced Alignments, is a eukaryotic genome annotation tool that exploits spliced alignments of expressed transcript sequences to automatically model gene structures, and to maintain gene structure annotation consistent with the most recently available experimental sequence data. PASA also identifies and classifies all splicing variations supported by the transcript alignments.

基于RNA-seq數(shù)據(jù),將其利用trinity組裝----> 利用PASA將組裝好的序列比對到draft ref----〉預(yù)測基因

軟件安裝

  • Trinity

conda create -n trinity trinity=2.8.5
#激活環(huán)境
conda activate trinity
  • PASA

(1) Mysql數(shù)據(jù)庫的準(zhǔn)備(*考慮到Mysql配置需要root權(quán)限,非常不方便,推介使用SQLite, 比起MySQL速度較慢)

 ## 創(chuàng)建只讀權(quán)限(read-only)用戶和所有權(quán)限(read-write)用戶各一個
mysql> GRANT SELECT ON *.* TO 'pasa'@'%' IDENTIFIED BY '123456'
mysql> GRANT ALL ON *.* TO 'shehb'@'%' IDENTIFIED BY '123456'
mysql> FLUSH PRIVILEGES 123456

考慮到Mysql配置需要root權(quán)限,非常不方便,推介使用SQLite, 雖然比起MySQL速度較慢

(2) 安裝perl模塊

cpanm install DBD::mysql
cpanm install GD
#用SQLite時
cpanm install DBD::SQLite

(3) 安裝Gmap,blat,fasta3

conda install -c bioconda gmap
conda install blat
conda install fasta3
#或根據(jù)源碼安裝gmap
wget http://research-pub.gene.com/gmap/src/gmap-gsnap-2018-07-04.tar.gz
tar xf gmap-gsnap-2018-07-04.tar.gz
cd gmap-2018-07-04/
./configure --prefix=$PWD
make -j 20
make install

(4) 安裝univec 庫(污染數(shù)據(jù)庫)

wget ftp://ftp.ncbi.nih.gov/pub/UniVec/UniVec
formatdb  -i UniVec -p F

(5) 安裝PASA

## 安裝
wget https://github.com/PASApipeline/PASApipeline/releases/download/pasa-v2.4.1/PASApipeline.v2.4.1.FULL.tar.gz
tar -zxf PASApipeline.v2.4.1.FULL.tar.gz
cd PASApipeline.v2.4.1.FULL.tar
make -j 8

(6) 配置PASA config (如果使用SQLite,則下面MySQL的設(shè)置不重要

## 配置
cd pasa_conf
cp pasa.CONFIG.template conf.txt
vi conf.txt

## 需要修改如下內(nèi)容:
MYSQL_RW_USER=shehb
MYSQL_RW_PASSWORD=123456
MYSQL_RO_USER=pasa
MYSQL_RO_PASSWORD=123456
MYSQLSERVER=localhost  此處不能填寫IP
PASA_ADMIN_EMAIL=郵箱
BASE_PASA_URL=http://pasa-dev.tigr.org/cgi-bin/

(7) 修改pasa.alignAssembly.Template.txt

cd pasa_conf
cp pasa.alignAssembly.Template.txt alignAssembly.config
vi alignAssembly.config

DATABASE=/tem/mydb.sqlite
validate_alignments_in_db.dbi:--MIN_PERCENT_ALIGNED=80
validate_alignments_in_db.dbi:--MIN_AVG_PER_ID=80

小提示

  • MYSQLDB指定的為工作數(shù)據(jù)庫運(yùn)行完一次后需要刪除該數(shù)據(jù)庫, 否則下次運(yùn)行會報(bào)錯
  • 如果DATABASE設(shè)置的為絕對路徑(ie. /tem/mydb.sqlite),將會利用SQLite;如果僅僅用一個簡單名字(ie. my_pasa_db),則默認(rèn)使用MySQL

運(yùn)行

  • 轉(zhuǎn)錄組組裝(Trinity de novo)

## 結(jié)果trinity_out_dir/Triity.fasta
Trinity --seqType fq --max_memory 50G --left reads_1.fq  --right reads_2.fq --CPU 6
# 參數(shù)
--seqType <string>      :type of reads: ('fa' or 'fq')
--max_memory <string>      :suggested max memory to use by Trinity where limiting can be enabled
--left  <string>    :left reads, one or more file names (separated by commas, no spaces)
--right <string>    :right reads, one or more file names (separated by commas, no spaces)
  • 轉(zhuǎn)錄組組裝 (Trinity genome-guieded)

Trinity --genome_guided_bam rnaseq_alignments.csorted.bam \
        --max_memory 50G \
        --genome_guided_max_intron 10000 \
         --CPU 6                        
  • 若有多個樣本的sorted.bam文件,則需使用samtools merge 將其merge 。結(jié)果為Trinity_GG.fasta

  • 以上兩種方法可以選用一種作為transcript.fasta即可

  • 過濾轉(zhuǎn)錄本序列(可選)

/PASApipeline.v2.4.1/bin/seqclean transcript.fasta -v /path/to/your/UniVec
  • PASA將Trinity組裝結(jié)果回帖到參考基因組

Launch_PASA_pipeline.pl \
                    -c alignAssembly.config\
                    -C -R  \
                    -g example.fa.masked \
                    -t transcript.fasta.clean \
            -T -u transcript.fasta \
                    --ALIGNERS blat,gmap  \
                    --CPU 12 

## 參數(shù)
-c <filename> *  比對配置文件
-C  flag, create MYSQL database
-R  flag, run alignment/assembly pipeline
-g <filename> *  參考基因組
-t <filename> *  轉(zhuǎn)錄組組裝的序列
--ALIGNERS  比對軟件,可以只用一個
-- CUP 線程數(shù)

這一步得到的<prefix>.assemblies.fasta和<prefix>.pasa_assemblies.gff3, 其中g(shù)ff3用于后面分析

===========================分割線==========================
此外,也可根據(jù)PASA將轉(zhuǎn)錄組回帖到基因組的結(jié)果,從中提取ORF,用于訓(xùn)練基因集合,來用于其它基因預(yù)測軟件。比如:AUGUSTUS

  • 從PASA組裝中提取ORF

PASApipeline-v2.3.3/scripts/pasa_asmbls_to_training_set.dbi \
    --pasa_transcripts_fasta <prefix>.assemblies.fasta \
    --pasa_transcripts_gff3 <prefix>.pasa_assemblies.gff3

得到主要文件:

  • <prefix>.assemblies.fasta.transdecoder.cds/pep/gff3/bed: 雖然不再基因組上,但是根據(jù)轉(zhuǎn)錄本信息,有可能是編碼區(qū)的結(jié)果
  • <prefix>.assemblies.fasta.transdecoder.genome.bed/gff3: 對應(yīng)基因組序列的基因模型

我們需要的是后者,并對其進(jìn)行格式轉(zhuǎn)化gff3---> Genbank格式,進(jìn)行augustus訓(xùn)練,具體可查看 Augugtus基因注釋


也可以通過conda進(jìn)行安裝pasa

conda create -n pasa 
conda activate pasa
conda install -c bioconda pasa

配置文件位于*envs/pasa/opt/pasa-2.5.2/pasa_conf

參考

基因結(jié)構(gòu)注釋軟件PASA安裝全紀(jì)錄
PASA的安裝與使用
使用MAKER進(jìn)行基因注釋(高級篇之AUGUSTUS模型訓(xùn)練
Githup

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡書系信息發(fā)布平臺,僅提供信息存儲服務(wù)。