Map Reads to Contigs

The Map Reads to Contigs tool allows mapping of reads to contigs. This can be relevant in situations where the reference of a mapping is contigs, such as when:

The Map Reads to Contigs tool is similar to the Map Reads to Reference tool in that both tools accept the same input reads, and make use of the same read mapper in accordance to the reads input (see the introduction of Map Reads to Reference).

The main difference between the two tools is the output. The output from the Map reads to contigs tool is a de novo object that can be edited, in contrast to the reference sequence used when mapping reads to a reference.

To run the Map Reads to Contigs tool:

        Tools | De Novo Sequencing (Image de_novo_sequencing) | Map Reads to Contigs (Image read_mapping_16_n_p)

This opens up the dialog in figure 36.24 where you select the reads you want to map to the contigs. Click Next.

Image mapreads_to_contigs_step2
Figure 36.24: Select reads. The contigs will be selected in the next step.

In the Contis dialog, select the contigs to map the reads against (figure 36.25).

Image mapreads_to_contigs_step3
Figure 36.25: Select contigs and specify whether to use masking and the "Update contigs" function.

The next part of the dialog lets you mask the reference. Masking means that selected regions of the reference are ignored during read mapping. Reads will not be mapped to these regions, but the full reference is still included in the output.

Masking can be useful when reads are expected to originate only from specific regions, for example when working with targeted sequencing data. However, masking should be used with care. If reads originate outside the selected regions, they may be mapped to less suitable locations, which can affect downstream analyses such as variant detection.

Masking large numbers of regions, such as repetitive sequences, is generally not recommended. Repeats are handled automatically during mapping, and masking them may reduce performance and lead to incorrect read placement.

To mask a reference using regions defined in a masking track, choose:

Then click the Browse (Image browse) button to select a track for masking.

If your regions are stored as sequence annotations, they can be converted to a track.

The contigs can be updated by selecting "Update contigs". The advantage of using this option during read mapping is that the read mapper is better than the de novo assembler at handling errors in reads. Specifically, the actions taken when contigs are updated are:

Image update_contig
Figure 36.26: When selecting "Update Contig" in the wizard, contigs will be updated according to the reads. This means that regions of a contig where no reads map will be removed.

In the Mapping options dialog, the parameters of the Map Reads to Contigs tool are identical to the ones described for the Map Reads to Reference tool (see Mapping parameters).

The output from the Map Reads to Contigs tool can be a track or stand-alone read mappings. If the option to update contigs has been enabled, the track-based output cannot be selected.

When stand-alone read mappings have been selected as output, it is possible to edit and delete contig sequences.

Figure 36.27 shows two stand-alone read mappings generated by using Map Reads to Reference (top) and Map Reads to Contigs (bottom) on the exact same reads and contigs as input. Contig 1 from both analyses have been opened from their respective Contig Tables. The differences are highlighted with red arrows. The output from the Map Reads to Reference has a consensus sequence; in the output from Map Reads to Contigs, the Contig itself is the consensus sequence if "Update contigs" was selected.

Image mapreads_to_contigs_output
Figure 36.27: Two different read mappings performed with Map Reads to Reference (top) and Map Reads to Contigs (bottom). The differences are highlighted with red arrows.