Also distributed with CDTree is a utility called 'fa2cd'.
This is a stand-alone command-line utility
that can convert a multiple alignment in FASTA format (also called 'mFASTA' format) into
a conserved domain 'CD file' that can be used as input to CDTree
The standard file extension for such files is '.cn3'. The mFASTA input file
should contain, sequentially, one FASTA formatted record
for each aligned row and a gap is indicated with the '-' character.
By default, fa2cd performs a formal convertion of the input mFASTA alignment, assigns a sequential, numeric identifier to each input sequence and chooses a 'master' sequence. It does not attempt to perform validation of accessions or sequence data in the input against NCBI or other database resources.
The following sections provide some information on modifying the program's default functionality, and hints for the more prominent command-line options. A description of all command-line options is obtained via the '-help' flag, and a short summary is available with '-h'.
fa2cd does not do the reverse conversion and create a FASTA file from a CD file. However, you may open
a CD file in Cn3D and in the alignment window use the 'View->Export' menu command for this purpose.