Commit 7b936070 authored by bow's avatar bow
Browse files

Finish overview and multi sample section

parent dd7f8389
......@@ -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"]
......
......@@ -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 *))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment