User GuidesSnapGene User Guide Command Line InterfaceCommand Line: Creating Maps of DNA Sequences

Command Line: Creating Maps of DNA Sequences

How can I create SnapGene map images using the command line?

Ensure the SnapGene Application/Program is not running before you attempt to run the executable from the command line.

To create a map image the input must be a DNA sequence in a SnapGene .dna file.

Create a Single Map

To generate a SnapGene map image in PNG format from the command line, type:

/path/to/SnapGene --createPreview \
                  --size 300,300 \
                  --input ~/Downloads/pUC19.dna \
                  --output ~/Desktop/test.png

Example Windows:

"%ProgramFiles%"\SnapGene\SnapGene.exe" --createPreview -s 1000,1000 -i %UserProfile%/Desktop/pUC19.dna -o %UserProfile%/Desktop/pUC19.png

Example macOS:

/Applications/SnapGene.app/Contents/MacOS/SnapGene --createPreview -s 1000,1000 -i ~/Desktop/pUC19.dna -o ~/Desktop/pUC19.png

To generate a SnapGene map image in JPEG format, replace "png" with "jpg".

Create Maps in Batch

To generate two or more SnapGene map images from the command line, type:

/path/to/SnapGene --createPreview \
                  --size 300,300 \
                  --input-list listOfInputFiles.txt \
                  --output-list listOfOutputFilenames.txt

Configure Map Options

It is possible to configure the image size, quality, and watermark. To see the full set of options, type:

/path/to/SnapGene --help