大致的流程如下:
BBtools --》 Trinity(v2.8.5) --》 Transdecoder --》Trinotate (3.2.1)
即Raw reads用bbtools或者Trimmomatic這些軟件質控锨天,再利用Trinity進行組裝晰洒,預測出來的轉錄本的蛋白編碼區(qū)(ORF)用Transdecoder進行預測椭符,最后再利用 Trinotate對unique transcripts進行注釋(Swissprot [4], Pfam [5], eggNOG [6], Gene Ontology [7], SignalP [8], and Rnammer )
1. 合并左右reads用來組裝參考轉錄本
$cat J.R1.fastq.gz L.R1.fastq.gz >left.fq.gz
$cat J.R2.fastq.gz L.R2.fastq.gz >right.fq.gz
2.質控
$clumpify.sh in1=left.fq.gz in2=right.fq.gz out1=1.clumped.fq.gz out2=2.clumped.fq.gz pigz dedupe
$bbduk.sh in1=1.clumped.fq.gz in2=2.clumped.fq.gz out1=1.trim.fq.gz out2=2.trim.fq.gz pigz ordered qtrim=rl trimq=20 minlen=15 ecco=t maxns=5 trimpolya=10 1>>bbtool.log 2>&1
3. Trinity組裝
$~/soft/miniconda3/bin/Trinity --seqType fq --max_memory 50G --min_kmer_cov 2 --left 1.fq.gz --right 2.fq.gz --CPU 24 --output ./A_aqu.trinity --full_cleanup
查看一下組裝的結果
$TrinityStats.pl A_aqu.Trinity.Trinity.fasta > Aaqu_tran.stats
4. busco評估完整性
$home/spider/project/yuantao/soft/busco-3.0.2/scripts/run_BUSCO.py -i A_aqu.Trinity.Trinity.fasta -m tran -c 12 -o Aaqu -l /home/spider/data/buscodb/arthropoda_odb9
image.png
5. cd-hit去冗余
$cd-hit -i A_aqu.Trinity.Trinity.fasta -o cdhit/ -M 1400 -c 0.9 -T 24
或者
cd-hit-est -i A_aqu.Trinity.Trinity.fasta -o cdhitest.fa -c 0.95 -n 9 -M 1500 -t 12
再跑一次busco导盅,查看結果
image.png
6. Transdecoder預測轉錄本ORF
預測最長的ORF
$TransDecoder.LongOrfs -t ../02_cd-hit-est/cdhitest.fa 1>>transdecoder.log 2>&1
# 建立索引
$diamond makedb --in uniprot_sprot.fasta --db uniprot_sprot.fasta
# BLASTP比對
$diamond blastp -d /home/spider/data/uniprot_lib/uniprot_sprot.fasta -q ./cdhitest.fa.transdecoder_dir/longest_orfs.pep --evalue 1e-5 --max-target-seqs 1 > blastp.outfmt6
#預測可能的編碼區(qū)
$TransDecoder.Predict -t ../02_cd-hit-est/cdhitest.fa --retain_blastp_hits blastp.outfmt6
7.Trinotate安裝及數據庫準備
## 安裝sqlite庫
perl -MCPAN -e shell
install DBD::SQLite
exit
## sqlite3 --help
mkdir Trinotate && cd Trinotate
下載Trinotate和2個注釋用到的數據庫
---網址
https://data.broadinstitute.org/Trinity/Trinotate_v3_RESOURCES/Trinotate_v3_RESOURCES/
---
# http://trinotate.github.io/
# https://github.com/Trinotate/Trinotate/releases
wget https://github.com/Trinotate/Trinotate/archive/v3.0.1.tar.gz -O Trinotate.v3.0.1.tar.gz
tar zxvf Trinotate.v3.0.1.tar.gz
~/biosoft/Trinotate/Trinotate-3.0.1/Trinotate -h
wget https://data.broadinstitute.org/Trinity/Trinotate_v3_RESOURCES/Pfam-A.hmm.gz
wget https://data.broadinstitute.org/Trinity/Trinotate_v3_RESOURCES/uniprot_sprot.pep.gz
wget https://data.broadinstitute.org/Trinity/Trinotate_v3_RESOURCES/Trinotate_v3.sqlite.gz -O Trinotate.sqlite.gz
gunzip Trinotate.sqlite.gz
gunzip uniprot_sprot.pep.gz
makeblastdb -in uniprot_sprot.pep -dbtype prot
gunzip Pfam-A.hmm.gz
hmmpress Pfam-A.hmm
8.Trinotate注釋
## 功能注釋
#blast比對(比對數據庫可以換成nr或者Uniref90)
#search Trinity transcripts(我這里用的是cdhit去了一下冗余的結果)
blastx -query ../02_cd-hit-est/cdhitest.fa -db ../../../soft/Trinotate/Trinotate-3.2.1/database/uniprot_sprot.pep -num_threads 20 -max_target_seqs 1 -outfmt 6 -evalue 1e-5 > blastx.outfmt6
# search Transdecoder-predictes proteins
blastp -query transdecoder.pep -db uniprot_sprot.pep -num_threads 8 -max_target_seqs 1 -outfmt 6 -evalue 1e-3 > blastp.outfmt6
## 功能域注釋
hmmscan --cpu 8 --domtblout TrinotatePFAM.out Pfam-A.hmm transdecoder.pep > pfam.log
## 信號肽預測
../../../soft/signalp-5.0b/bin/signalp -fasta ../03_Transdecoder/cdhitest.fa.transdecoder.pep -org euk -format short -prefix Signalp_10_short
9.導入SQL數據庫中
我們需要把這些結果合并起來,因此我們需要把以下的幾個結果一一進行Load到SQLite db中棠绘,在我們這個工作中的database就是Trinotate.sqlite
轉錄本和蛋白數據
Blast的結果(這個包括蛋白比對和核酸比對的兩個結果)
HMMER比對的Pfam結果
## 導入蛋白和轉錄本結果
$Trinotate Trinotate.sqlite init --gene_trans_map ../02_cd-hit-est/cdhitest.fa.gene_trans_map --transcript_fasta ../02_cd-hit-est/cdhitest.fa --transdecoder_pep ../03_Transdecoder/cdhitest.fa.transdecoder.pep
## 導入blast,pfam等結果檀轨,最后輸出一個annotation report
$Trinotate Trinotate.sqlite LOAD_swissprot_blastp blastp.outfmt6
$Trinotate Trinotate.sqlite LOAD_swissprot_blastx blastx.outfmt6
$Trinotate Trinotate.sqlite LOAD_pfam TrinotatePFAM.out
$Trinotate Trinotate.sqlite LOAD_tmhmm tmhmm.out
$Trinotate Trinotate.sqlite LOAD_signalp signalp.out
$Trinotate Trinotate.sqlite report >trinotate_annotation_report.xls