Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
biopet.biopet
Commits
c56d1178
Commit
c56d1178
authored
Mar 08, 2015
by
bow
Browse files
Update report template
parent
8c734d16
Changes
4
Hide whitespace changes
Inline
Side-by-side
public/gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/scripts/pdf_report.py
View file @
c56d1178
...
...
@@ -422,9 +422,9 @@ class GentrapLib(object):
# insert size metrics files
self
.
inserts_metrics_files
=
summary
.
get
(
"bammetrics"
,
{}).
get
(
"files"
,
{}).
get
(
"insert_size_metrics"
,
{})
# rna metrics files and stats
self
.
rna_metrics_files
=
summary
.
get
(
"gentrap"
,
{}).
get
(
"files"
,
{}).
get
(
"rna_metrics"
,
{})
_rmetrics
=
summary
.
get
(
"gentrap"
,
{}).
get
(
"stats"
,
{}).
get
(
"rna_metrics"
,
{})
if
_rmetrics
:
self
.
rna_metrics_files
=
summary
.
get
(
"gentrap"
,
{}).
get
(
"files"
,
{}).
get
(
"rna_metrics"
,
{})
self
.
rna_metrics
=
{
k
:
v
for
k
,
v
in
_rmetrics
.
items
()
}
pf_bases
=
float
(
_rmetrics
[
"pf_bases"
])
exonic_bases
=
int
(
_rmetrics
.
get
(
"coding_bases"
,
0
))
+
int
(
_rmetrics
.
get
(
"utr_bases"
,
0
))
...
...
@@ -461,10 +461,15 @@ class GentrapSample(object):
self
.
libs
=
\
{
l
:
GentrapLib
(
self
.
run
,
self
,
l
,
summary
[
"libraries"
][
l
])
\
for
l
in
self
.
lib_names
}
self
.
is_paired_end
=
summary
.
get
(
"gentrap"
,
{}).
get
(
"stats"
,
{}).
get
(
"pipeline"
,
{})[
"all_paired"
]
# mapping metrics settings
self
.
aln_metrics
=
summary
.
get
(
"bammetrics"
,
{}).
get
(
"stats"
,
{}).
get
(
"alignment_metrics"
,
{})
# insert size metrics files
self
.
inserts_metrics_files
=
summary
.
get
(
"bammetrics"
,
{}).
get
(
"files"
,
{}).
get
(
"insert_size_metrics"
,
{})
# rna metrics files and stats
self
.
rna_metrics_files
=
summary
.
get
(
"gentrap"
,
{}).
get
(
"files"
,
{}).
get
(
"rna_metrics"
,
{})
_rmetrics
=
summary
.
get
(
"gentrap"
,
{}).
get
(
"stats"
,
{}).
get
(
"rna_metrics"
,
{})
if
_rmetrics
:
self
.
rna_metrics_files
=
summary
.
get
(
"gentrap"
,
{}).
get
(
"files"
,
{}).
get
(
"rna_metrics"
,
{})
self
.
rna_metrics
=
{
k
:
v
for
k
,
v
in
_rmetrics
.
items
()
}
pf_bases
=
float
(
_rmetrics
[
"pf_bases"
])
exonic_bases
=
int
(
_rmetrics
.
get
(
"coding_bases"
,
0
))
+
int
(
_rmetrics
.
get
(
"utr_bases"
,
0
))
...
...
public/gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/templates/pdf/lib_mapping.tex
View file @
c56d1178
...
...
@@ -77,7 +77,6 @@
=))
((* endif *))
((* if lib.sample.libs|length > 1 *))
\subsubsection
{
RNA-specific metrics
}
\IfFileExists
{
((( lib.rna
_
metrics
_
files.output
_
chart.path )))
}
...
...
@@ -111,5 +110,3 @@
\hline
\end{tabular}
\end{center}
((* endif *))
public/gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/templates/pdf/sample.tex
View file @
c56d1178
\part
{
Sample "((( sample.name )))" Results
}
\label
{
sample:(((sample.name)))
}
((* if sample.libs|length > 1 *))
((* include "sample
_
mapping.tex" *))
((* endif *))
((* for lib in sample.libs.values() *))
((* include "lib.tex" *))
...
...
public/gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/templates/pdf/sample_mapping.tex
View file @
c56d1178
...
...
@@ -5,6 +5,78 @@
\indent
% number + percentage of reads mapped to genome
% number + percentage of properly paired reads
\begin{center}
\captionof
{
table
}{
Mapping Overview
}
\label
{
tab:bamstat-((( sample.name )))
}
\setlength
{
\tabcolsep
}{
11pt
}
((* if sample.is
_
paired
_
end *))
\begin{tabular}
{
l r r r
}
\hline
\multirow
{
2
}{
*
}{
Parameter
}
&
\multicolumn
{
1
}{
c
}{
All Pairs
}
&
\multicolumn
{
1
}{
c
}{
First in Pairs
}
&
\multicolumn
{
1
}{
c
}{
Second in Pairs
}
\\
&
Value
&
Value
&
Value
\\
\hline
\hline
Total reads
&
((( sample.aln
_
metrics.PAIR.total
_
reads|nice
_
int )))
&
((( sample.aln
_
metrics.FIRST
_
OF
_
PAIR.total
_
reads|nice
_
int )))
&
((( sample.aln
_
metrics.SECOND
_
OF
_
PAIR.total
_
reads|nice
_
int )))
\\
Mean read length
&
((( sample.aln
_
metrics.PAIR.mean
_
read
_
length|nice
_
flt )))
&
((( sample.aln
_
metrics.FIRST
_
OF
_
PAIR.mean
_
read
_
length|nice
_
flt )))
&
((( sample.aln
_
metrics.SECOND
_
OF
_
PAIR.mean
_
read
_
length|nice
_
flt )))
\\
Strand balance
&
((( sample.aln
_
metrics.PAIR.strand
_
balance|nice
_
flt )))
&
((( sample.aln
_
metrics.FIRST
_
OF
_
PAIR.strand
_
balance|nice
_
flt )))
&
((( sample.aln
_
metrics.SECOND
_
OF
_
PAIR.strand
_
balance|nice
_
flt )))
\\
\%
Mapped to reference
&
((( sample.aln
_
metrics.PAIR.pct
_
pf
_
reads
_
aligned|float2nice
_
pct )))
\%
&
((( sample.aln
_
metrics.FIRST
_
OF
_
PAIR.pct
_
pf
_
reads
_
aligned|float2nice
_
pct )))
\%
&
((( sample.aln
_
metrics.SECOND
_
OF
_
PAIR.pct
_
pf
_
reads
_
aligned|float2nice
_
pct )))
\%
\\
\%
Mapped to reference (MAPQ >= 20)
&
((( sample.aln
_
metrics.PAIR.pct
_
pf
_
reads
_
aligned|float2nice
_
pct )))
\%
&
((( sample.aln
_
metrics.FIRST
_
OF
_
PAIR.pct
_
pf
_
reads
_
aligned|float2nice
_
pct )))
\%
&
((( sample.aln
_
metrics.SECOND
_
OF
_
PAIR.pct
_
pf
_
reads
_
aligned|float2nice
_
pct )))
\%
\\
Mismatch rate
&
((( sample.aln
_
metrics.PAIR.pf
_
mismatch
_
rate|float2nice
_
pct )))
\%
&
((( sample.aln
_
metrics.FIRST
_
OF
_
PAIR.pf
_
mismatch
_
rate|float2nice
_
pct )))
\%
&
((( sample.aln
_
metrics.SECOND
_
OF
_
PAIR.pf
_
mismatch
_
rate|float2nice
_
pct )))
\%
\\
Indel rate
&
((( sample.aln
_
metrics.PAIR.pf
_
indel
_
rate|float2nice
_
pct )))
\%
&
((( sample.aln
_
metrics.FIRST
_
OF
_
PAIR.pf
_
indel
_
rate|float2nice
_
pct )))
\%
&
((( sample.aln
_
metrics.SECOND
_
OF
_
PAIR.pf
_
indel
_
rate|float2nice
_
pct )))
\%
\\
Chimeras
&
((( sample.aln
_
metrics.PAIR.pct
_
chimeras|float2nice
_
pct )))
\%
&
((( sample.aln
_
metrics.FIRST
_
OF
_
PAIR.pct
_
chimeras|float2nice
_
pct )))
\%
&
((( sample.aln
_
metrics.SECOND
_
OF
_
PAIR.pct
_
chimeras|float2nice
_
pct )))
\%
\\
\hline
((* else *))
\begin{tabular}
{
l r
}
\hline
\multirow
{
1
}{
*
}{
Parameter
}
&
\multicolumn
{
1
}{
c
}{
Value
}
\\
\hline
\hline
Total reads
&
((( sample.aln
_
metrics.UNPAIRED.total
_
reads|nice
_
int )))
\\
Mean read length
&
((( sample.aln
_
metrics.UNPAIRED.mean
_
read
_
length|nice
_
flt )))
\\
Strand balance
&
((( sample.aln
_
metrics.UNPAIRED.strand
_
balance|nice
_
flt )))
\\
\%
Mapped to reference
&
((( sample.aln
_
metrics.UNPAIRED.pct
_
pf
_
reads
_
aligned|float2nice
_
pct )))
\%
\\
\%
Mapped to reference (MAPQ >= 20)
&
((( sample.aln
_
metrics.UNPAIRED.pct
_
pf
_
reads
_
aligned|float2nice
_
pct )))
\%
\\
Mismatch rate
&
((( sample.aln
_
metrics.UNPAIRED.pf
_
mismatch
_
rate|float2nice
_
pct )))
\%
\\
Indel rate
&
((( sample.aln
_
metrics.UNPAIRED.pf
_
indel
_
rate|float2nice
_
pct )))
\%
\\
\hline
((* endif *))
\end{tabular}
\end{center}
((* if sample.is
_
paired
_
end *))
% inferred insert size distribution
\subsubsection
{
Insert size distribution
}
\IfFileExists
{
((( sample.inserts
_
metrics
_
files.output
_
histogram.path )))
}
{
\begin{figure}
[h!]
\centering
\includegraphics
[width=0.7\textwidth]
{
((( sample.inserts
_
metrics
_
files.output
_
histogram.path )))
}
\caption
{
Distribution of insert size length of paired-end reads mapped to opposite strands.
}
\end{figure}
}
((= TODO: strand-specific stats
%{
% \IfFileExists{((( vars['OUT_DIR'] )))/((( vars['SAMPLE'] ))).f.insertsizes.png}
% {
% \begin{figure}[h!]
% \centering
% \includegraphics[width=0.7\textwidth]{((( vars['OUT_DIR'] )))/((( vars['SAMPLE'] ))).f.insertsizes.png}
% \caption{Distribution of insert size length of paired-end reads whose first read maps to the minus strand.}
% \end{figure}
% }{}
% \IfFileExists{((( vars['OUT_DIR'] )))/((( vars['SAMPLE'] ))).r.insertsizes.png}
% {
% \begin{figure}[h!]
% \centering
% \includegraphics[width=0.7\textwidth]{((( vars['OUT_DIR'] )))/((( vars['SAMPLE'] ))).r.insertsizes.png}
% \caption{Distribution of insert size length of paired-end reads whose first read maps to the plus strand.}
% \end{figure}
% }{}
%}
=))
((* endif *))
\subsection
{
RNA-specific metrics
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment