Mystery Rays from Outer Space

Meddling with things mankind is not meant to understand. Also, pictures of my kids

September 18th, 2008

XPlasMap 0.99

Herpes simplex XPlasMap mapXPlasMap 0.99 is out; download it here.  A partial list of new features and changes:

New features

  • Auto-positioning for enzymes and gene text 
  •  Import from EMBOSS 
  • Ovals, rectangles, and arrows for annotations 
  • Convert restriction sites to MCS/MCS to restriction sites 
  • Change feature fonts on an individual basis 
  •  Insert, copy, and cut fragments by restriction site 
  • Export to plain text 
  • Import circular DNA from GenBank correctly
  • Plasmid name and description are moveable 


  • Determine PNG and JPG resolution at export
  • Checkbox to identify ORFs in Genbank during import 
  • Change “Insert fragment” shortcut from “?I” to “?V” 
  • Change “Edit plasmid info” shortcut to “?I” 
  •  ”Info” icon in toolbar to edit plasmid info 

Many bugfixes

If you downloaded version 0.99 when I mentioned it earlier here, please get the new version anyway; I made a couple minor bugfixes in the meantime.

I’ve tested it on several computers, including Intel and PowerPC, MacOS4 and MacOS5, but there are some combinations of those I haven’t been able to test.  Hopefully there are no configuration-dependent bugs.

September 12th, 2008

XPlasMap again

XPlasMap iconFinally managed to get XPlasMap 0.99 running on MacOS10.4/PowerPC, as well as MacOC10.5/Intel.  My wife went out to the movies, so after I had popcorn with the kids, and played Scrabble Junior, and a game of chess, and discussed the Dropkick Murphys and spiders and batman and Jon Papelbon and other essential snippets of 21st-century wisdom, and put the kids to bed; after that I was able to get on to the Powerbook and (interrupted by three emails with data from my grad student, who was feeling justifiably triumphant after a very productive week) re-install all the appropriate modules (including a minor-release downgrade of wxPython, since the latest has a weird bug I didn’t want to track down) — and with a bit of tweaking and adjustment, I think XPlasMap is now running more or less correctly on both platforms.  

I will probably announce it some time next week.  If you want a sneak preview, try here.

September 1st, 2008

XPlasMap sneak preview

I develop XPlasMap on my Macbook Pro, which is running MacOS10.5.4, and so it’s kind of a pain making sure it will run properly on PowerPC machines and machines running OS10.4.  (I gave up supporting 10.3 a while ago, because that was even more work.)  We do have a PowerPC machine running 10.4, but I gave it to my wife and kids; so to get XPlasMap running universally I have to find a sliver of time when the PowerBook isn’t being used.  

I found an hour this morning and got all the modules1 and so on upgraded to the proper versions, and after another 15 minutes got XPlasMap running on the machine.  Unfortunately there seem to be a couple of bugs that are specific for either 10.4, or PowerPC (arrows can’t be dragged, for some reason) and before I could trouble-shoot, my wife kicked me off the machine.  (Does this happen to Steve Jobs?)

The good news, such as it is, is that XPlasMap seems to be working fine on my own machine.  So if you’re running OS10.5 on an Intel machine, and want to take a look at a new but beta and potentially buggy version of XPlasMap, try downloading version 0.99 from here.  Bug reports, comments, feature requests, complaints, suggestions, all gladly accepted.  Also, if it’s not immediately obvious how something works, let me know so I can make sure it’s documented.

This is a temporary link, so if you’re reading this in the future (say, after Sept 8/08) there’s no guarantee that there will be anything there.

  1. Upgraded Python to 2.5;
    wxPython to 2.8.8;
    BioPython to 1.4.7, I think it is;
    mxBaseTools to 3.something;
    installed Numeric, even though it’s out of date, because BioPython needs it;
    and installed ElementTree even though most of it is in Python2.5 because I need XMLWriter[]
August 10th, 2008

What’s new in XPlasMap?

