+# Creates a new file named "outfile.fasta" and writes
+# multiple sequence alignment 'msa' to it in fasta format.
+File.open('outfile.fasta', 'w') do |f|
+ f.write(msa.output(:fasta))
+end
+}}}
+
+==== Setting the Output Format ====
+
+The following symbols determine the output format:
+
+ * `:clustal` for ClustalW
+ * `:fasta` for FASTA
+ * `:phylip` for PHYLIP interleaved (will truncate sequence names to no more than 10 characters)
+ * `:phylipnon` for PHYLIP non-interleaved (will truncate sequence names to no more than 10 characters)
+ * `:msf` for MSF
+ * `:molphy` for Molphy
+
+
+For example, the following writes in PHYLIP's non-interleaved format:
+
+{{{
+f.write(align.output(:phylipnon))
+}}}
+
+
+=== Formatting of Individual Sequences ===
+
+!BioRuby can format molecular sequences in a variety of formats.
+Individual sequences can be formatted to (e.g.) Genbank format as shown in the following examples.
+
+For Sequence objects:
+{{{
+seq.to_seq.output(:genbank)