ChimeraX docs icon

Command: sequence

The sequence command can:

Except for showing a sequence, these actions can also be accessed from the Sequence Viewer context menu.

Show Sequence from Structure

Usage: sequence  chain  chain-spec

The command sequence chain shows the sequence of the specified biopolymer chain in the Sequence Viewer. Only one structure chain should be specified per command. See also: Molecule Display icon

Independent of structure, sequence alignments and individual sequences can also be opened from files or fetched from UniProt. Other tools or commands may generate new sequence alignments (e.g., Blast Protein results, Matchmaker, sequence realignment).

Sequence-Structure Association

Usage: sequence  associate  chain-spec alignment-ID:sequence-ID ]
Usage: sequencedissociate | disassociate )  chain-spec  alignment-ID

Sequence-structure association (such as for synchronized selection) occurs automatically, but the commands sequence associate and sequence dissociate (same as sequence disassociate) allow more precise control, for example, of which structure chains are used for header calculations, or forcing or removing associations regardless of whether the number of mismatches would be tolerated by the automatic procedure.

The command sequence associate associates one or more structure chains with a sequence. The target sequence for association is specified by alignment ID, as reported in the title bar of the Sequence Viewer window, and the name or index number of the target sequence in the alignment, in the form:  alignment-ID:sequence-ID  (details...).

Alternatively, the sequence-ID can be omitted to associate each specified structure chain with the the best-matching sequence in the alignment. The alignment-ID can be omitted if only one alignment is open, or if the sequence-ID is also omitted; in the latter case, each specified structure chain will be associated with the best-matching sequence in each open alignment. If either or both are omitted, the colon (:) should also be omitted except in rare cases to disambiguate an alignment and sequence that have the same name.

For sequence dissociate, only the alignment needs to be specified, not an individual sequence, because a structure chain can only be associated with one sequence per alignment.

Sequence Header Controls

Usage: sequence  headeralignment-ID ]  header-nameshow | hide | save  filename )

The command sequence header shows, hides, or saves a sequence header to a file. (It can also be used to change the sequence Headers preferences, but command details are omitted here because normally the Settings dialog will be used instead.)

The header-name can be consensus, conservation, or rmsd, although there will only be an effect when that header is available (for example, an RMSD header is only available for alignments associated with at least two structures). Headers are saved to a simple text format that lists the alignment positions and values. The filename can be given as a pathname or the word browse to bring up a file browser window for choosing the name and location interactively. If multiple alignments are open but an alignment-ID is not specified, showing/hiding affects all applicable alignments. However, saving only works for a single header at a time, so an alignment-ID must be given when more than one alignment is open.

Calculate Percent Identities

Usage: sequence  identity  alignment-ID  [ denominator  shorter | longer | nongap ]
Usage: sequence  identity  alignment-ID   alignment-ID:sequence-ID denominator  shorter | longer | nongap ]
Usage: sequence  identity  alignment-ID:sequence-ID   alignment-ID:sequence-ID denominator  shorter | longer | nongap ]

The sequence identity command calculates the pairwise percent identity between sequences of the same length (including gaps, as shown in the Sequence Viewer window). The calculation is always pairwise, but can be performed for all-by-all pairs within a single alignment, or all-by-one, or between two specific sequences. An entire alignment is specified by its ID, shown in the title bar of the Sequence Viewer window, and an individual sequence by the alignment ID plus the sequence's name or index number in the alignment, in the form:  alignment-ID:sequence-ID  (details...).

Results are listed in the Log. For each pair, the number of columns with identical residues is given as a percentage of the specified denominator:

Align Sequences using Clustal Omega or MUSCLE

Usage: sequence  align  alignment-IDprogram  clustalOmega | muscle ]
Usage: sequence  align  chain-specprogram  clustalOmega | muscle ]
Usage: sequence  align  sequence1,sequence2[,sequence3...,sequenceN] [ program  clustalOmega | muscle ]

The sequence align command calculates a new alignment of the specified protein sequences using a web service hosted by the UCSF RBVI. The result is opened in a new Sequence Viewer window.

The sequences to align can be specified collectively by:

...or individually as a comma-separated list (without spaces) of any combination of:

The program can be either of two choices:

UCSF Resource for Biocomputing, Visualization, and Informatics / April 2022