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.
<p>"C:\Program Files\SnapGene" --help</p>
Note, on macOS, run the executable in the Application bundle:
In Linux run the shell script using the path:
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):
<p>/path/to/SnapGene --convert "SnapGene DNA" \ --input someSupportedFile.extension \ --output aSnapGeneFile.dna</p>
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/SnapGene.app/Contents/MacOS/SnapGene -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/SnapGene.app/Contents/MacOS/SnapGene -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:
<p>/path/to/SnapGene --convert "SnapGene DNA" \ --input-list listOfInputFiles.txt \ --output-list listOfOutputFilenames.txt</p>
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.).
To see the full set of formats that can be converted, go to: https://snapgene.com/features/convert-file-formats/
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: