如何用cufflinks 拼出一个理想的注释文件
2014-09-11 08:58
176 查看
后记:
cufflinks安装:
下载安装包, 不要下载source code ,直接下载binary.
http://cufflinks.cbcb.umd.edu/downloads/cufflinks-2.2.1.Linux_x86_64.tar.gz
下载好后解压,解压后将cuff* 复制到/usr/local/bin中即可。
步骤:
第一步: 产生各自的gtf文件
cufflinks -p 30 -o ROOT RF12.merged.bam
cufflinks -p 30 -o LEAF LF12.merged.bam
发现产生的gtf文件都是单exon
第二部:将产生的gtf文件放到namelist 中
/share/bioinfo/miaochenyong/call_snp/testgroup/newGTF/using_new_versin_naturepipe/LEAF/transcripts.gtf
/share/bioinfo/miaochenyong/call_snp/testgroup/newGTF/using_new_versin_naturepipe/ROOT/transcripts.gtf
第三部执行cuffmerge
cuffmerge -g Osativa_204_gene.gtf -s ./Osativa_204.fa -p 50 new_namelist
结果:
/share/bioinfo/miaochenyong/call_snp/testgroup/newGTF/using_new_versin_naturepipe/merged_asm/merged.gtf
gene_id是merge新生成的, 但是gene_name如果在参考的gtf中有,会保留。 新的gene_name都只是单exon.
background:
在做ASE的过程中,发现很多的SNPsites并没有落到Osativa204 所提供的gene id上,为了给这些位点分配一个gene id, 准备用cufflinks自己拼一个出来
Cufflinks :
assembles transcripts, estimates their abundances, and tests for differential expression and regulation in RNA-Seq samples. It accepts aligned RNA-Seq reads and assembles the alignments into a parsimonious set of transcripts. Cufflinks then estimates the relative abundances of these transcripts based on how many reads support each one, taking into account biases in library preparation protocols.
You can use Cuffquant to pre-compute gene expression levels for each of your samples, which can save time if you have to re-run part of your analysis. Using Cuffquant also makes it easier to spread the load of computation for lots of samples across multiple computers. If you don't want to perform differential expression analysis, you can run Cuffnorm instead of Cuffdiff. Cuffnorm produces simple tables of expression values that you can look at in R (for example) to cluster samples and perform other follow up analysis.
#################################################################
Map the reads for each tissue to the reference genome
We recommend that you use TopHat to map your reads to the reference genome. For this example, we'll assume you have paired-end RNA-Seq data. You can map reads as follows:
The commands above are just examples of how to map reads with TopHat. Please see the TopHat manual for more details on RNA-Seq read mapping.
Run Cufflinks on each mapping file
The next step is to assemble each tissue sample independently using Cufflinks. Assemble each tissue like so:
Merge the resulting assembliesassemblies.txt:
Now run the merge script:
The final, merged annotation will be in the file merged_asm/merged.gtf. At this point, you can use your favorite browser to explore the structure of your genes, or feed this file into downstream informatic analyses, such as a search for orthologs in other organisms. You can also explore your samples with Cuffdiff and identify genes that are significantly differentially expressed between the three conditions. See the workflows below for more details on how to do this.
(optional) Compare the merged assembly with known or annotated genes If you want to discover new genes in a genome that has been annotated, you can use cuffcompare to sort out what is new in your assembly from what is already known. Run cuffcompare like this:
Cuffcompare will produce a number of output files that you can parse to select novel genes and isoforms.
#################################################################
Differential analysis without gene and transcript discovery
Map the reads for each condition to the reference genome
We recommend that you use TopHat to map your reads to the reference genome. For this example, we'll assume you have paired-end RNA-Seq data. Suppose you have RNA-Seq from a knockdown experiment where you have two biological replicates of a mock condition as a control and two replicates of your knockdown.
Note: Cuffdiff will work much better if you map your replicates independently, rather than pooling the replicates from one condition into a single set of reads.
Note: While an GTF of known transcripts is not strictly required at this stage, providing one will improve alignment sensitivity, and ultimately, the accuracy of Cuffdiff's analysis.
You can map reads as follows:
Run Cuffdiff Take the annotated transcripts for your genome (as GFF or GTF) and provide them to cuffdiff along with the BAM files from TopHat for each replicate:
Differential analysis with gene and transcript discovery
Complete steps 1-3 in "Discovering novel genes and transcripts", above
Follow the protocol for gene and transcript discovery listed above. Be sure to provide TopHat and the assembly merging script with an reference annotation if one is available for your organism, to ensure the highest possible quality of differential expression analysis.
Run Cuffdiff Take the merged assembly from produced in step 3 of the discovery protocol and provide it to cuffdiff along with the BAM files from TopHat:
As shown above, replicate BAM files for each conditions must be given as a comma separated list. If you put spaces between replicate files instead of commas, cuffdiff will treat them as independent conditions.
详细说明:
http://cufflinks.cbcb.umd.edu/manual.html
cufflinks安装:
下载安装包, 不要下载source code ,直接下载binary.
Source code |
Linux x86_64 binary |
下载好后解压,解压后将cuff* 复制到/usr/local/bin中即可。
步骤:
第一步: 产生各自的gtf文件
cufflinks -p 30 -o ROOT RF12.merged.bam
cufflinks -p 30 -o LEAF LF12.merged.bam
发现产生的gtf文件都是单exon
第二部:将产生的gtf文件放到namelist 中
/share/bioinfo/miaochenyong/call_snp/testgroup/newGTF/using_new_versin_naturepipe/LEAF/transcripts.gtf
/share/bioinfo/miaochenyong/call_snp/testgroup/newGTF/using_new_versin_naturepipe/ROOT/transcripts.gtf
第三部执行cuffmerge
cuffmerge -g Osativa_204_gene.gtf -s ./Osativa_204.fa -p 50 new_namelist
结果:
/share/bioinfo/miaochenyong/call_snp/testgroup/newGTF/using_new_versin_naturepipe/merged_asm/merged.gtf
gene_id是merge新生成的, 但是gene_name如果在参考的gtf中有,会保留。 新的gene_name都只是单exon.
background:
在做ASE的过程中,发现很多的SNPsites并没有落到Osativa204 所提供的gene id上,为了给这些位点分配一个gene id, 准备用cufflinks自己拼一个出来
Cufflinks :
assembles transcripts, estimates their abundances, and tests for differential expression and regulation in RNA-Seq samples. It accepts aligned RNA-Seq reads and assembles the alignments into a parsimonious set of transcripts. Cufflinks then estimates the relative abundances of these transcripts based on how many reads support each one, taking into account biases in library preparation protocols.
Common uses of the Cufflinks package
Cufflinks includes a number of tools for analyzing RNA-Seq experiments. Some of these tools can be run on their own, while others are pieces of a larger workflow. The complexity of your workflow depends on what you want to achieve with your analysis. For a complete discussion of how Cufflinks can help you with your analysis, please see our protocol paper. The paper includes a diagram (Figure 2) describing how the various parts of the Cufflinks package (and its companion tool TopHat) fit together. As of version 2.2.0, you can also run Cuffquant and Cuffnorm to make large scale analyses easier to handle. The figure below is an updated version of Figure 2 showing how the two utilities released after the protocol paper appeared fit into the workflow:You can use Cuffquant to pre-compute gene expression levels for each of your samples, which can save time if you have to re-run part of your analysis. Using Cuffquant also makes it easier to spread the load of computation for lots of samples across multiple computers. If you don't want to perform differential expression analysis, you can run Cuffnorm instead of Cuffdiff. Cuffnorm produces simple tables of expression values that you can look at in R (for example) to cluster samples and perform other follow up analysis.
#################################################################
Discovering novel genes and transcripts:
RNA-Seq is a powerful technology for gene and splice variant discovery. You can use Cufflinks to help annotate a new genome or find new genes and splice isoforms of known genes in even well-annotated genomes. Annotating genomes is a complex and difficult process, but we outline a basic workflow that should get you started here. The workflow also excludes examples of the commands you'd run to implement each step in the workflow. Suppose we have RNA-Seq reads from human liver, brain, and heart.Map the reads for each tissue to the reference genome
We recommend that you use TopHat to map your reads to the reference genome. For this example, we'll assume you have paired-end RNA-Seq data. You can map reads as follows:
tophat -r 50 -o tophat_brain /seqdata/indexes/hg19 brain_1.fq brain_2.fq tophat -r 50 -o tophat_liver /seqdata/indexes/hg19 liver_1.fq liver_2.fq tophat -r 50 -o tophat_heart /seqdata/indexes/hg19 heart_1.fq heart_2.fq
The commands above are just examples of how to map reads with TopHat. Please see the TopHat manual for more details on RNA-Seq read mapping.
Run Cufflinks on each mapping file
The next step is to assemble each tissue sample independently using Cufflinks. Assemble each tissue like so:
cufflinks -o cufflinks_brain tophat_brain/accepted_hits.bam
cufflinks -o cufflinks_liver tophat_liver/accepted_hits.bam
cufflinks -o cufflinks_heart tophat_liver/accepted_hits.bam
cufflinks -o cufflinks_liver tophat_liver/accepted_hits.bam
cufflinks -o cufflinks_heart tophat_liver/accepted_hits.bam
Merge the resulting assembliesassemblies.txt:
cufflinks_brain/transcripts.gtf
cufflinks_liver/transcripts.gtf
cufflinks_heart/transcripts.gtf
cufflinks_liver/transcripts.gtf
cufflinks_heart/transcripts.gtf
Now run the merge script:
cuffmerge -s /seqdata/fastafiles/hg19/hg19.fa assemblies.txt
The final, merged annotation will be in the file merged_asm/merged.gtf. At this point, you can use your favorite browser to explore the structure of your genes, or feed this file into downstream informatic analyses, such as a search for orthologs in other organisms. You can also explore your samples with Cuffdiff and identify genes that are significantly differentially expressed between the three conditions. See the workflows below for more details on how to do this.
(optional) Compare the merged assembly with known or annotated genes If you want to discover new genes in a genome that has been annotated, you can use cuffcompare to sort out what is new in your assembly from what is already known. Run cuffcompare like this:
cuffcompare -s /seqdata/fastafiles/hg19/hg19.fa -r known_annotation.gtf merged_asm/merged.gtf
Cuffcompare will produce a number of output files that you can parse to select novel genes and isoforms.
#################################################################
Identifying differentially expressed and regulated genes
There are two workflows you can choose from when looking for differentially expressed and regulated genes using the Cufflinks package. The first workflow is simpler and is a good choice when you aren't looking for novel genes and transcripts. This workflow requires that you not only have a reference genome, but also a reference gene annotation in GFF format (GFF3 or GTF2 formats are accepted, see details here). The second workflow, which includes steps to discover new genes and new splice variants of known genes, is more complex and requires more computing power. The second workflow can use and augment a reference gene annotation GFF if one is available.Differential analysis without gene and transcript discovery
Map the reads for each condition to the reference genome
We recommend that you use TopHat to map your reads to the reference genome. For this example, we'll assume you have paired-end RNA-Seq data. Suppose you have RNA-Seq from a knockdown experiment where you have two biological replicates of a mock condition as a control and two replicates of your knockdown.
Note: Cuffdiff will work much better if you map your replicates independently, rather than pooling the replicates from one condition into a single set of reads.
Note: While an GTF of known transcripts is not strictly required at this stage, providing one will improve alignment sensitivity, and ultimately, the accuracy of Cuffdiff's analysis.
You can map reads as follows:
tophat -r 50 -G annotation.gtf -o tophat_mock_rep1 /seqdata/indexes/hg19 \
mock_rep1_1.fq mock_rep1_2.fq
tophat -r 50 -G annotation.gtf -o tophat_mock_rep2 /seqdata/indexes/hg19 \
mock_rep2_1.fq mock_rep2_2.fq
tophat -r 50 -G annotation.gtf -o tophat_knockdown_rep1 /seqdata/indexes/hg19 \
knockdown_rep1_1.fq knockdown_rep1_2.fq
tophat -r 50 -G annotation.gtf -o tophat_knockdown_rep2 /seqdata/indexes/hg19 \
knockdown_rep2_1.fq knockdown_rep2_2.fq
mock_rep1_1.fq mock_rep1_2.fq
tophat -r 50 -G annotation.gtf -o tophat_mock_rep2 /seqdata/indexes/hg19 \
mock_rep2_1.fq mock_rep2_2.fq
tophat -r 50 -G annotation.gtf -o tophat_knockdown_rep1 /seqdata/indexes/hg19 \
knockdown_rep1_1.fq knockdown_rep1_2.fq
tophat -r 50 -G annotation.gtf -o tophat_knockdown_rep2 /seqdata/indexes/hg19 \
knockdown_rep2_1.fq knockdown_rep2_2.fq
Run Cuffdiff Take the annotated transcripts for your genome (as GFF or GTF) and provide them to cuffdiff along with the BAM files from TopHat for each replicate:
cuffdiff annotation.gtf mock_rep1.bam,mock_rep2.bam \
knockdown_rep1.bam,knockdown_rep2.bam
knockdown_rep1.bam,knockdown_rep2.bam
Differential analysis with gene and transcript discovery
Complete steps 1-3 in "Discovering novel genes and transcripts", above
Follow the protocol for gene and transcript discovery listed above. Be sure to provide TopHat and the assembly merging script with an reference annotation if one is available for your organism, to ensure the highest possible quality of differential expression analysis.
Run Cuffdiff Take the merged assembly from produced in step 3 of the discovery protocol and provide it to cuffdiff along with the BAM files from TopHat:
cuffdiff merged_asm/merged.gtf liver1.bam,liver2.bam brain1.bam,brain2.bam
As shown above, replicate BAM files for each conditions must be given as a comma separated list. If you put spaces between replicate files instead of commas, cuffdiff will treat them as independent conditions.
详细说明:
http://cufflinks.cbcb.umd.edu/manual.html
相关文章推荐
- 如何创建一个XML文件,然后创建一个与之关联的样式表文件?
- 如何在将工作表中的一个薄(如:Sheet2)拷贝成另一个文件并到保存A盘。
- 如何把一个lib库文件加入到VC.NET项目中去
- 如何把一个lib库文件加入到VC.NET项目中去
- 如何在一个EXE文件中启动另一个EXE文件
- 如何将多个文件捆绑成一个可执行文件
- 如何利用代码从网站上获取一个文件的大小,并且下载时不出现保存提示框
- 如何在写入一个long型的数据到文件?在线等。20分送!
- 如何创建一个XML文件,然后创建一个与之关联的样式表文件?
- 如何把多个文件写入到一个文件中去并能分解
- 如何复制一个目录里面的所有目录和文件
- 如何把一个lib库文件加入到VC.NET项目中去 选择自 SEUU 的 Blog
- 如何复制一个目录里面的所有目录和文件
- 如何实现一个文件系统(全文)
- 【转载】如何把一个lib库文件加入到VC.NET项目中去
- aspx.cs 文件中,想实现弹出一个警告窗口后,点击“确定”后,重定向到一个 list.aspx 页,如何做啊?
- 如何判断一个文件或目录是否存在
- 如何用命令打包一个站点,包括其所有目录文件
- 如何将多个文件捆绑成一个可执行文件
- [愚翁专栏]如何把多个文件写入到一个文件中去并能分解