File: report.tex

package info (click to toggle)
qcumber 2.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 2,276 kB
  • sloc: python: 3,097; sh: 153; makefile: 18
file content (160 lines) | stat: -rwxr-xr-x 5,376 bytes parent folder | download
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
\documentclass[a4paper]{article}
\usepackage[document]{ragged2e}
\usepackage{python}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{xcolor}
\usepackage[T1]{fontenc}
\renewcommand*\familydefault{\ttdefault} %% Only if the base font of the document is to be typewriter style
\usepackage{subfigure}
\usepackage{geometry}
\usepackage{tcolorbox}
\usepackage{adjustbox}
\usepackage{setspace}
\usepackage{float}
\usepackage{url}
\usepackage{grffile}
\usepackage{fancyvrb}
\usepackage{spverbatim}


\geometry{a4paper,left=25mm,right=20mm,
top=12mm,
bottom=20mm}

\setlength\parindent{0pt}

\tolerance=1
\emergencystretch=\maxdimen
\hyphenpenalty=1000
\hbadness=1000

%\definecolor{green}{RGB}{0,158,115}
%\definecolor{red}{RGB}{213,94,0}
%\definecolor{orange}{RGB}{230,159,0}

\begin{document}

{\bf {\LARGE{QCumber} Version {{~ general_information["QCumber"] ~}}   } }\\
\line(1,0){\textwidth}

\begin{tabular}{p{0.25\textwidth} p{0.75\textwidth}}

Executor: & {{~ general_information["User"] ~}} \\
Dataset: & {\bfseries{\verb|{{~ sample["Name"] ~}}|} }\\
Path: &  \path{{{~ sample["path"] ~}}}  \\
Date: &  {{~ sample["Date"] ~}}\\
& \\
Operating System & \\
{% for key, value in general_information["Operating system"].items() %}
    \verb|{{~ key ~}}| & \verb|{{~ value ~}}| \\
{% endfor %}
& \\
Tool versions & \\
{% for key, value in general_information["Tool versions"].items() %}
    \verb|{{~ key ~}}| & {{~ value | safe ~}}\\
{% endfor %}
\end{tabular}\\

%--------------------------------------------- Workflow ---------------------------------------------------------------%
\line(1,0){\textwidth} \\
Processed reads: \\
{% for read in sample["Files"] %}
    \verb|{{~ read ~}}| \\
{% endfor %}

%------------------------------------------------ Summary -------------------------------------------------------------%
\begin{tcolorbox}
{\large{Summary} } \\

\begin{tabular}{lrr}
& Raw reads & {%- if "%Remaining Reads" in sample.keys() -%} Trimmed reads {%  endif %} \\
Number of reads &  {{~ sample["Total sequences"] ~}} &  {%- if "%Remaining Reads" in sample.keys() -%}  {{~ sample["#Remaining Reads"] ~}} ({{~ sample["%Remaining Reads"] ~}}\%) {%  endif %} \\
{%- if sample["%Adapter content"] != None -%}  Adapter content  & {{~ sample["%Adapter content"] ~}}\%  & {%- if sample["%Adapter content (trimmed)"] -%} {{~ sample["%Adapter content (trimmed)"] ~}}\% {% endif %} \\ {% endif %}
{% if sample["%Overrepr sequences"] != None %} Overrepresented sequences & {{~ sample["%Overrepr sequences"] ~}}\% &  {%- if sample["%Overrepr sequences (trimmed)"] -%} {{~ sample["%Overrepr sequences (trimmed)"] ~}}\%{% endif %} \\ {%  endif %}

\end{tabular}
\vspace{5mm}

{% if "%AlignedReads" in sample.keys() %}{{~ sample["#AlignedReads"] ~}} ({{~ sample["%AlignedReads"] ~}}\%) of reads
    aligned to \path{ {{~ sample["Reference"] ~}} }\\ {% endif %}
{% if  "%Classified" in sample.keys() %}{{~ sample[ "#Classified"] ~}} sequences classified ({{~ sample[ "%Classified"] ~}}\%) {% endif %}

\end{tcolorbox}


\line(1,0){\textwidth}  \\
\vspace{5mm}

%------------------------------------------------- FASTQC Results -----------------------------------------------------%

{\Large{FastQC (Pre | Post Trimming) } } \\
\vspace{5mm}


{%for name, value in sample["raw_fastqc_results"].items() %}

Readname: \verb|{{~ name ~}}|

{%  if "Trim parameter" in sample.keys() %}
Trim parameter: \\
{%  for trimname, trimvalue in sample["Trim parameter"].items()  %}
    {%-  if name.startswith(trimname) -%}
    \begin{spverbatim}{{~ trimvalue ~}}\end{spverbatim}\\
    {% endif %}
{%  endfor %}
{% endif %}
{% for key in value["img"].keys() %}

   \begin{figure}[H]
        \centering
        \begin{adjustbox}{minipage=0.4\textwidth-2\fboxrule, cframe = {{~ value["img"][key]["color"] ~}} 2}%
        \begin{subfigure}%
           {\includegraphics[width=\textwidth]{{{~ value["img"][key]["path"] ~}}}}
        \end{subfigure}
        \end{adjustbox}\qquad
        {% if "trimmed_fastqc_results" in sample.keys()  %}
            {%  if  name in sample["trimmed_fastqc_results"].keys()  %}
            \begin{adjustbox}{minipage=0.4\textwidth-2\fboxrule, cframe = {{~ sample["trimmed_fastqc_results"][name]["img"][key]["color"] ~}} 2}%
            \begin{subfigure}%
           {\includegraphics[width=\textwidth]{{{~ sample["trimmed_fastqc_results"][name]["img"][key]["path"] ~}}}}

        \end{subfigure}
        \end{adjustbox}
        \caption{ {{~ key ~}}}
                  {% endif %}
        {% endif %}
    \end{figure}
{% endfor %}


{% endfor %}\\
%--------------------------------------------------- Bowtie Results ---------------------------------------------------%

{% if "%AlignedReads" in sample.keys() %}
\line(1,0){\textwidth}
\vspace{5mm}
{\Large{Bowtie2} } - Map against \path{{{~ sample["Reference"] ~}} } \\
\begin{verbatim}
{{~ sample["Bowtie2_log"] ~}}
\end{verbatim}

{% endif %}

%------------------------------------------------ Kraken Results ------------------------------------------------------%

{% if "%Classified" in sample.keys() %}
    \line(1,0){\textwidth}
    \vspace{5mm}

    {\Large{Kraken} } \\
\begin{verbatim}
{{~ sample["kraken_log"] ~}}
\end{verbatim}

    {\includegraphics[width=\textwidth]{{{~ sample["kraken_img"] ~}}}}

    {{~ sample["kraken_results"] ~}}
{% endif %}
\end{document}