-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoist.cls
292 lines (260 loc) · 8.16 KB
/
oist.cls
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{oist}
\LoadClass[12pt,twoside]{report}
\RequirePackage[a4paper, headheight=0.6cm, inner=3cm ,outer=3cm, top=3cm, bottom=3cm]{geometry} % Changing size of document
\RequirePackage{silence}
\WarningFilter{auxhook}{Cannot patch}
\RequirePackage[table]{xcolor}
\RequirePackage[bf]{caption} % caption: FIG in bold
\RequirePackage[T1]{fontenc}
\RequirePackage{subfiles}
\providecommand{\main}{.}
\RequirePackage[italian]{babel} % The document is in English
\RequirePackage[utf8]{inputenc} % UTF8 encoding
\RequirePackage[T1]{fontenc} % Font
\RequirePackage{graphicx}
\graphicspath{{\main/images/}}
\RequirePackage{eso-pic} % For the background picture on the title page
\RequirePackage{amsthm,amsmath,amssymb,amsfonts,bbm}
\RequirePackage{fancyhdr} % For the headers
\RequirePackage{hyperref} % Adds clickable links at references
\RequirePackage{float}
\RequirePackage{parskip}
\RequirePackage{booktabs}
\RequirePackage{xstring}
\RequirePackage{stringstrings}
\RequirePackage{xparse}
\RequirePackage{etoolbox}
\RequirePackage{csquotes}
%\RequirePackage{subfigure}
\RequirePackage{subcaption}
\RequirePackage{bm}
\RequirePackage[backend=biber]{biblatex}
\addbibresource{chapters/bibtex.bib}
\RequirePackage{verbatim}
\newcounter{mytaskscounter}
\newcounter{mybrieftaskscounter}
\newcounter{mycelllinescounter}
\newcounter{mybalancingmodescounter}
\def\savetask#1{%
\stepcounter{mytaskscounter}%
\expandafter\def\csname mytaskslist\themytaskscounter\endcsname{#1}}
\def\savebrieftask#1{%
\stepcounter{mybrieftaskscounter}%
\expandafter\def\csname mybrieftaskslist\themybrieftaskscounter\endcsname{#1}}
\def\savecellline#1{%
\stepcounter{mycelllinescounter}%
\expandafter\def\csname mycelllineslist\themycelllinescounter\endcsname{#1}}
\def\savebalancingmodes#1{%
\stepcounter{mybalancingmodescounter}%
\expandafter\def\csname mybalancingmodeslist\themybalancingmodescounter\endcsname{#1}}
\forcsvlist{\savetask}{%
Active enhancers vs active promoters,
Active promoters vs inactive promoters,
Active enhancers vs inactive enhancers,
Inactive enhancers vs inactive promoters,
Active enhancers and promoters vs anything else,
}%
\forcsvlist{\savebrieftask}{%
AE vs AP,
AP vs IP,
AE vs IE,
IE vs IP,
AE \& AP vs else,
}%
\forcsvlist{\savecellline}{%
GM12878,
HelaS3,
HepG2,
K562,
}%
\forcsvlist{\savebalancingmodes}{%
unbalanced,
balanced,
full balanced,
}%
\def\getnthtask#1{\csname mytaskslist#1\endcsname}
\def\getnthbrieftask#1{\csname mybrieftaskslist#1\endcsname}
\def\getnthcellline#1{\csname mycelllineslist#1\endcsname}
\def\getnthbalancingmode#1{\csname mybalancingmodeslist#1\endcsname}
\NewDocumentCommand{\decompositions}{mmm}{
%
% #1 -> cell line number
% #2 -> balancing mode number
% #3 -> task number
%
\def\cellline{\getnthcellline{#1}}
\def\task{\getnthtask{#2}}
\def\brieftask{\getnthbrieftask{#2}}
\def\balancingmode{\getnthbalancingmode{#3}}
\StrSubstitute{\task}{ }{_}[\pathtask]%
\StrSubstitute{\balancingmode}{ }{_}[\balancingmodepath]%
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{decompositions/\cellline/\cellline-\balancingmodepath-\pathtask.png}
\caption{Task \brieftask{}, cell line \cellline{} and \balancingmode{} mode - Two figures on the left: MCA decomposition for the sequence data (train and test sets); two figures on the right: \(t\)-SNE decomposition for the epigenomic data (train and test sets).}
\label{fig:decompositions-#1-#2-#3}
\end{figure}
}
\NewDocumentCommand{\tsne}{m}{
%
% #1 -> cell line number
%
\def\cellline{\getnthcellline{#1}}
\begin{figure}[H]
\centering
\includegraphics[width=0.9\textwidth]{decompositions/\cellline/big-tsne.png}
\caption{TSNE for \cellline{} epigenomic data}
\label{fig:big-tsne-#1}
\end{figure}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{decompositions/\cellline/tsne.png}
\caption{Per class TSNE for \cellline{} epigenomic data}
\label{fig:tsne-#1}
\end{figure}
}
\NewDocumentCommand{\mca}{m}{
%
% #1 -> cell line number
%
\def\cellline{\getnthcellline{#1}}
\begin{figure}[H]
\centering
\includegraphics[width=0.9\textwidth]{decompositions/\cellline/big-mca.png}
\caption{MCA for \cellline{} epigenomic data}
\label{fig:big-mca-#1}
\end{figure}
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{decompositions/\cellline/mca.png}
\caption{Per class MCA for \cellline{} sequence data}
\label{fig:mca-#1}
\end{figure}
}
\NewDocumentCommand{\history}{mmmm}{
%
% #1 -> cell line number
% #2 -> balancing mode number
% #3 -> task number
% #4 -> kind
%
\def\cellline{\getnthcellline{#1}}
\def\task{\getnthtask{#2}}
\def\brieftask{\getnthbrieftask{#2}}
\def\balancingmode{\getnthbalancingmode{#3}}
\StrSubstitute{\task}{ }{_}[\pathtask]%
\StrSubstitute{#4}{ }{_}[\kind]%
\StrSubstitute{\balancingmode}{ }{_}[\balancingmodepath]%
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{cnn/\kind/\cellline/\cellline-\balancingmodepath-\pathtask.png}
\caption{Average history of #4 for \brieftask, \cellline, \balancingmode}
\label{fig:\kind-#1-#2-#3}
\end{figure}
}
\NewDocumentCommand{\bestmodel}{mmm}{
%
% #1 -> cell line number
% #2 -> balancing mode number
% #3 -> task number
%
\history{#1}{#2}{#3}{best models}
}
\NewDocumentCommand{\gaussianprocess}{mmm}{
%
% #1 -> cell line number
% #2 -> balancing mode number
% #3 -> task number
%
\history{#1}{#2}{#3}{gaussian process}
}
\NewDocumentCommand{\wilcoxon}{mm}{
%
% #1 -> Table path
% #2 -> Caption
%
\begin{table}[H]
\centering
{\small \input{chapters/tables/wilcoxon/#1.tex}}
\caption{Wilcoxon signed rank test win-tie-loss at 0.01 significance level to compare #2.}
\label{tab:wilcoxon-#1}
\end{table}
}
\NewDocumentCommand{\pearson}{mm}{
%
% #1 -> Table path
% #2 -> Caption
%
\begin{table}[H]
\centering
\input{chapters/tables/pearson/pearson-#1.tex}
\caption{Pearson coefficient table for AUPRC, AUROC, total required time and dataset cardinality for #2 in the unbalanced mode.}
\label{tab:pearson-#1}
\end{table}
}
\NewDocumentCommand{\histogram}{mmm}{
%
% #1 -> Image path
% #2 -> Caption
% #3 -> label
%
\StrSubstitute{#1}{ }{_}[\path]%
\StrSubstitute{#2}{cnn}{CNN}[\cnncaption]%
\StrSubstitute{\cnncaption}{mlp}{MLP}[\mlpcaption]%
\begin{figure}[H]
\centering
\includegraphics[width=\textwidth]{histograms/\path.png}
\caption{\mlpcaption}
\label{fig:#3}
\end{figure}
\begin{table}[H]
\centering
{\small \input{chapters/tables/\path.tex}}
\caption{\mlpcaption}
\label{tab:#3}
\end{table}
}
\NewDocumentCommand{\comparisonhistogram}{mmmmG{}}{
%
% #1 -> Metric
% #2 -> Models
% #3 -> Caption
% #4 -> Label
% #5 -> Grouping, optional
%
\histogram{#1, comparison between #2 models#5}{#3}{#4}
}
\NewDocumentCommand{\groupedcomparisonhistogram}{mmmmm}{
%
% #1 -> Metric
% #2 -> Group
% #3 -> Models
% #4 -> Caption
% #5 -> Label
%
\comparisonhistogram{#1}{#3}{#4}{#5}{, grouped by #2}
}
\NewDocumentCommand{\modecomparisonhistogram}{mmmmm}{
%
% #1 -> Metric
% #2 -> Mode
% #3 -> Models
% #4 -> Caption
% #5 -> Label
%
\comparisonhistogram{#1 for \getnthbalancingmode{#2} mode}{#3}{#4}{#5}
}
\makeatletter
\patchcmd{\@makechapterhead}{\vspace*{50\p@}}{}{}{}
%\patchcmd{\@makeschapterhead}{\vspace*{100\p@}}{}{}{}
\makeatother
\newcommand{\funcdef}[3]{#1:#2\longrightarrow #3}
\newcommand{\R}{\mathbb{R}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\abs}[1]{\left\lvert#1\right\rvert}
\newcommand{\norm}[1]{\left\lVert#1\right\rVert}
\newcommand{\rnd}[1]{\left(#1\right)}
\newcommand{\sqr}[1]{\left[#1\right]}
\newcommand{\ssqr}[1]{\llbracket#1\rrbracket}
\newcommand{\crl}[1]{\left\{#1\right\}}