{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "hello there!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# HW 1: Manipulating DNA Data as Strings" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here is the DNA fragment itself, for subsequent cells. All of the below operations should work on this data." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [ "dna_frag = \"ATCGATCGATCGATCGACTGAATTCTCATAGCTATGCATGTAGCTACTCGATCGATCGATCGATCGATCGATCGATCGATCGATCATGCTATCATCGATCGATATCGATGCATCGACTACTAT\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

Calculating AT content

\n", "Here we calculating the fraction of the fragment that is A or T." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

Complementing DNA

\n", "Here we calculate the complementary strand of DNA." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

Calculating restriction fragment length

\n", "Here we calculate the size of the two subfragments, when we use the EcoRI restriction enzyme to cut the DNA at the motif G\\*AATTC (where the \\* indicates the position of the cut)." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "

Splicing out introns

\n", "Say the DNA fragment contains two exons, with an intron in between. The first exon contains the first 63 bases (characters), while the last one runs from the 91st (using 1-based counting) character to the end. The intron is the space between them. This program will print out:\n", "
    \n", "
  1. Each exon, separately.
  2. \n", "
  3. The fraction of DNA that is part of an exon.
  4. \n", "
  5. The full DNA strand, but the intron will be in lower-case letters.
  6. \n", "
" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.4.3" } }, "nbformat": 4, "nbformat_minor": 0 }