sample_mapping.tex 7.57 KB
Newer Older
1
2
3
4
5
6
7
\section{Mapping}
\label{sec:map-((( sample.name )))}

\subsection{Mapping statistics}

\indent

bow's avatar
bow committed
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
% 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}

50
\IfFileExists{((( sample.inserts_metrics_files.insert_size_histogram.path )))}
bow's avatar
bow committed
51
52
53
{
    \begin{figure}[h!]
        \centering
54
        \includegraphics[width=0.7\textwidth]{((( sample.inserts_metrics_files.insert_size_histogram.path )))}
bow's avatar
bow committed
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
        \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 *))

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

\subsection{RNA-specific metrics}

\IfFileExists{((( sample.rna_metrics_files.output_chart.path )))}
{
    \begin{figure}[h!]
        \centering
        \includegraphics[width=0.7\textwidth]{((( sample.rna_metrics_files.output_chart.path )))}
        \caption{Normalized coverage bias plot.}
    \end{figure}
}

\begin{center}
    \captionof{table}{Functional annotation metrics}
    \label{tab:fannot-((( sample.name )))}
    \setlength{\tabcolsep}{11pt}
    \begin{tabular}{ l r r r }
        \hline
        \multirow{2}{*}{Parameter} & \multicolumn{3}{c}{Value} \\
                                   & Count & \% of all & \% of aligned \\
        \hline \hline
        Total bases & ((( sample.rna_metrics.pf_bases|nice_int ))) & 100\% & - \\
        Aligned bases & ((( sample.rna_metrics.pf_aligned_bases|nice_int ))) & ((( sample.rna_metrics.pct_aligned_bases_all|float2nice_pct )))\% & ((( sample.rna_metrics.pct_aligned_bases|float2nice_pct )))\% \\
        Exonic bases & ((( sample.rna_metrics.exonic_bases|nice_int ))) & ((( sample.rna_metrics.pct_exonic_bases_all|float2nice_pct )))\% & ((( sample.rna_metrics.pct_exonic_bases|float2nice_pct )))\% \\
            \hspace*{4mm}Coding bases & ((( sample.rna_metrics.coding_bases|nice_int ))) & ((( sample.rna_metrics.pct_coding_bases_all|float2nice_pct )))\% & ((( sample.rna_metrics.pct_coding_bases|float2nice_pct )))\% \\
            \hspace*{4mm}UTR bases & ((( sample.rna_metrics.utr_bases|nice_int ))) & ((( sample.rna_metrics.pct_utr_bases_all|float2nice_pct )))\% & ((( sample.rna_metrics.pct_utr_bases|float2nice_pct )))\% \\
        Intronic bases & ((( sample.rna_metrics.intronic_bases|nice_int ))) & ((( sample.rna_metrics.pct_intronic_bases_all|float2nice_pct )))\% & ((( sample.rna_metrics.pct_intronic_bases|float2nice_pct )))\% \\
        Intergenic bases & ((( sample.rna_metrics.intergenic_bases|nice_int ))) & ((( sample.rna_metrics.pct_intergenic_bases_all|float2nice_pct )))\% & ((( sample.rna_metrics.pct_intergenic_bases|float2nice_pct )))\% \\
        ((* if sample.rna_metrics.ribosomal_bases != "" *))
        Ribosomal bases & ((( sample.rna_metrics.ribosomal_bases|nice_int ))) & ((( sample.rna_metrics.pct_ribosomal_bases_all|float2nice_pct )))\% & ((( sample.rna_metrics.pct_ribosomal_bases|float2nice_pct )))\% \\
        ((* endif *))
        \hline
bow's avatar
bow committed
112
113
114
115
116
117
118
119
120
        Median 5' bias & ((( sample.rna_metrics.median_5prime_bias ))) & - & - \\
        Median 3' bias & ((( sample.rna_metrics.median_3prime_bias ))) & - & - \\
        Median 5' to 3' bias & ((( sample.rna_metrics.median_5prime_to_3prime_bias ))) & - & - \\
        \hline
        ((* if sample.run.settings.strand_protocol != "non_specific" *))
        Correct strand reads & ((( sample.rna_metrics.correct_strand_reads|nice_int ))) & - & - \\
        Incorrect strand reads & ((( sample.rna_metrics.incorrect_strand_reads|nice_int ))) & - & - \\
        ((* endif *))
        \hline
121
122
    \end{tabular}
\end{center}