Convert a Clustal alignment sequence file to PHYLIP alignment (interleaved).

Maximum file size: 50 MB. The file is checked before conversion.

Clustal alignment → PHYLIP alignment (interleaved)

  • PHYLIP keeps only the first 10 characters of each record ID (and replaces : and ; with |). IDs that become identical are rejected.
  • Only the aligned sequence rows are converted; alignment annotations such as scores and consensus lines are not kept. A file with several alignments can be converted only to sequence formats such as FASTA.
  • The selected output is an alignment format. Every sequence must be the same length and already aligned. This does not create an alignment.

Move one Clustal alignment to PHYLIP

Clustal to PHYLIP writes one interleaved PHYLIP alignment from one Clustal alignment. It carries the aligned sequence rows, but not Clustal consensus lines or alignment scores. The converter refuses a file containing multiple alignments.

Check row names and gap symbols

Standard PHYLIP keeps the first ten characters of each ID and changes : or ; to |. The converter refuses names that collide after those changes. It also refuses . in sequence rows and suggests - for gaps. The supplied three-row Clustal sample converts and reads back with the same sequence letters.

For longer IDs without spaces, use the available relaxed-name PHYLIP route. That output still omits Clustal alignment annotations. x

The converter writes one alignment per PHYLIP alignment (interleaved) file, so upload one alignment at a time. A file with several alignments (for example several MAF blocks or Stockholm sections) is refused rather than merged into one.

Run it with Biopython

For batch work, you can use Biopython's SeqIO.convert function. This pair needs no molecule type argument.

from Bio import SeqIO

count = SeqIO.convert("input.clustal", "clustal",
                      "output.phylip", "phylip")
print("Converted %i records" % count)

Sample input file: Clustal alignment

Copy this example into a file, or download it, to try a Clustal alignment conversion.

Download sample (sample.aln, 277 bytes)

Samples are small illustrative files. Some come from the Biopython test suite (see the project's sample notes); they are not real study data.

Choose another conversion