CodonCode Corporation
Better Software for DNA Sequencing

How to Detect Point Mutations in NGS Sequences with CodonCode Aligner

This guide walks you through the process of analyzing NGS sequences to identify point mutations using CodonCode Aligner. Topics covered on this page include setup requirements, running the analysis, interpreting results, and working with reference sequences.

Prerequisites

To detect point mutations with CodonCode Aligner, you’ll need a project with aligned sequences. You can either import externally created alignments, for example SAM files, or create contigs in CodonCode Aligner by aligning samples to a reference sequence, or by assembling sequences if no reference sequence is used.

To generate the contig in CodonCode Aligner:

Running Mutation Detection

Once you have contigs of your aligned sequences, you can run mutation detection to identify potential point mutations across the sequences. CodonCode Aligner will scan the aligned samples at each base in the contig and generate a summary table of the results.

  1. In the project view, select the contig or contigs you want to analyze.
  2. From the Contig menu, choose Find Mutations.

The analysis typically takes just a few seconds for small to medium-sized projects. A progress dialog will appear and can be canceled if needed.

When finished, Aligner will open a new window showing a table that lists each position where mutations were found. For each sample, the table indicates whether the base is homozygous or heterozygous, and what the effect of the mutation is.

Mutation detection results table showing heterozygous and homozygous calls for each sample.

The buttons in the side bar on the left let you control which columns and which tag types are shown in the table. For NGS SNP detection, the most important tags are the "polymorphism" tags that Aligner adds to the consensus sequences.

For contigs that have coding sequence annotation, for example from a designated reference sequence, the predicted amino acid change will be based on the coding sequence annotation of the reference. If no reference or no coding sequence annotation is present, the prediction will be based on translation starting at the first base in the contig.

Reviewing Results

In the example above, six SNPs were found: 5 in coding regions, of which 2 are silent mutations and 3 cause an amino acid change; and one outside of coding regions. Let's have a closer look at some of the columns.

The last two columns in the table show the coverage depth at each position, and the frequency of the variant allele. In the example, coverage ranges from 25-fold to 42-fold, and variant allele frequencies range from 41% to 66%. This indicates that these positions were heterozygous in the sequenced genome; homozygous variants would show frequency values closer to 100%.
Note that finding homozygous variants requires (1) that contigs have a reference sequence, and (2) that the reference is used as the consensus, which can be set in the "Consensus" preferences.

The Probability column gives an estimate of the probability that the observed variant is due to random sequencing errors. It is based on the summed quality scores for the observed variant bases, adjusted for total coverage at the position. If you prefer to instead (or also) the the corresponding log-scaled quality values, you can use the columns button in the side toolbar to display the quality columns.

To review a specific mutation in detail, double-click any row in the table. This opens the selected position in the contig viewn (based on your double-click preferences).

In this example, we see a roughly even number of C and T reads, as we would expect for a heterozygous SNP. The assembly around the SNP is clean, without many random errors or gaps, and the depth of coverage is normal. All this indicates that this is a real SNP in the BRCA1 coding sequence.

If the visual inspection instead shows many gaps or errors, unusual coverage, or similar problems, this can indicate problematic regions in the alignment. Often, additional pre-processing like error correction or re-alignment of the initial contigs can help to get better and more reliable results.

Contig of NGS alignment showing a heterozygous SNP.

You can exclude problem regions from mutation analysis by adding a "dontGenotype" tag to the consensus sequence or the reference sequence at this region. To do so, select the bases in the consensus or reference sequence, go to the "Sample" menu, and choose "Add Don't Genotype" from the "Tag" submenu. Alternatively, you can also customize the toolbar and add a button for this function, or use the keyboard shortcut.

To track manual verification of SNPs, you can mark tags as "Confirmed" by selecting the base in question, and:

However, such manual verification is more typically done in Sanger re-sequencing projects than in NGS projects, where data about SNP probability, coverage, and SNP frequency can be used.

How Aligner Analyses NGS Data For Mutations

The "Find Mutations" function in CodonCode Aligner starts by analysing the selected contig(s) to determine if the contig is from Sanger sequencing or NGS sequencing. To analyze a contig using NGS analysis, none of the sequences in the contig can have chromatograms, and the contigs cannot be "contigs of contigs" (contigs aligned directly, for example by using the "Compare Contigs" tool).

At each position in the contig, Aligner then compares the bases in each read to the reference sequence (or, for contigs without a reference sequence, the consensus sequence). Any unaligned regions at the start or end of sequences are ignored. For each base that differs from the reference base, the probability that the observed difference is due to random error is then estimated as follows:

  1. The Phred quality scores for all reads that have a given base change are added.
  2. Given the total coverage (n) at this position and the observed number (s) of base changes (for the given base), the number of possible combinations that would result in the s changes is calculated (the binomial n over s).
  3. The probability corresponding to the raw quality sum from step 1 is multiplied with the binomial from step 2 to give the final probability estimate. It can be shown directly as a probability, or converted to Phred quality values (-10 log10 scaled).
  4. If the quality value from step 3 is below the threshold set in the mutation detection preferences (default: 50), the change is ignored; if the quality value is at least the threshold value, then the SNP is recorded.

To give a simple example, let's assume we have a position where 3 out of 10 reads have an A, while the other reads and the reference have a T. If the 3 reads all have a quality score of 20, the total quality of the mutated bases is 60. This raw sum would push the position over our threshold of 50, but we must consider the coverage, too: the higher the coverage, the more likely it is that we'd see the base change from random errors. For 10-fold coverage, there are 120 possible combinations of 3 reads. Combining the two numbers drops the quality score down to 39.2, below our threshold. But if the quality scores for the three mutated reads were higher, say 25 instead of 20, that would increase the final quality to 54, above our threshold.

Limitations

NGS mutation detection in CodonCode Aligner is only intended for smaller projects, for example single gene or single exon studies. It it not suited for larger projects, like whole chromosome or genome studies.

The accuracy of SNP detection is highly dependent on the quality of the input data, and can give both false positive and false negative results. For best results, pre-processing of data with tools for error correction, gap re-alignment, and so on is recommended.

Mutation finding is optimized for detecting homo- and heterozygous SNPs in resequencing projects using genomic DNA. It is likely to miss low frequency variants (SNPs present only in a small subset of reads), for example when sequencing mixed samples or low copy transcript variations.

When importing alignments from SAM files, either the SAM files should contain the sequence of the reference sequence, or a sequence with the exact name of the reference file as listed in the SAM file must already be present in the project. Having the sequence present in the project has the advantage that it can contain coding sequence annotation which can be used to predict amino acid changes from SNPs.

For multi-base and complex mutations, CodonCode Aligner may not combine the mutations into a single mutation, but instead list the mutations as separate single-base mutations, or combine the mutations incorrectly,

The "Find Mutations" tool in CodonCode Aligner is for research use only. Results should always be reviewed by a qualified scientist.

Adding codingSequence and codonStart Tags

If your reference sequence is not annotated, you can manually add tags in the contig or base view:

Mutation detection will use these tags the next time you run "Find Mutations" on the contig.

When correctly aligned and annotated, mutation tags will include codon-level effects where applicable.

📚 Learning Center: Using CodonCode Aligner

Mutation Detection:
🏔️ Overview: Mutation Detection in CodonCode Aligner
🛠️ How-To: Detect Mutations in Sanger Sequencing with CodonCode Aligner
🎬 Video Tutorial: Mutation Detection in CodonCode Aligner
⚙️ Fine-Tuning: Mutation Detection Settings - Sanger Sequencing
🔬 In Depth: Mutation Detection Algorithms - Sanger Sequencing
Heterozygous Indels:
🏔️ Overview: Heterozygous Indel Analysis
🛠️ How-To: Analyze Heterozygous Indels