#!/usr/bin/env python # coding: utf-8 # # Analysis notebooks # # This folder contains the source code for the figures that are presented in the article "Nucleotide excision repair is impaired by binding of transcription factors to DNA". # # * [Figure 1](Figure-1.ipynb) Elevated mutation rate at TFBS in melanomas # * [Figure 2](Figure-2.ipynb) Mutation rate at distal TFBS and DHS sites # * [Figure 3](Figure-3.ipynb) Regions around TFBS show a decrease in nucleotide excision repair # * [Extended Data Figures](Extended_Data_Figures.ipynb) It contains all the figures that are presented under Extended Data section # ### To execute the above notebooks locally in your system it requires the following dependencies: # # In order to reproduce the figures that are shown in the above notebooks. We recommend to read the following to check if the required versions are already installed in your local system or alternatively create an environment with all the library dependencies installed as described below. # # * Python 3.4 or above. # # * Python packages required (the versions are the ones that we have used, but higher versions might also work): # * matplotlib=1.5 # * pandas=0.17 # * ipython-notebook=4.0 # * scipy=0.16 # * statsmodels=0.6 # * rpy2=2.7 # # * The precomputed results available at http://bg.upf.edu/group/projects/tfbs/results/metafiles.tar.gz. Download this metafiles tarball and untar it inside 'analysis_notebooks' directory. # # #### Create a python environment with conda # # First install [Anaconda](https://www.continuum.io/downloads) and then follow the below steps to create a new environment with all the dependencies installed: # ``` # # add some channels with R packages # $ conda config --add channels r # $ conda config --add channels bioconda # # # conda will download and install all the packages pre-compiled for your platform # $ conda create -n tfbsmutrate python=3.4 matplotlib=1.5 pandas=0.17 \ # ipython-notebook=4.0 scipy=0.16 statsmodels=0.6 rpy2=2.7.6 # # # activate the environment that contains all the above versions # $ source activate tfbsmutrate # # # install some packages not available in conda # (tfbsmutrate)$ pip install brewer2mpl==1.4.1 # # # if you haven't already done, clone the git repository # (tfbsmutrate)$ git clone git@bitbucket.org:bbglab/tfbsmutrate.git # (tfbsmutrate)$ tar -xzvf tfbsmutrate.git # (tfbsmutrate)$ cd tfbsmutrate # # # if you haven't downloaded the pre-computed data points, download it and untar inside the 'analysis_notebooks' directory # (tfbsmutrate)$ wget http://bg.upf.edu/group/projects/tfbs/results/metafiles.tar.gz -P analysis_notebooks # (tfbsmutrate)$ tar -xzvf analysis_notebooks/metafiles.tar.gz # # # now everything is ready to run the ipython notebooks # (tfbsmutrate)$ cd analysis_notebooks # (tfbsmutrate)$ jupyter-notebook # ```