XPlasMap mapXPlasMap is a DNA/plasmid mapping program for MacOS 10.4 or higher.  The present version is beta, version 0.96.  I’ve finished adding all the new features that I want in v1.0, and have stomped all the bugs I know of.  My plan is to continue testing for a week or so (I expect I’ll turn up a few more bugs); then compile and test on a couple of other computers with different OSes.  At that point I could use some help, if anyone is interested in beta testing.  If that goes smoothly I will release it (probably late August/early September) as “v.0.99 beta”, fix any bugs that turn up, and release a non-beta version in fall some time.

What’s new in XPlasMap 0.99?

New features include:

  • Annotation, with text, arrows, circles, etc.
  • Convert groups of enzymes to multiple cloning sites, and vice-versa
  • Auto-positioning of enzymes and text
  • Copy, cut, and insert fragments by selecting restriction sites
  • Import from EMBOSS format, as well as GenBank, FastA, and plain text sequences
  • Export to a plain-text description of the plasmid (not all that useful, but someone asked for it)

Improvements include:

  • Fine-grained control over fonts
  • Improved control over resolution of exported images (PNG and JPG)
  • Much more responsive List View
  • More control over text positioning

(Click on the image above to see a larger version illustrating annotation and fonts.) As well as a host of interface improvements (at least, I think they’re improvements), there are extensive changes under the hood that I hope will make the program more maintainable and stable.

May 3rd, 2008


After spending a week1 trying to find a bug in XPlasMap, I just realized that “[-\d]+” should have been “[-\d\.]+”


  1. Well, a half-hour every other night for a week[]
February 24th, 2008

What’s going on with XPlasMap

XPlasMap iconIn case anyone cares, I’m still slowly1 working on making a non-beta version of XPlasMap. (The present release is 0.96 [see comments here], so it’s getting incrementally closer to 1.0.) I’ve squashed a few bugs, and added a few features, but much of what I’ve been doing has been kind of shuffling things behind to scenes to make it a little easier to maintain, and also to prepare for adding a couple of features that would have stepped on the toes of the original setup.

I spent the morning trying to figure out why printing was suddenly low-resolution, a bug I thought I had fixed several iterations ago. Turns out the fix only works with the most recent versions of wxPython, whereas I was still working with the builtin in the hope of making the file more portable on Leopard. There’s nothing in the release notes that I can see, but when I switched back to print resolution was back to the proper level again.

There are a couple of things in the ToDos that probably won’t make it into v. 1.0, but most of them should, I think.

XPlasMap ToDos for v 1.0

  • BUG - Clicking on anything often selects the plasmid rather than the feature itself. (Take the plasmid out of the pathlist)
  • BUG – Changing gene text parameters overrides text position
  • BUG – Fix highlights in Cut Dialog
  • BUG – Split MCS doesn’t work with no downstream sequence/site
  • BUG – Hide/show text in List View is really slow for a batch of genes!
  • BUG – writeXMLFile intermittently throws error at self.recentFilesMenu.Delete(deleteId) – “invalid item in wxMenu.Delete”
  • BUG – Show/hide comment contextual menu doesn’t work
  • BUG – When importing from FastA make sure first save prompts for a name
  • “Info” icon in toolbar
  • Highlight features when selected
  • Flip text orientation manually
  • Insert fragments by restriction site
  • More fine-grained control of fonts
  • Determine PNG and JPG resolution at export time
  • When importing and identifying sequences, put enzyme sequence into “Note”
  • When opening a file, put MCS center (etc) in if missing. Also put in during creation in dialog
  • Convert restriction sites to MCS
  • Magnifying-glass-type zoom
  • Error message if “Import” tries to open an incorrect file type
  • Checkbox – Identify ORFs in Genbank imports (Default on or off in preferences)
  • Annotation menu
  • Add special symbols for Annotations (Arrows, brace-brackets, etc)
  • Status bar – show mouse position in nucleotides
  • Speed up changes in List View
  • Improve batch handling of genes
  • Clean up the code for the copy and cut fragment sections
  • Turn plasmid name and description into a free-standing comment
  • (With special double-click characteristics?)
  • Import from ApE gb files (APE gb files are broken, repair their LOCUS line spacing and then import; or write a less restrictive GenBank interpreter)
  • Import from GB as circular when noted in LOCUS line
  • Report error when ImportFromGB module fails
  • Print from ListView
  • BUG – short gene goes all the way around when crossing the 90o point
  • BUG – Printing more than one page doesn’t work (Use GetVirtualSize instead of GetSizeTuple; But this causes problems for the next page, if it’s smaller)
  • BUG – Printing is low-resolution (again!)
  • BUG – Highlight color is too opaque
  • BUG – “No features are selected” in List View
  • BUG – Text height of new import is off the window
  • BUG – Short genes only show clockwise arrow
  • Grab “Product” from GenBank imports for names
  • Batch entry for restriction sites
  • Batch entry for genes
  • Change “Insert fragment” shortcut from “⌘I” to “⌘V”; change “Edit plasmid info” shortcut to “⌘I”

  1. XPlasMap is lower priority than writing grants, teaching, doing lab work, and taking kids to birthday parties and tobogganing, so that leaves about an hour twice a week, late at night when the kids are asleep, for XPlasMap.[]
October 4th, 2007

XPlasMap 0.96

I’ve released a new version of XPlasMap, version 0.96 (asymptotically approaching a non-beta release). XPlasMap 0.96 can be downloaded here, and the XPlasMap home page is here.

XPlasMap is a DNA drawing program for MacOSX (MacOS10.4 and up only for this release; a slightly older version runs on MacOS10.3 [download XPlasMap10.3 here] ) It draws plasmid maps with all the features you’d expect (genes, multiple cloning sites, restriction sites, and so on), pretty much interactive. It also draws linear DNA maps and will draw maps by importing directly from GenBank files. It will also import from FastA files; for both FastA and GenBank sequence it will map out restriction sites (slowly! –it’s no competition for specialized restriction mapping programs like EnzymeX or the venerable DNA Strider) and identify open reading frames (again, slowly). Maps can be saved as .xpmp files (which is simply an XML format; I wanted to make sure that the information in the maps would remain accessible and in a non-proprietary format), or exported to PNG or JPG.

Here’s a sample plasmid map, for Invitrogen’s pTracerCMV2 (click on the image for a larger version):

pTracerCMV2 - XPlasMap

And here’s a sample of a linear DNA map (click for a larger version). This is the human genomic major histocompatibility region, imported directly from a GenBank file (3.7 million base pairs). The class I region is highlighted in orange, class III region in green, and class II region in blue.

HLA Genomic - XPlasMap

The 0.96 release is mainly a bug-fix release; there are preliminary versions of a couple of new features, with annotations being the main new feature.

New features:

  • Annotations
  • “Plasmid comment” is now free-form text (can be moved and edited)
  • (Preference option) Common actions on a toolbar


  • Improved print resolution
  • Fixed: Intermittent Clear Recent Files bug
  • Fixed: JPG and PNG exports use a large canvas with image only in one corner
  • Fixed: Error on copying in reverse
  • Fixed: Font preferences not always honored
  • Fixed: Going from linear to circular, genes disappear
  • Fixed: Contextual menus occasionally not responding
  • Fixed: Show/Hide enzyme lost after save
  • Fixed: Genes with no name disrupt drawing
  • Fixed: Freeze in Cut Plasmid
  • Fixed: Hiccup if no Preference file

Assorted other bugfixes and UI improvements

XPlasMap only runs on Macs (though it’s written in Python/wxPython, which means that it should be a straightforward recompile to run on other OSes — but I only use Macs so haven’t tried). I also wrote a much more primitive (but still rather attractive) on-line plasmid-mapping program that is OS-independent: Savage Plasmids draws SVG maps and exports to Postscript. Unfortunately browser support for SVG is still at best spotty and hasn’t improved much over the past couple of years, as far as I know.  SVG will do interactive, but I’ve never got around to making the program interactive (and likely never will, now), so XPlasMap really makes much nicer maps.