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:
<p>/path/to/SnapGene --createPreview \
--size 300,300 \
--input ~/Downloads/pUC19.dna \
--output ~/Desktop/test.png</p>
Example Windows:
<p>"%ProgramFiles%"\SnapGene\SnapGene.exe" --createPreview -s 1000,1000 -i %UserProfile%/Desktop/pUC19.dna -o %UserProfile%/Desktop/pUC19.png</p>
Example macOS:
<p>/Applications/SnapGene.app/Contents/MacOS/SnapGene --createPreview -s 1000,1000 -i ~/Desktop/pUC19.dna -o ~/Desktop/pUC19.png</p>
Example Linux (Ubuntu)
<p>/opt/gslbiotech/snapgene/snapgene.sh --createPreview -s 1000,1000 -i ~/Desktop/pUC19.dna -o ~/Desktop/pUC19.png</p>
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:
<p>/path/to/SnapGene --createPreview \
--size 300,300 \
--input-list listOfInputFiles.txt \
--output-list listOfOutputFilenames.txt</p>
Configure Map Options
It is possible to configure the image size, quality, and watermark. To see the full set of options, type:
<p>/path/to/SnapGene --help</p>