{ "metadata": { "name": "illumina_overview_tutorial_workshop_template" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## Notebook preparation\n", "\n", "This notebook was designed to run the [QIIME Illumina Overview Tutorial](http://qiime.org/tutorials/illumina_overview_tutorial.html) on the QIIME 1.8.0 Amazon Web Services EC2 instance. You can find the AMI ID on the [QIIME resources page](http://qiime.org/home_static/dataFiles.html). These steps covered here are important for having multiple users working on a single IPython Notebook server, but are a little bit of overkill if you're running this on your own AWS instance. If you're running this on your own instance, you should instead work with the IPython Notebook linked from [here](http://qiime.org/tutorials/illumina_overview_tutorial.html#ipython-notebook)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Getting started\n", "\n", "We'll begin by initializing some variables to configure our IPython computing environment. Don't edit anything in this first cell. " ] }, { "cell_type": "code", "collapsed": false, "input": [ "from random import choice\n", "from os import chdir, mkdir, makedirs\n", "from os.path import join\n", "from IPython.display import FileLinks as ipFileLinks, FileLink as ipFileLink\n", "\n", "# to support running in a multi-user environment, each user will work in\n", "# a temporary working directory with a randomly generated name\n", "basedir = \"temp\"\n", "choices = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"\n", "choices += choices.lower()\n", "working_dir = join(basedir,''.join([choice(choices) for i in range(10)]))\n", "\n", "otu_base = \"/home/ubuntu/qiime_software/gg_otus-12_10-release/\"\n", "reference_seqs = join(otu_base,\"rep_set/97_otus.fasta\")\n", "reference_tree = join(otu_base,\"trees/97_otus.tree\")\n", "reference_tax = join(otu_base,\"taxonomy/97_otu_taxonomy.txt\")\n", "\n", "print \"Your working directory is %s\" % working_dir\n", "makedirs(working_dir)\n", "chdir(working_dir)\n", "\n", "!wget ftp://ftp.microbio.me/qiime/tutorial_files/moving_pictures_tutorial-1.8.0.tgz\n", "!tar -xzf moving_pictures_tutorial-1.8.0.tgz\n", "\n", "# To use FileLink(s), but link to files in the user's working directory\n", "# we wrap the call to FileLink(s) to append the working_dir to the \n", "# url_prefix. NOTE: This is not something that you'll generally need to\n", "# do - it's only important as we're working with multiple users in the \n", "# IPython Notebook, which is currently only a single-user environment.\n", "def FileLinks(path):\n", " return ipFileLinks(path,url_prefix='files/%s/' % working_dir)\n", "\n", "def FileLink(path):\n", " return ipFileLink(path,url_prefix='files/%s/' % working_dir)" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Running the Illumina Overview Tutorial\n", "\n", "You can now get started. Follow the steps found in the [Illumina Overview Tutorial](http://qiime.org/tutorials/illumina_overview_tutorial.html). " ] }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }