Map a residue to its alignment column and across sequences
map_positionsConvert a residue position to its alignment column and a column back to each sequence's residue, handling gaps and aligning unaligned FASTA with MAFFT first.
Instructions
Map a residue to its alignment column, and the column to every sequence.
Answers "which residue of B is in the same column as residue N of A" without
counting by hand. Positions count residues from 1, gaps not counted; columns
count from 1. At a gap, a row's position is null and between gives the
residues either side.
Args:
aligned: true if the input is an alignment; false if unaligned, and it
is aligned with MAFFT first, as align_sequences would.
sequence: The sequence whose residue position is meant.
position: A residue position in sequence. Give this or column.
column: An alignment column. Give this or position.
fasta: The sequences in FASTA.
fasta_path: Path of a FASTA file to read instead of fasta.
sequence_type: "dna" (default) or "protein".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fasta | No | ||
| column | No | ||
| aligned | Yes | ||
| position | No | ||
| sequence | No | ||
| fasta_path | No | ||
| sequence_type | No | dna |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | Yes | ||
| query | Yes | ||
| column | Yes | ||
| window | Yes | ||
| warnings | Yes | ||
| n_columns | Yes | ||
| aligned_by | Yes |