User GuidesSnapGene User Guide Command Line InterfaceCommand Line: Converting File Formats

Command Line: Converting File Formats

How can I convert my file(s) into SnapGene format using the command line?

The SnapGene Desktop program must be quit before running the SnapGene executable via the command line.

To see all available command line options use the --help flag.

"C:\Program Files\SnapGene" --help

Note, on macOS, run the executable in the Application bundle:

/Applications/ --help

Convert a Single File

To convert a single file to SnapGene DNA format, run SnapGene from the Command Prompt (Windows) or Terminal (macOS or Linux):

/path/to/SnapGene --convert "SnapGene DNA" \
                  --input someSupportedFile.extension \
                  --output aSnapGeneFile.dna

For example, on macOS the following command would convert a single DNA sequence fasta file located on the Desktop into a single SnapGene file called Seq.dna.

/Applications/ -c SnapGene -i ~/Desktop/Seq.fa -o ~/Desktop/Seq.dna

Convert a Multi-Sequence File to a Collection

To convert a multi-sequence FASTA or GenBank file to a Collection, specify the multi-sequence file as the input, and specify the new Collection name as the output. The converted files will be added to the appropriate area (DNA, RNA or Protein) in the Collection.

For example, on macOS the following command would convert a multi-sequence DNA fasta file called HIV_ENV.fa on the Desktop into a Collection located on the Desktop containing all of the sequences.

/Applications/ -c SnapGene -i ~/Desktop/HIV_ENV.fa -o ~/Desktop/HIV_ENV

Convert Multiple Files

To convert two or more separate sequence files to SnapGene DNA format, type:

/path/to/SnapGene --convert "SnapGene DNA" \
                  --input-list listOfInputFiles.txt \
                  --output-list listOfOutputFilenames.txt

The "input-list" is a text file listing the input file paths, e.g.:





Similarly, the "output-list" is a text file listing the output file paths, e.g.:





All converted files must be the same type (DNA or RNA or protein.).

Supported Formats

To see the full set of formats that can be converted, go to:

The supported output formats include: DDBJ, EMBL, FASTA, GenBank - SnapGene, GenBank - Standard, GenBank - Vector NTI, GenPept - SnapGene, GenPept - Standard, Plain Text, SnapGene DNA, and SnapGene Protein.

To see other options, type:

/path/to/SnapGene --help