-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path13-Testing.Rmd
175 lines (117 loc) · 4.56 KB
/
13-Testing.Rmd
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
# Testing
This is just an area for me to test out a few things to help create this book.
For instance,
## Flowchart
Some stuff here.
[//]: # (```{r, echo=FALSE, engine='tikz', out.width='90%', fig.ext=if (knitr:::is_latex_output()) 'pdf' else 'png', fig.cap='Some caption.'})
[//]: # (\begin{tikzpicture}[scale=.7])
[//]: # (\draw [fill=gray!30,very thick] (0,-1) rectangle (5,1);)
[//]: # (\draw [very thick] (5, 0) -- (13,0);)
[//]: # (\node [below] at (2,-1) {\large Hello};)
[//]: # (\node [below, align=center] at (0,-1) {\large Two\\ lines};)
[//]: # (\end{tikzpicture})
[//]: # (```)
```{r, echo=F}
library(DiagrammeR)
grViz("
digraph blorts {
node [fontname = Helvetica]
input [label = 'Input Fastq', shape=oval, color=red, alpha=0.5, style=filled]
fastqc [label = 'FastQC', shape=square]
multi [label = 'MultiQC', shape=square]
qual [label = 'Quality\nOverview', shape=oval]
ref [label = 'Reference\nTranscriptome', shape=oval]
salmon [label = 'Salmon', shape=square]
quant [label = 'Quantification Files\n(quant.sf)', shape=oval]
deseq [label = 'DESeq2', shape=square]
dds [label = 'dds.Rds', shape=oval]
diff [label = 'Differential Expression', shape=oval, color=green, style=filled]
input -> fastqc
fastqc -> multi
multi -> qual
fastqc -> salmon
ref -> salmon
salmon -> quant
quant -> deseq
deseq -> dds
deseq -> diff
} ")
```
\begin{equation}
\sum x_{i}
\end{equation}
```{r, echo=FALSE, warning=FALSE,message=FALSE,error=FALSE}
library(diagram)
# creates an empty plot
openplotmat()
library(diagram)
#par(mar = c(1, 1, 1, 1))
#openplotmat(main = "RNA seq")
plot.new( )
plot.window( xlim=c(-5,5), ylim=c(-5,5) )
boxX <- 0.1
boxY <- 0.05
pos <- coordinates (c(1, 5, 2,1, 1, 1, 3, 3, 3), mx = 10, my = -10)
#plot(pos, type='n')
#text(pos)
straightarrow(from = pos[1, ], to = pos[4, ], arr.type='simple')
straightarrow(from = pos[4, ], to = pos[3, ], arr.type='simple')
straightarrow(from = pos[3, ], to = pos[2, ], arr.type='simple')
straightarrow(from = pos[4, ], to = pos[9, ], arr.type='simple')
straightarrow(from = pos[8, ], to = pos[9, ], arr.type='simple')
straightarrow(from = pos[9, ], to = pos[10, ], arr.type='simple')
straightarrow(from = pos[10, ], to = pos[11, ], arr.type='simple')
straightarrow(from = pos[11, ], to = pos[12, ], arr.type='simple')
straightarrow(from = pos[11, ], to = pos[13, ], arr.type='simple')
straightarrow(from = pos[11, ], to = pos[14, ], arr.type='simple')
straightarrow(from = pos[12, ], to = pos[15, ], arr.type='simple')
straightarrow(from = pos[12, ], to = pos[16, ], arr.type='simple')
straightarrow(from = pos[12, ], to = pos[17, ], arr.type='simple')
straightarrow(from = pos[15, ], to = pos[18, ], arr.type='simple')
straightarrow(from = pos[16, ], to = pos[19, ], arr.type='simple')
straightarrow(from = pos[17, ], to = pos[20, ], arr.type='simple')
textellipse(pos[1,], radx=boxX, rady=boxY, lab='Input Reads\nfastq', box.col = 'red')
```
```
#```{r, echo=FALSE, engine='tikz', out.width='90%', fig.ext=if (knitr:::is_latex_output()) 'pdf' else 'png', fig.cap='Some caption.'}
\begin{document}
\begin{tikzpicture}[node distance=2cm]
\node (start) [startstop] {Start};
\node (in1) [io, below of=start] {Input};
\node (pro1) [process, below of=in1] {Process 1};
\node (dec1) [decision, below of=pro1, yshift=-0.5cm] {Decision 1};
\node (pro2a) [process, below of=dec1, yshift=-0.5cm] {Process 2a text text text text text text text text text text};
\node (pro2b) [process, right of=dec1, xshift=2cm] {Process 2b};
\node (out1) [io, below of=pro2a] {Output};
\node (stop) [startstop, below of=out1] {Stop};
\draw [arrow] (start) -- (in1);
\draw [arrow] (in1) -- (pro1);
\draw [arrow] (pro1) -- (dec1);
\draw [arrow] (dec1) -- node[anchor=east] {yes} (pro2a);
\draw [arrow] (dec1) -- node[anchor=south] {no} (pro2b);
\draw [arrow] (pro2b) |- (pro1);
\draw [arrow] (pro2a) -- (out1);
\draw [arrow] (out1) -- (stop);
\end{tikzpicture}
```
```
$$
\begin{split}
\mathrm{Var}(\hat{\beta}) & =\mathrm{Var}((X'X)^{-1}X'y)\\
& =(X'X)^{-1}X'\mathrm{Var}(y)((X'X)^{-1}X')'\\
& =(X'X)^{-1}X'\mathrm{Var}(y)X(X'X)^{-1}\\
& =(X'X)^{-1}X'\sigma^{2}IX(X'X)^{-1}\\
& =(X'X)^{-1}\sigma^{2}
\end{split}
$$
```
\begin{align}
g(X_{n}) &= g(\theta)+g'({\tilde{\theta}})(X_{n}-\theta) \notag \\
\sqrt{n}[g(X_{n})-g(\theta)] &= g'\left({\tilde{\theta}}\right)
\sqrt{n}[X_{n}-\theta ] (\#eq:align)
\end{align}
```{theorem, name="Pythagorean theorem"}
For a right triangle, if $c$ denotes the length of the hypotenuse
and $a$ and $b$ denote the lengths of the other two sides, we have
$$a^2 + b^2 = c^2$$
```