-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcummeRbund-example-workflow.Rnw
201 lines (150 loc) · 4.91 KB
/
cummeRbund-example-workflow.Rnw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
%
%
%
%\VignetteIndexEntry{Sample cummeRbund workflow}
%\VignetteKeywords{cummeRbund,visualization,sequencing,cufflinks,cuffdiff}
%\VignettePackage{cummeRbund}
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\SweaveOpts{prefix.string=graphics/plot}
\documentclass[10pt]{article}
\usepackage{amsmath}
\usepackage[authoryear,round]{natbib}
\usepackage{hyperref}
\hypersetup{
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=red,
urlcolor=black
}
\usepackage{theorem}
\usepackage{float}
\usepackage{ifthen}
\usepackage[OT1]{fontenc}
\newcommand{\R}{{\textsf{R}}}
\newcommand{\code}[1]{{\texttt{#1}}}
\newcommand{\term}[1]{{\emph{#1}}}
\newcommand{\Rpackage}[1]{\textsf{#1}}
\newcommand{\Rfunction}[1]{\texttt{#1}}
\newcommand{\Robject}[1]{\texttt{#1}}
\newcommand{\Rclass}[1]{{\textit{#1}}}
\newcommand{\Rmethod}[1]{{\textit{#1}}}
\newcommand{\Rfunarg}[1]{{\textit{#1}}}
\bibliographystyle{plainnat}
\title{cummeRbund: Sample Workflow}
\author{Loyal A. Goff, Cole Trapnell}
\date{}
\title{CummeRbund workflow}
\author{Loyal A. Goff}
\begin{document}
<<init, echo=FALSE>>=
options(width=65)
@
\maketitle
This document is a work in progress and will continually be updated as new features or analyses are integrated into the cummeRbund pipeline.
This guide is being released as is, with the understanding that existing gaps will be completed in due time. Please bear with us as we work to expand this resource.
\tableofcontents
\section{Overview}
\section{Workflow Summary}
\section{Reading cuffdiff output}
<<loadLib>>=
library(cummeRbund)
@
<<read>>=
cuff <- readCufflinks(dir=system.file("extdata", package="cummeRbund"))
cuff
@
This example uses the 'test' dataset that is included in the cummeRbund package. Importantly, if your current working directory contains the output
from your cuffdiff analysis, simply calling \Rfunction{cuff<-readCufflinks()} will automatically find the default files and begin parsing your data.
\section{Quality Assessment of data}
\subsection{Evaluating model fit}
<<model_fit_1,include=FALSE>>=
d<-dispersionPlot(genes(cuff))
d
@
<<label=model_fit_1_plot,fig=TRUE,echo=FALSE>>=
<<model_fit_1>>
print(d)
@
\subsection{Identifying outlier replicates}
<<rep_boxplot_1,include=FALSE>>=
pBoxRep<-csBoxplot(genes(cuff),replicates=T)
pBoxRep
@
<<rep_dendro_1,include=FALSE>>=
pDendro<-csDendro(genes(cuff),replicates=T)
pDendro
@
<<label=rep_boxplot_1_plot,fig=TRUE,echo=FALSE>>=
<<rep_boxplot_1>>
print(pBoxRep)
@
<<label=rep_dendro_1_plot,fig=TRUE,echo=FALSE>>=
<<rep_dendro_1>>
print(pDendro)
@
\subsection{Determining relationships between conditions}
<<boxplot_1,include=FALSE>>=
pBox<-csBoxplot(genes(cuff))
pBox
@
<<label=boxplot_1_plot,fig=TRUE,echo=FALSE>>=
<<boxplot_1>>
print(pBox)
@
\section{Analysis of differential expression}
\subsection{Identifying differentially expressed genes}
<<diff_exp_genes_1>>=
sigGeneIds<-getSig(cuff,alpha=0.05,level="genes")
head(sigGeneIds)
length(sigGeneIds)
@
<<diff_exp_genes_2>>=
hESCvsFibroblast.sigGeneIds<-getSig(cuff,"hESC","Fibroblasts",alpha=0.05,level="genes")
head(hESCvsFibroblast.sigGeneIds)
length(hESCvsFibroblast.sigGeneIds)
@
\subsubsection{Creating significant gene sets}
<<diff_exp_genes_3>>=
sigGenes<-getGenes(cuff,sigGeneIds)
sigGenes
@
\subsubsection{Visualization of significant gene sets}
\subsection{Identifying differentially expressed features}
<<diff_exp_feat_1>>=
sigGeneIds<-getSig(cuff,alpha=0.05,level="isoforms")
head(sigGeneIds)
length(sigGeneIds)
@
\subsubsection{Creating significant feature sets}
\subsubsection{Visualization of significant feature sets}
\subsection{Analysis of individual genes}
\subsubsection{Subsetting individual genes}
\subsubsection{Creating a CuffGene object}
<<ind_gene_1>>=
Pink1<-getGene(cuff,'PINK1')
Pink1
@
\subsubsection{Visualization of individual genes}
\section{Data Exploration}
\subsection{Identifying patterns of gene expression}
Partitioning around medioids as e.g.
\subsection{Similarity analysis}
\Rmethod{findSimilar}
\subsection{Specificity analysis}
\Rmethod{csSpecificity}
\section{Analysis of differential splicing}
\section{Analysis of differential promoter usage}
\section{Linking with additional analyses}
\subsection{Gene Ontology Analysis (clusterProfiler)}
In this particular example, the reference .gtf file that was used has the official gene symbol (HUGO) stored in the \emph{gene name} attribute field. This value is carried over by cuffdiff
and cummeRbund into the \emph{gene\_short\_name} field for each feature. We will exploit this ID and use it to map genes to their \emph{Entrez ID} to be able to use the very nice \Rpackage{clusterProfiler} package.
The first step is to translate
\subsection{Gene Set Enrichment Analysis (Preranked)}
We will generate .rnk and .gmx files for use in the GSEA Preranked analysis.
\subsection{Principal component analysis}
\section{Visualization Tips/Tricks}
\subsection{Faceting}
\section{Session Info}
\end{document}