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
7b936070
Commit
7b936070
authored
Mar 09, 2015
by
bow
Browse files
Finish overview and multi sample section
parent
dd7f8389
Changes
2
Hide whitespace changes
Inline
Side-by-side
public/gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/scripts/pdf_report.py
View file @
7b936070
...
...
@@ -379,6 +379,7 @@ def write_template(run, template_file, logo_file):
env
.
filters
[
"nice_int"
]
=
nice_int
env
.
filters
[
"nice_flt"
]
=
nice_flt
env
.
filters
[
"float2nice_pct"
]
=
float2nice_pct
env
.
filters
[
"basename"
]
=
path
.
basename
# write tex template for pdflatex
jinja_template
=
env
.
get_template
(
path
.
basename
(
template_file
))
...
...
@@ -508,10 +509,19 @@ class GentrapRun(object):
self
.
samples
=
\
{
s
:
GentrapSample
(
self
,
s
,
summary
[
"samples"
][
s
])
\
for
s
in
self
.
sample_names
}
self
.
files
=
summary
[
"gentrap"
][
"files"
]
self
.
libs
=
[]
for
sample
in
self
.
samples
.
values
():
self
.
libs
.
extend
(
sample
.
libs
.
values
())
if
all
([
s
.
is_paired_end
for
s
in
self
.
samples
.
values
()]):
self
.
lib_type
=
"all paired end"
elif
all
([
not
s
.
is_paired_end
for
s
in
self
.
samples
.
values
()]):
self
.
lib_type
=
"all single end"
else
:
self
.
lib_type
=
"mixed (single end and paired end)"
self
.
files
=
summary
[
"gentrap"
].
get
(
"files"
,
{}).
get
(
"pipeline"
,
{})
self
.
settings
=
summary
[
"gentrap"
][
"settings"
]
self
.
version
=
self
.
settings
[
"version"
]
self
.
version
=
self
.
settings
.
get
(
"version"
,
"unknown"
)
# list containing all exes
self
.
all_executables
=
summary
[
"gentrap"
][
"executables"
]
# list containing exes we want to display
...
...
@@ -520,15 +530,23 @@ class GentrapRun(object):
(
"sickle"
,
"base quality trimming"
),
(
"fastqc"
,
"sequence metrics collection"
),
(
"gsnap"
,
"alignment"
),
(
"tophat"
,
"alignment"
),
(
"star"
,
"alignment"
),
(
"htseqcount"
,
"fragment counting"
),
]
self
.
executables
=
{
k
:
self
.
all_executables
[
k
]
for
k
,
_
in
executables
}
for
exe
,
desc
in
executables
:
self
.
executables
[
exe
][
"desc"
]
=
desc
self
.
executables
=
{}
for
k
,
desc
in
executables
:
in_summary
=
self
.
all_executables
.
get
(
k
)
if
in_summary
is
not
None
:
self
.
executables
[
k
]
=
in_summary
self
.
executables
[
k
][
"desc"
]
=
desc
# since we get the version from the tools we use
if
self
.
all_executables
.
get
(
"collectalignmentsummarymetrics"
)
is
not
None
:
self
.
executables
[
"picard"
]
=
self
.
all_executables
[
"collectalignmentsummarymetrics"
]
self
.
executables
[
"picard"
][
"desc"
]
=
"alignment_metrics_collection"
# None means we are using the Queue built in Picard
if
self
.
executables
[
"picard"
].
get
(
"version"
)
is
None
:
self
.
executables
[
"picard"
][
"version"
]
=
"built-in"
# since we get the version from the sub tools we use
if
self
.
all_executables
.
get
(
"samtoolsview"
)
is
not
None
:
self
.
executables
[
"samtools"
]
=
self
.
all_executables
[
"samtoolsview"
]
...
...
public/gentrap/src/main/resources/nl/lumc/sasc/biopet/pipelines/gentrap/templates/pdf/main.tex
View file @
7b936070
...
...
@@ -63,12 +63,14 @@
\part
{
Overview
}
\label
{
sec:
intro
}
\label
{
sec:
overview
}
This document outlines the results obtained from running Gentrap, a generic
pipeline for transcriptome analysis. The pipeline itself is composed of several
programs, listed in Table~
\ref
{
tab:programs
}
. Note that the list only contains
the programs used in this pipeline run.
the programs used in this pipeline run. General pipeline settings that applies
to all samples are shown in Table~
\ref
{
tab:runparams
}
, while general annotation
files are shown in Table~
\ref
{
tab:annotfiles
}
.
\begin{center}
\captionof
{
table
}{
Programs in Gentrap
}
...
...
@@ -93,9 +95,184 @@ the programs used in this pipeline run.
% HACK: to keep table counters in sync
\addtocounter
{
table
}{
-1
}
\begin{center}
\captionof
{
table
}{
General Run Parameters
}
\label
{
tab:runparams
}
\begin{longtable}
{
p
{
0.4
\textwidth
}
p
{
0.4
\textwidth
}
}
\hline
Parameter
&
Value
\\
\hline
\hline
\endhead
\hline
\multicolumn
{
2
}{
c
}{
\textit
{
Continued on next page
}}
\\
\hline
\endfoot
\hline
\endlastfoot
Number of samples
&
((( run.samples|length )))
\\
Number of libraries
&
((( run.libs|length )))
\\
Library types
&
((( run.lib
_
type )))
\\
Expression value measures
&
((( run.settings.expression
_
measures|join(", ") )))
\\
Strand protocol
&
((( run.settings.strand
_
protocol|lower )))
\\
Variant calling
&
((* if run.settings.variant
_
calling *))enabled((* else *))disabled((* endif *))
\\
Ribosomal reads removal
&
((* if run.settings.remove
_
ribosomal
_
reads *))enabled((* else *))disabled((* endif *))
\\
\end{longtable}
\end{center}
\addtocounter
{
table
}{
-1
}
\begin{center}
\captionof
{
table
}{
Annotation Files
}
\label
{
tab:annotfiles
}
\begin{longtable}
{
l l p
{
0.4
\textwidth
}
}
\hline
File
&
Checksum
&
Name
\\
\hline
\hline
\endhead
\hline
\multicolumn
{
3
}{
c
}{
\textit
{
Continued on next page
}}
\\
\hline
\endfoot
\hline
\endlastfoot
General refFlat file
&
((( run.files.annotation
_
refflat.md5|truncate(7, True, "") )))
&
((( run.files.annotation
_
refflat.path|basename )))
\\
((* if run.files.annotation
_
gtf *))
General GTF file
&
((( run.files.annotation
_
gtf.md5|truncate(7, True, "") )))
&
((( run.files.annotation
_
gtf.path|basename )))
\\
((* endif *))
((* if run.files.annotation
_
bed *))
General BED file
&
((( run.files.annotation
_
bed.md5|truncate(7, True, "") )))
&
((( run.files.annotation
_
bed.path|basename )))
\\
((* endif *))
((* if run.files.ribosome
_
refflat *))
Ribosome refFlat
&
((( run.files.ribosome
_
refflat.md5|truncate(7, True, "") )))
&
((( run.files.ribosome
_
refflat.path|basename )))
\\
((* endif *))
\end{longtable}
\end{center}
% HACK: to keep table counters in sync
\addtocounter
{
table
}{
-1
}
\clearpage
((* if run.samples|length > 2 and run.settings.expression
_
measures|length > 0 *))
\part
{
Multi Sample Results
}
\label
{
sec:msr
}
This section shows results that are computed from multiple samples.
\begin{center}
\captionof
{
table
}{
Multi Sample Result Files
}
\label
{
tab:annotfiles
}
\begin{longtable}
{
l l p
{
0.4
\textwidth
}
}
\hline
File
&
Checksum
&
Name
\\
\hline
\hline
\endhead
\hline
\multicolumn
{
3
}{
c
}{
\textit
{
Continued on next page
}}
\\
\hline
\endfoot
\hline
\endlastfoot
((* if run.files.gene
_
fragments
_
count *))
Fragments per gene
&
((( run.files.gene
_
fragments
_
count.md5|truncate(7, True, "") )))
&
((( run.files.gene
_
fragments
_
count.path|basename )))
\\
((* endif *))
((* if run.files.exon
_
fragments
_
count *))
Fragments per exon
&
((( run.files.exon
_
fragments
_
count.md5|truncate(7, True, "") )))
&
((( run.files.exon
_
fragments
_
count.path|basename )))
\\
((* endif *))
((* if run.files.gene
_
bases
_
count *))
Bases per gene
&
((( run.files.gene
_
bases
_
count.md5|truncate(7, True, "") )))
&
((( run.files.gene
_
bases
_
count.path|basename )))
\\
((* endif *))
((* if run.files.exon
_
bases
_
count *))
Bases per exon
&
((( run.files.exon
_
bases
_
count.md5|truncate(7, True, "") )))
&
((( run.files.exon
_
bases
_
count.path|basename )))
\\
((* endif *))
((* if run.files.gene
_
fpkm
_
cufflinks
_
strict *))
Cufflinks (strict, gene)
&
((( run.files.gene
_
fpkm
_
cufflinks
_
strict.md5|truncate(7, True, "") )))
&
((( run.files.gene
_
fpkm
_
cufflinks
_
strict.path|basename )))
\\
((* endif *))
((* if run.files.isoform
_
fpkm
_
cufflinks
_
strict *))
Cufflinks (strict, isoform)
&
((( run.files.isoform
_
fpkm
_
cufflinks
_
strict.md5|truncate(7, True, "") )))
&
((( run.files.isoform
_
fpkm
_
cufflinks
_
strict.path|basename )))
\\
((* endif *))
((* if run.files.gene
_
fpkm
_
cufflinks
_
guided *))
Cufflinks (guided, gene)
&
((( run.files.gene
_
fpkm
_
cufflinks
_
guided.md5|truncate(7, True, "") )))
&
((( run.files.gene
_
fpkm
_
cufflinks
_
guided.path|basename )))
\\
((* endif *))
((* if run.files.isoform
_
fpkm
_
cufflinks
_
guided *))
Cufflinks (guided, isoform)
&
((( run.files.isoform
_
fpkm
_
cufflinks
_
guided.md5|truncate(7, True, "") )))
&
((( run.files.isoform
_
fpkm
_
cufflinks
_
guided.path|basename )))
\\
((* endif *))
((* if run.files.gene
_
fpkm
_
cufflinks
_
blind *))
Cufflinks (blind, gene)
&
((( run.files.gene
_
fpkm
_
cufflinks
_
blind.md5|truncate(7, True, "") )))
&
((( run.files.gene
_
fpkm
_
cufflinks
_
blind.path|basename )))
\\
((* endif *))
((* if run.files.isoform
_
fpkm
_
cufflinks
_
blind *))
Cufflinks (blind, isoform)
&
((( run.files.isoform
_
fpkm
_
cufflinks
_
blind.md5|truncate(7, True, "") )))
&
((( run.files.isoform
_
fpkm
_
cufflinks
_
blind.path|basename )))
\\
((* endif *))
\end{longtable}
\end{center}
% HACK: to keep table counters in sync
\addtocounter
{
table
}{
-1
}
((* if run.files.gene
_
fragments
_
count *))
\begin{figure}
[h!]
\centering
\includegraphics
[width=0.65\textwidth]
{
((( run.files.gene
_
fragments
_
count
_
heatmap.path )))
}
\caption
{
Between-samples correlation of fragment count per gene.
}
\end{figure}
((* endif *))
((* if run.files.exon
_
fragments
_
count *))
\begin{figure}
[h!]
\centering
\includegraphics
[width=0.65\textwidth]
{
((( run.files.exon
_
fragments
_
count
_
heatmap.path )))
}
\caption
{
Between-samples correlation of fragment count per exon.
}
\end{figure}
((* endif *))
((* if run.files.gene
_
bases
_
count *))
\begin{figure}
[h!]
\centering
\includegraphics
[width=0.65\textwidth]
{
((( run.files.gene
_
bases
_
count
_
heatmap.path )))
}
\caption
{
Between-samples correlation of base count per gene.
}
\end{figure}
((* endif *))
((* if run.files.exon
_
bases
_
count *))
\begin{figure}
[h!]
\centering
\includegraphics
[width=0.65\textwidth]
{
((( run.files.exon
_
bases
_
count
_
heatmap.path )))
}
\caption
{
Between-samples correlation of base count per exon.
}
\end{figure}
((* endif *))
((* if run.files.gene
_
fpkm
_
cufflinks
_
strict
_
heatmap *))
\begin{figure}
[h!]
\centering
\includegraphics
[width=0.65\textwidth]
{
((( run.files.gene
_
fpkm
_
cufflinks
_
strict
_
heatmap.path )))
}
\caption
{
Between-samples correlation of the gene level FPKM (Cufflinks strict mode).
}
\end{figure}
((* endif *))
((* if run.files.gene
_
fpkm
_
cufflinks
_
guided
_
heatmap *))
\begin{figure}
[h!]
\centering
\includegraphics
[width=0.65\textwidth]
{
((( run.files.gene
_
fpkm
_
cufflinks
_
guided
_
heatmap.path )))
}
\caption
{
Between-samples correlation of the gene level FPKM (Cufflinks guided mode).
}
\end{figure}
((* endif *))
((* if run.files.gene
_
fpkm
_
cufflinks
_
blind
_
heatmap *))
\begin{figure}
[h!]
\centering
\includegraphics
[width=0.65\textwidth]
{
((( run.files.gene
_
fpkm
_
cufflinks
_
blind
_
heatmap.path )))
}
\caption
{
Between-samples correlation of the gene level FPKM (Cufflinks blind mode).
}
\end{figure}
((* endif *))
((* endif *))
\clearpage
((* for sample in run.samples.values() *))
((* for sample in run.samples.values()
|sort
*))
((* include "sample.tex" *))
\clearpage
((* endfor *))
...
...
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