{ "metadata": { "name": "ID_Target_Loci_Check" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "heading", "level": 2, "metadata": {}, "source": "Steven and I are trying to ID target loci (lineage-specific and developmentally different loci). This is a check to make sure we can obtain the same result" }, { "cell_type": "heading", "level": 4, "metadata": {}, "source": "Starting with the methratio files, I am going to filter for context and coverage. Then I will create files containing columns for loci ID and methylation information" }, { "cell_type": "code", "collapsed": false, "input": "#Output for methratio file\nmethratio=\"/Volumes/web/Mollusk/bs_larvae_exp/AdapterTrimmed_methratio_files/\"\n\n#Location of output files\nfiltered=\"/Volumes/web/Mollusk/bs_larvae_exp/ID_Target_Loci_Check/\"", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 6 }, { "cell_type": "code", "collapsed": false, "input": "!grep \"[A-Z][A-Z]CG[A-Z]\" <{methratio}methratio_out_M1.txt> {filtered}methratio_out_M1_CG.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 2 }, { "cell_type": "code", "collapsed": false, "input": "!awk '{if ($8 >= 3) print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12}' /Volumes/web/Mollusk/bs_larvae_exp/ID_Target_Loci_Check/methratio_out_CG3x_M1.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 12 }, { "cell_type": "code", "collapsed": false, "input": "!awk '{print ($1\".\"$2),$5}' /Volumes/web/Mollusk/bs_larvae_exp/ID_Target_Loci_Check/SQL_M1.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 13 }, { "cell_type": "code", "collapsed": false, "input": "!sed '/NA/d' {filtered}SQL_M1.txt > {filtered}M1.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 38 }, { "cell_type": "code", "collapsed": false, "input": "!head {filtered}SQL_M1.txt", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "loci M1ratio\r\nC12768.103 0.167\r\nC12768.119 0.250\r\nC12768.145 0.000\r\nC12806.56 0.000\r\nC12806.76 0.200\r\nC12806.78 0.200\r\nC12806.105 0.250\r\nC12806.142 0.375\r\nC12924.19 0.000\r\n" } ], "prompt_number": 39 }, { "cell_type": "code", "collapsed": false, "input": "!grep \"[A-Z][A-Z]CG[A-Z]\" <{methratio}methratio_out_T1D3.txt> {filtered}methratio_out_T1D3_CG.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 15 }, { "cell_type": "code", "collapsed": false, "input": "!awk '{if ($8 >= 3) print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12}' /Volumes/web/Mollusk/bs_larvae_exp/ID_Target_Loci_Check/methratio_out_CG3x_T1D3.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 16 }, { "cell_type": "code", "collapsed": false, "input": "!awk '{print ($1\".\"$2),$5}' /Volumes/web/Mollusk/bs_larvae_exp/ID_Target_Loci_Check/SQL_T1D3.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 17 }, { "cell_type": "code", "collapsed": false, "input": "!sed '/NA/d' {filtered}SQL_T1D3.txt > {filtered}T1D3.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 40 }, { "cell_type": "code", "collapsed": false, "input": "!head {filtered}T1D3.txt", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "loci T1D3ratio\r\nC12960.123 0.000\r\nC13208.83 1.000\r\nC13766.37 0.000\r\nC13766.42 0.000\r\nC13766.126 0.000\r\nC13766.145 0.000\r\nC13842.49 0.000\r\nC13874.46 0.000\r\nC13874.167 0.000\r\n" } ], "prompt_number": 41 }, { "cell_type": "code", "collapsed": false, "input": "!grep \"[A-Z][A-Z]CG[A-Z]\" <{methratio}methratio_out_T1D5.txt> {filtered}methratio_out_T1D5_CG.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 19 }, { "cell_type": "code", "collapsed": false, "input": "!awk '{if ($8 >= 3) print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12}' /Volumes/web/Mollusk/bs_larvae_exp/ID_Target_Loci_Check/methratio_out_CG3x_T1D5.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 20 }, { "cell_type": "code", "collapsed": false, "input": "!awk '{print ($1\".\"$2),$5}' /Volumes/web/Mollusk/bs_larvae_exp/ID_Target_Loci_Check/SQL_T1D5.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 21 }, { "cell_type": "code", "collapsed": false, "input": "!sed '/NA/d' {filtered}SQL_T1D5.txt > {filtered}T1D5.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 42 }, { "cell_type": "code", "collapsed": false, "input": "!head {filtered}T1D5.txt", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "loci T1D5ratio\r\nC12832.25 0.000\r\nC12960.67 0.000\r\nC12960.123 0.000\r\nC13040.69 0.000\r\nC13128.87 0.000\r\nC13208.148 0.333\r\nC13442.65 0.000\r\nC13442.79 0.000\r\nC13546.84 0.000\r\n" } ], "prompt_number": 43 }, { "cell_type": "code", "collapsed": false, "input": "!grep \"[A-Z][A-Z]CG[A-Z]\" <{methratio}methratio_out_M3.txt> {filtered}methratio_out_M3_CG.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 23 }, { "cell_type": "code", "collapsed": false, "input": "!awk '{if ($8 >= 3) print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12}' /Volumes/web/Mollusk/bs_larvae_exp/ID_Target_Loci_Check/methratio_out_CG3x_M3.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 24 }, { "cell_type": "code", "collapsed": false, "input": "!awk '{print ($1\".\"$2),$5}' /Volumes/web/Mollusk/bs_larvae_exp/ID_Target_Loci_Check/SQL_M3.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 25 }, { "cell_type": "code", "collapsed": false, "input": "!sed '/NA/d' {filtered}SQL_M3.txt > {filtered}M3.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 45 }, { "cell_type": "code", "collapsed": false, "input": "!head {filtered}M3.txt", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "loci M3ratio\r\nC12806.142 0.000\r\nC12866.162 0.000\r\nC12960.123 0.000\r\nC12994.134 0.000\r\nC13046.76 0.000\r\nC13074.146 0.000\r\nC13080.102 0.000\r\nC13080.111 0.000\r\nC13080.130 0.000\r\n" } ], "prompt_number": 46 }, { "cell_type": "code", "collapsed": false, "input": "!grep \"[A-Z][A-Z]CG[A-Z]\" <{methratio}methratio_out_T3D3.txt> {filtered}methratio_out_T3D3_CG.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 27 }, { "cell_type": "code", "collapsed": false, "input": "!awk '{if ($8 >= 3) print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12}' /Volumes/web/Mollusk/bs_larvae_exp/ID_Target_Loci_Check/methratio_out_CG3x_T3D3.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 28 }, { "cell_type": "code", "collapsed": false, "input": "!awk '{print ($1\".\"$2),$5}' /Volumes/web/Mollusk/bs_larvae_exp/ID_Target_Loci_Check/SQL_T3D3.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 29 }, { "cell_type": "code", "collapsed": false, "input": "!sed '/NA/d' {filtered}SQL_T3D3.txt > {filtered}T3D3.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 49 }, { "cell_type": "code", "collapsed": false, "input": "!head {filtered}T3D3.txt", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "loci T3D3ratio\r\nC12768.103 0.000\r\nC12960.67 0.000\r\nC12960.123 0.000\r\nC12960.176 0.000\r\nC12960.186 0.000\r\nC13046.76 0.000\r\nC13208.148 0.333\r\nC13248.98 0.000\r\nC13390.79 0.000\r\n" } ], "prompt_number": 50 }, { "cell_type": "code", "collapsed": false, "input": "!grep \"[A-Z][A-Z]CG[A-Z]\" <{methratio}methratio_out_T3D5.txt> {filtered}methratio_out_T3D5_CG.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 31 }, { "cell_type": "code", "collapsed": false, "input": "!awk '{if ($8 >= 3) print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12}' /Volumes/web/Mollusk/bs_larvae_exp/ID_Target_Loci_Check/methratio_out_CG3x_T3D5.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 32 }, { "cell_type": "code", "collapsed": false, "input": "!awk '{print ($1\".\"$2),$5}' /Volumes/web/Mollusk/bs_larvae_exp/ID_Target_Loci_Check/SQL_T3D5.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 33 }, { "cell_type": "code", "collapsed": false, "input": "!sed '/NA/d' {filtered}SQL_T3D5.txt > {filtered}T3D5.txt", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 51 }, { "cell_type": "code", "collapsed": false, "input": "!head {filtered}T3D5.txt", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "loci T3D5ratio\r\nC12798.142 0.000\r\nC12798.145 0.000\r\nC12798.151 0.000\r\nC12960.67 0.000\r\nC12960.123 0.000\r\nC12994.63 0.000\r\nC12994.90 0.000\r\nC13128.87 0.000\r\nC13208.83 0.500\r\n" } ], "prompt_number": 52 }, { "cell_type": "code", "collapsed": false, "input": "#NOTEBOOK NAME\nnb='ID_Target_Loci_Check'\n\n#NOTEBOOK LOCATION\nnbloc='/Users/claireolson/Dropbox/Lab\\ \\(1\\)/IPython_nbs/Claire/'\n\n\n\n#TIMESTAMP\ndate=!date +%m%d_%H%M\n#LOCATION OF POST DIRECTORY\npost='/Volumes/web/Mollusk/iPython_Posts/'", "language": "python", "metadata": {}, "outputs": [], "prompt_number": 53 }, { "cell_type": "code", "collapsed": false, "input": "cd {post}", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "/Volumes/web/Mollusk/iPython_Posts\n" } ], "prompt_number": 54 }, { "cell_type": "code", "collapsed": false, "input": "!ipython nbconvert {nbloc}{nb} --to html --template full --output {nb}{date}", "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": "[NbConvertApp] Using existing profile dir: u'/Users/claireolson/.ipython/profile_default'\r\n" }, { "output_type": "stream", "stream": "stdout", "text": "[NbConvertApp] Converting notebook /Users/claireolson/Dropbox/Lab (1)/IPython_nbs/Claire/ID_Target_Loci_Check.ipynb to html\r\n[NbConvertApp] Support files will be in ID_Target_Loci_Check[0716_1608]_files/\r\n" }, { "output_type": "stream", "stream": "stdout", "text": "[NbConvertApp] Loaded template html_full.tpl\r\n" }, { "output_type": "stream", "stream": "stdout", "text": "[NbConvertApp] Writing 216231 bytes to ID_Target_Loci_Check[0716_1608].html\r\n" } ], "prompt_number": 55 }, { "cell_type": "code", "collapsed": false, "input": "", "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }