本文主要是介绍tophat以及cufflinks的使用,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
tophat的安装:
$ wget http://ccb.jhu.edu/software/tophat/downloads/tophat-2.0.14.Linux_x86_64.tar.gz
$ chmod 755 tophat-2.0.14.Linux_x86_64.tar.gz
$ tar zxf tophat-2.0.14.Linux_x86_64.tar.gz
$ echo 'PATH=$PATH:/home/maths/bio_software/tophat/tophat-2.0.14.Linux_x86_64' >>~/.bashrc
$ source ~/.bashrc
______________________________________________________________
cufflinks的安装:
wget http://cole-trapnell-lab.github.io/cufflinks/assets/downloads/cufflinks-2.2.1.Linux_x86_64.tar.gz
chmod 755 cufflinks-2.2.1.Linux_x86_64.tar.gz
tar zxf cufflinks-2.2.1.Linux_x86_64.tar.gz
echo 'PATH=$PATH:/home/maths/bio_software/cufflinks/cufflinks-2.2.1.Linux_x86_64' >> ~/.bashrc
source ~/.bashrc
——————————————————————————————————————
tophat的运行:
——————————————————————————————————————————————————————————————————
使用su进入root,否则权限不够,出错。。。。
[root@ld-shux test_DATA]# bowtie2-build Trinity.fasta genome
$ tophat -N 5 --read-edit-dist 5 -r 50 --mate-std-dev 20 -p 20 -a 10 -i 20 -o SRR493740_temp/ genome SRR493741_1.fastq SRR493741_2.fastq
结果:
-rw-r--r--. 1 root root 4313663 9月 13 09:33 genome.1.bt2
-rw-r--r--. 1 root root 54368 9月 13 09:33 genome.2.bt2
-rw-r--r--. 1 root root 5003 9月 13 09:33 genome.3.bt2
-rw-r--r--. 1 root root 54361 9月 13 09:33 genome.4.bt2
-rw-r--r--. 1 root root 4313663 9月 13 09:33 genome.rev.1.bt2
-rw-r--r--. 1 root root 54368 9月 13 09:33 genome.rev.2.bt2
——————————————————————————————————————————————————————————————————
[root@ld-shux test_DATA]# cd tophat_out
结果:
总用量 1392
-rw-r--r--. 1 root root 621779 9月 13 09:36 accepted_hits.bam
-rw-r--r--. 1 root root 557 9月 13 09:36 align_summary.txt
-rw-r--r--. 1 root root 769 9月 13 09:36 deletions.bed
-rw-r--r--. 1 root root 700 9月 13 09:36 insertions.bed
-rw-r--r--. 1 root root 52 9月 13 09:36 junctions.bed
drwxr-xr-x. 2 root root 4096 9月 13 09:36 logs
-rw-r--r--. 1 root root 170 9月 13 09:36 prep_reads.info
-rw-r--r--. 1 root root 778018 9月 13 09:36 unmapped.bam
————————————————————————————————————————————————————————————————————
cufflinks的运行:[root@lxy-shuxue /home/maths/bio_data/SRR493741_temp]#cufflinks -p 26 -u -o sample493741 -L sample493741 accepted_hits.bam(大概运行五十分钟左右,在代码后面加上空格和& ,可以使他在后台运行)
[root@ld-shux sample1]# cufflinks -p 4 -b /home/shuxue/fusicong/trinity/trinityrnaseq-2.2.0/sample_data/test_DATA/Trinity.fasta -u -o sample1 -L sample1 ./accepted_hits.bam
$ cd sample1
总用量 44
-rw-r--r--. 1 root root 5672 9月 13 14:53 genes.fpkm_tracking
-rw-r--r--. 1 root root 6298 9月 13 14:53 isoforms.fpkm_tracking
-rw-r--r--. 1 root root 0 9月 13 14:53 skipped.gtf
-rw-r--r--. 1 root root 27542 9月 13 14:53 transcripts.gtf
$ cat genes.fpkm_tracking
tracking_id class_code nearest_ref_id gene_id gene_short_name tss_id locus length coverage FPKM FPKM_conf_lo FPKM_conf_hi FPKM_status
sample1.1 - - sample1.1 - - TRINITY_DN104_c0_g1_i1:88-408 - - 36413.9 15310.6 57517.2 OK
sample1.3 - - sample1.3 - - TRINITY_DN129_c0_g1_i1:12-546 - - 10691.8 3788.23 17595.3 OK
sample1.4 - - sample1.4 - - TRINITY_DN128_c1_g1_i1:0-845 - - 3836.12 936.287 6735.96 OK
sample1.2 - - sample1.2 - - TRINITY_DN106_c0_g1_i1:3-1111 - - 12805.9 8324.47 17287.3 OK
sample1.5 - - sample1.5 - - TRINITY_DN131_c0_g1_i1:0-1506 - - 13458.2 9626.46 17289.9 OK
sample1.6 - - sample1.6 - - TRINITY_DN151_c0_g1_i1:26-374 - - 32034.4 14264.9 49803.8 OK
sample1.8 - - sample1.8 - - TRINITY_DN163_c0_g1_i1:27-542 - - 7945.89 1939.36 13952.4 OK
sample1.7 - - sample1.7 - - TRINITY_DN134_c0_g1_i1:0-1178 - - 35288.1 28127.2 42449.1 OK
sample1.9 - - sample1.9 - - TRINITY_DN172_c0_g1_i1:33-454 - - 21236.5 9456.61 33016.4 OK
sample1.11 - - sample1.11 - - TRINITY_DN191_c0_g1_i1:0-1134 - - 7166.3 3873.54 10459.1 OK
sample1.12 - - sample1.12 - - TRINITY_DN202_c0_g1_i1:2-718 - - 5495.19 1609.5 9380.88 OK
sample1.10 - - sample1.10 - - TRINITY_DN172_c1_g1_i1:34-533 - - 9578.56 2805.5 16351.6 OK
sample1.13 - - sample1.13 - - TRINITY_DN208_c0_g1_i1:0-203 - - 141598 56211.3 226985 OK
sample1.14 - - sample1.14 - - TRINITY_DN210_c0_g1_i1:8-383 - - 20773.3 7360.24 34186.3 OK
$ cat transcripts.gtf
TRINITY_DN104_c0_g1_i1 Cufflinks transcript 89 408 1000 . . gene_id "sample1.1"; transcript_id "sample1.1.1"; FPKM "36413.8802824304"; frac "1.000000"; conf_lo "15310.578374"; conf_hi "57517.182191"; cov "7.081771";
TRINITY_DN104_c0_g1_i1 Cufflinks exon 89 408 1000 . . gene_id "sample1.1"; transcript_id "sample1.1.1"; exon_number "1"; FPKM "36413.8802824304"; frac "1.000000"; conf_lo "15310.578374"; conf_hi "57517.182191"; cov "7.081771";
TRINITY_DN129_c0_g1_i1 Cufflinks transcript 13 546 1000 . . gene_id "sample1.3"; transcript_id "sample1.3.1"; FPKM "10691.7760497384"; frac "1.000000"; conf_lo "3788.230872"; conf_hi "17595.321227"; cov "3.534872";
TRINITY_DN129_c0_g1_i1 Cufflinks exon 13 546 1000 . . gene_id "sample1.3"; transcript_id "sample1.3.1"; exon_number "1"; FPKM "10691.7760497384"; frac "1.000000"; conf_lo "3788.230872"; conf_hi "17595.321227"; cov "3.534872";
TRINITY_DN128_c1_g1_i1 Cufflinks transcript 1 845 1000 . . gene_id "sample1.4"; transcript_id "sample1.4.1"; FPKM "3836.1244811615"; frac "1.000000"; conf_lo "936.286945"; conf_hi "6735.962017"; cov "1.429928";
TRINITY_DN128_c1_g1_i1 Cufflinks exon 1 845 1000 . . gene_id "sample1.4"; transcript_id "sample1.4.1"; exon_number "1"; FPKM "3836.1244811615"; frac "1.000000"; conf_lo "936.286945"; conf_hi "6735.962017"; cov "1.429928";
TRINITY_DN106_c0_g1_i1 Cufflinks transcript 4 1111 1000 . . gene_id "sample1.2"; transcript_id "sample1.2.1"; FPKM "12805.8944818526"; frac "1.000000"; conf_lo "8324.465706"; conf_hi "17287.323258"; cov "4.754573";
TRINITY_DN106_c0_g1_i1 Cufflinks exon 4 1111 1000 . . gene_id "sample1.2"; transcript_id "sample1.2.1"; exon_number "1"; FPKM "12805.8944818526"; frac "1.000000"; conf_lo "8324.465706"; conf_hi "17287.323258"; cov "4.754573";
TRINITY_DN131_c0_g1_i1 Cufflinks transcript 1 1506 1000 . . gene_id "sample1.5"; transcript_id "sample1.5.1"; FPKM "13458.1593640959"; frac "1.000000"; conf_lo "9626.463079"; conf_hi "17289.855649"; cov "4.834386";
TRINITY_DN131_c0_g1_i1 Cufflinks exon 1 1506 1000 . . gene_id "sample1.5"; transcript_id "sample1.5.1"; exon_number "1"; FPKM "13458.1593640959"; frac "1.000000"; conf_lo "9626.463079"; conf_hi "17289.855649"; cov "4.834386";
TRINITY_DN151_c0_g1_i1 Cufflinks transcript 27 374 1000 . . gene_id "sample1.6"; transcript_id "sample1.6.1"; FPKM "32034.3723758535"; frac "1.000000"; conf_lo "14264.899733"; conf_hi "49803.845019"; cov "9.105450";
TRINITY_DN151_c0_g1_i1 Cufflinks exon 27 374 1000 . . gene_id "sample1.6"; transcript_id "sample1.6.1"; exon_number "1"; FPKM "32034.3723758535"; frac "1.000000"; conf_lo "14264.899733"; conf_hi "49803.845019"; cov "9.105450";
TRINITY_DN163_c0_g1_i1 Cufflinks transcript 28 542 1000 . . gene_id "sample1.8"; transcript_id "sample1.8.1"; FPKM "7945.8925271788"; frac "1.000000"; conf_lo "1939.362364"; conf_hi "13952.422690"; cov "2.317976";
TRINITY_DN163_c0_g1_i1 Cufflinks exon 28 542 1000 . . gene_id "sample1.8"; transcript_id "sample1.8.1"; exon_number "1"; FPKM "7945.8925271788"; frac "1.000000"; conf_lo "1939.362364"; conf_hi "13952.422690"; cov "2.317976";
____________________________________________________________________________________________________________________________________
$ cuffdiff ./merged.gtf /home/maths/bio_data/SRR493740_temp/accepted_hits.bam /home/maths/bio_data/SRR493741_temp/accepted_hits.bam
用samtools将bam文件转换成为sam文件,可是转换后加的sam文件在进行cuffdiff时,说需要排序,我的sam文件没有排序,这是就不知道怎么搞了?
samtools view accepted_hits.bam >SRR493740_accepted_hits.sam
GTF和GFF两种文件格式之间的转换
直接使用Cufflinks里面的工具gffread
#gff2gtf
gffread my.gff3 -T -o my.gtf
#gtf2gff
gffread merged.gtf -o- > merged.gff3
转载自:陈连福的NGS生信分析
这篇关于tophat以及cufflinks的使用的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!