Extract Consensus Sequence
Extract Consensus Sequence takes as input stand-alone read mappings (
) (
), BLAST results containing nucleotides (
) (
), or alignments (
) and outputs consensus sequences.
Consensus sequences can also be extracted directly from elements opened in the View Areau:
- For stand-alone read mappings (
): right-click the reference sequence, a selection within the reference sequence, or the consensus sequence, and select Extract New Consensus Sequence (
).
- For stand-alone read mapping lists (
): select a mapping in the table and click Extract Consensus (
).
- For BLAST results containing nucleotides (
): right-click a selection within the query sequence and select Extract New Consensus Sequence (
).
- For alignments (
): right-click the consensus sequence and select Open Consensus in New View.
To run the tool, go to:
Tools | Sanger Sequencing Analysis (
)| Extract Consensus Sequence (
)
The following options can be configured (figure 22.24):
Figure 22.24: The available options in Extract Consensus Sequence.
Handling of regions with low coverage can be configured under Low coverage options:
- Low coverage threshold Positions with coverage at or below this threshold are considered to have low coverage. Higher values increase confidence in the consensus but may reduce completeness.
Gaps generally contribute to the coverage. However, for alignments, gaps at the end of sequences are not considered when calculating the coverage. Overlapping paired-end reads count as two.
- Remove regions of low coverage Low coverage regions are removed from the consensus sequence. Afterwards:
- Join regions High coverage regions are joined into a single consensus sequence.
- Split regions Each high coverage region results in a separate consensus sequence.
- Insert 'N' in regions of low coverage Low coverage regions are filled with the 'N' ambiguity code in the consensus sequence.
- Fill from reference in regions of low coverage Low coverage regions are filled with the bases from the reference in the consensus sequence.
Handling of positions where multiple symbols are observed in the input sequences can be configured under Conflict options:
- Vote The consensus is set to the most supported symbol. Ambiguous symbols are excluded, but gaps are included. See Use quality scores for how the support is calculated.
In case of a tie, bases are selected in the order A > C > G > T.
- Insert ambiguity codes The consensus is set to the IUPAC ambiguity code that best reflects the variation observed in the sequences.
The following options determine which bases contribute to the ambiguity codes:
- Noise threshold Bases with support below this threshold are treated as noise and do not contribute to the ambiguity code. See Use quality scores for how the support is calculated.
- Minimum count Minimum number of supporting sequences required for a base to contribute to an ambiguity code.
Positions where no base meets the requirements for contributing to an ambiguity code are removed from the consensus sequence.
- Noise threshold Bases with support below this threshold are treated as noise and do not contribute to the ambiguity code. See Use quality scores for how the support is calculated.
- Use quality scores When checked, the support of a base is calculated as the sum of the quality scores at that position from sequences containing the base. Otherwise, the support of a base is calculated as the number of sequences containing the base.
Handling of annotations on the consensus sequences can be configured under Consensus annotation options:
- Annotate the consensus When checked, annotations of the following types are added to the consensus sequence:
- Ambiguous base: positions where the consensus contains an ambiguity code.
- Conflict: positions where multiple symbols were observed in the input sequences.
- Deletion: positions where the consensus contains a deletion relative to the reference.
- Removed: positions that are excluded from the consensus sequence.
- Removed by filter: positions where no base met the requirements for contributing to an ambiguity code.
- Removed by coverage: positions in regions of low coverage. Only relevant when using Remove regions of low coverage.
- Insertion: positions where the consensus contains an insertion relative to the reference.
- Substitution: positions where the consensus contains a different base than the reference.
- Low coverage: positions in regions of low coverage. Only relevant when not using Remove regions of low coverage.
For inputs containing many sequences or long references, many such annotations may be generated.
- Keep existing consensus annotations and Transfer reference annotations When checked, annotations present on the consensus or on the reference in the input stand-alone read mapping are copied to the extracted consensus sequence. The copied annotations are placed on the corresponding regions of the extracted consensus sequence, although their positions may differ from those in the input. Annotations may be split if Split regions is selected.
These options are only enabled for stand-alone read mappings (
) (
).
Extract Consensus Sequence report
The tool optionally produces a report summarizing consensus statistics. The content of the report depends on the type of the input.
For stand-alone read mappings (
) (
), or BLAST results containing nucleotides (
) (
), the statistics are reported as columns, with one row per reference. If the input contains multiple references, for example a read mapping list (
) or a Multi BLAST result (
), an additional total row is included. The report contains the following sections:
- Coverage summary
- Reference length The length of the reference.
- Consensus length The total length of the consensus. This represents the length of the produced sequence, and therefore includes the regions of low coverage if not using Remove regions of low coverage.
- Alignment length The total alignment length. An alignment position is one where at least one of the reference or consensus sequences contains a residue. The alignment length is larger than the reference length when the consensus contains insertions, and larger than the consensus length when the consensus contains deletions.
- Covered length The number of alignment positions that are covered, according to Low coverage threshold.
- Covered (%) The percentage of the alignment that is covered, according to Low coverage threshold.
- Identity summary
- Substitutions The number of alignment positions where the consensus contains a different residue than the reference.
- Insertions The number of alignment positions where the consensus contains an insertion.
- Deletions The number of alignment positions where the consensus contains a deletion.
- Differences The total number of alignment positions where the consensus differs from the reference.
- Identity (%) The percentage identity between the consensus and the reference. This is calculated as the number of covered alignment positions where the consensus and reference are identical, divided by the total number of covered alignment positions.
For alignments (
), each statistic is reported as a separate row. The report contains the following sections:
- Coverage summary
- Consensus length The total length of the consensus. This represents the length of the produced sequence, and therefore can include the regions of low coverage if not using Remove regions of low coverage.
- Alignment length The total alignment length.
- Covered length The number of alignment positions that are covered, according to Low coverage threshold.
- Covered (%) The percentage of the alignment that is covered, according to Low coverage threshold.
- Identity summary
- Differences The number of alignment positions where multiple symbols are observed in the input sequences, i.e. there is a conflict.
- Identity (%) The percentage identity of all sequences in the alignment. This is calculated only for covered alignment positions, according to Low coverage threshold, and is the number of positions where the residues in the input sequences are identical, divided by the total number of positions.
Quality scores
If the sequences in the input do not contain quality scores, default quality scores are used as follows:
- 0 for the 'N' ambiguity code.
- 15 for the remaining ambiguity codes.
- 30 for a non-ambiguous base.
Quality scores, as found in the input or default values, are propagated to the extracted consensus as follows.
Consider a consensus symbol
, and let
and
be the following quality score sums at its position:
: The sum of quality scores from all sequences.
: The sum of quality scores from sequences supporting the symbol
, defined as:
- Sequences containing the symbol
, if Vote is selected.
- Sequences containing symbols that contribute to the ambiguity code, if Insert ambiguity codes is selected.
- Sequences containing the symbol
The consensus symbol
is assigned a quality score
, bounded to a minimum of 0 and a maximum of 64.
