
Load Multiple Sequence Alignment with Coordinate Mapping
loadMSA.RdReads a multiple sequence alignment (MSA) file and computes a coordinate mapping from alignment positions to original sequence positions. This mapping is essential for projecting genomic features (e.g., splice junctions) between species through the alignment.
Value
A list with two components:
msaDNAMultipleAlignmentobject containing the (sub)set of aligned sequences.referenceNamed list of integer vectors (one per sequence). Each vector maps alignment column positions to original sequence coordinates. Gap positions are
NA.
Details
The reference mapping allows conversion between coordinate systems:
Alignment → Sequence:
reference[[geneID]][aln_pos]gives the original sequence position at alignment columnaln_pos, orNAif that position is a gap.Sequence → Alignment:
which(reference[[geneID]] == seq_pos)gives the alignment column for sequence positionseq_pos.
This is used internally by findOSJ to project splice
junction coordinates across species through the MSA.