Introduction: 3D Print a Sculpture From Your DNA

Wouldn't it be cool to interact physically with a model of your genetic code?

This Instructable will show you how to use free tools to download your raw genome data from 23andme and generate a 3D model that you can view on your computer. With access to a 3D printer or 3D printing service, you can even print a model to hold in your hand!

You can learn more about the motivation behind the project in this interview on the 23andme blog.

Prerequisites for this Instructable:

  • The ability to run command-line applications (using a terminal, console, command prompt, etc.)
  • Access to a 3D printer or a 3D printing service

This project is competing in the Instructables 3D Printing Contest; if you like it please vote to support my future 3D printing projects.

Step 1: Download the Raw Genome Data

To download your raw genome data from 23andme:

  1. Log on to 23andme
  2. Select Browse Raw Data from the drop-down menu under your name (this will take you to the Browse Raw Data page)
  3. On the Browse Raw Data page, click Download

You'll be asked to re-enter your password and to answer a verification question. You may also need to select a Profile (if there's more than one person's DNA under your account) and a Dataset (choose All DNA). Finally, click the Download Data button and the data will begin downloading automatically.

Once the download is complete, unzip the file and you will have have a text file with a long name and a .txt extension. Make a note of this filename as you'll be using it in the next step.

Step 2: Generate Model Source With 3dna

I created an open-source program called 3dna (source code and details on Github: https://github.com/jjg/3dna) to convert the raw 23andme text file into something that can be fed to OpenSCAD (an open-source computer-aided design program you'll use in the next step) to generate a 3D model.

Download the latest release of 3dna (it's free) using this link: https://github.com/jjg/3dna/archive/1.0.zip

Unzip the 3dna files in the same place you unzipped the raw DNA data, then open a terminal and run the following command, replacing genome.txt with the name of the file unzipped in the previous step.

python 3dna.py genome.txt 25 > genome.scad

The second parameter in the command (25 in the example above) sets the sample resolution of the model (higher numbers = more complex model). 25 is a safe place to start. If the model gets too complex, it can be hard to process in later steps.

This may take a few minutes to run, but when it's done you'll have a new file named genome.scad that you'll use in the next step.

Step 3: Generate Model With OpenSCAD

Now you'll use OpenSCAD to create a 3D model from the output (genome.scad) of the previous step.

Download and install OpenSCAD (it's free) from here: http://www.openscad.org/

Run OpenSCAD and open the genome.scad. If all goes well you should see a model generated from your DNA on the right-hand side of the screen (depending on how fast your computer is, this might take a few minutes). You can use your mouse to rotate and zoom in and out of the model.

The code you see on the left-hand side is instructions in the OpenSCAD language describing the shapes in the model. OpenSCAD is a great way to design models if you like programming. If you'd like to know more about the code visit http://www.openscad.org/documentation.html.

Step 4: Export and Print

Viewing the model on screen is cool, but if you want one you can hold in your hand here's how you can export the model and print one yourself, or order a print from a service like Shapeways.

Here is how to export the model for 3D printing:

  1. Render the model by clicking the Design menu and selecting Compile and Render
  2. Click the File menu and select Export -> Export as STL

Now you can feed the STL file to your 3D printer's slicing software.

It can be tricky to get these models to print as they have features like circular overhangs which can be challenging for some printers. Additionally, they tend to have a small base so you may want to add something to the bottom of the model using your printer's software to make sure it doesn't break loose from the bed while printing. You can see in my example that this print challenged my printer.

Even if you have your own printer you might want to get your DNA printed in one of the more interesting materials available from a printing service.

3D Printing Contest

Participated in the
3D Printing Contest