Skip to content

MAF Conversion

Convert Multiple Alignment Format (MAF) files, such as whole-genome alignments, into FASTA, NEXUS, or PHYLIP alignments: one per locus in a BED file, or one per block or chromosome without one.

  1. Select Genomics in the navigation bar A.
  2. Open Convert MAF alignments from the tool list on wide windows, or select the tool name B at the top of the page to switch tools.
  3. Add the MAF files C with Browse files, Browse folder, or Open archive. SEGUI searches a folder and its subfolders for files that match the tool's input format. See file input for mobile options.
  4. Select a BED file of loci (optional). Without a BED file, choose whether to write one file per block or one per reference chromosome.
  5. Set block options (optional). See Block options.
  6. Select Browse under Select output directory to choose the output folder. On phones and tablets, enter a Directory name instead; SEGUI saves it in the app's own folder.
  7. Select the output format. Turn on Set interleaved format to write interleaved output (optional).
  8. Select the run button D, labeled Convert, to start the task.

The app names each sample after the text before the first dot of its MAF source, so hg38.chr1 becomes hg38 in every alignment. The reference is the species of the first sequence in the first block, unless you set Reference species. Positions always follow the forward strand of the reference.

Each block is matched to every locus it overlaps on the same chromosome. Blocks of a locus are joined in reference order across all input files, and species missing from a block are filled with gaps (-).

  • Clip blocks to each locus (on by default) trims each block to the positions of the locus. Turn it off to keep whole blocks.
  • Reverse complement minus-strand loci writes loci whose BED strand is - in the orientation of the feature, for example before translating coding sequences.

The BED file needs at least three columns without a header: chromosome, start, and end. The fourth column is the locus name and the sixth is the strand. Gzipped BED files (.bed.gz) work too.

chr1 100 200 locus_1
chr1 300 400 locus_2 0 -

Each locus is written as <locus>-<chromosome>-<start>-<end>, for example locus_1-chr1-100-200.fas. The app also writes maf_convert.csv, which lists every locus, how many blocks it joined, and whether an alignment was written. Blocks that overlap no locus are skipped.

Choose One file per block to write each block as <chromosome>-<start>-<end>, such as chr1-100-110.fas, or One file per chromosome to join all blocks of each reference chromosome into one alignment, such as chr1.fas.

All block options are optional:

OptionDescription
Reference speciesSpecies used for positions. Default: the first species in the file
Species to writeComma-separated species to keep, such as hg38, panTro6
Minimum reference basesSkip blocks with fewer reference bases
Minimum speciesSkip blocks with fewer species, counting the reference
Minimum scoreSkip blocks with a lower score. Blocks without a score are kept

See the CLI guide for examples of clipping and joining blocks. To check MAF files before converting them, use MAF summary.