{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Comparing eCLIP with DeSeq results using Metadensity\n", "This allows us to generate hypothesis about RBP function - whether it stabilize or destabilize RNA?" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Using /home/hsher/gencode_coords/GRCh38.p13.genome.fa\n", "using /home/hsher/gencode_coords/GRCh38.p13.genome.fa\n", "Using: /home/hsher/gencode_coords/gencode.v33.transcript.gff3\n" ] } ], "source": [ "# set up files associated with each genome coordinates\n", "import metadensity as md\n", "md.settings.from_config_file('/home/hsher/Metadensity/config/hg38.ini')\n", "\n", "\n", "# then import the modules\n", "from metadensity.metadensity import *\n", "from metadensity.plotd import *\n", "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "\n", "\n", "# I have a precompiles list of ENCODE datas as a csv that loads in this dataloader\n", "import sys\n", "sys.path.append('/home/hsher/Metadensity/scripts')\n", "from dataloader import *\n", "%matplotlib inline\n", "\n", "plt.style.use('seaborn-white')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Get all the DESeq files for each KD experiment\n", "Here we use ENCODE KD-RNA-seq DeSeq outputs" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "# parse DE filenames\n", "de_path = '/home/hsher/deseq_gccor/normalized/'\n", "all_de_files = os.listdir(de_path)\n", "all_de_files.remove('result_URLs_HepG2.txt')\n", "all_de_files.remove('result_URLs_K562.txt')\n", "all_de_files_rbp = [f.split('-')[0] for f in all_de_files if '-' in f]\n", "all_de_files_cell = [f.split('-')[2].split('_')[0] for f in all_de_files if '-' in f]\n", "de_df = pd.DataFrame([all_de_files, all_de_files_rbp, all_de_files_cell]).T\n", "de_df.columns = ['fname', 'rbp', 'cell line']" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| \n", " | fname | \n", "rbp | \n", "cell line | \n", "
|---|---|---|---|
| 0 | \n", "PRPF8-BGHLV17-HepG2_DESeq2_output.txt | \n", "PRPF8 | \n", "HepG2 | \n", "
| 1 | \n", "RECQL-LV08-K562_DESeq2_output.txt | \n", "RECQL | \n", "K562 | \n", "
| 2 | \n", "TRIM56-BGHLV20-HepG2_DESeq2_output.txt | \n", "TRIM56 | \n", "HepG2 | \n", "
| 3 | \n", "ESF1-BGHLV30-HepG2_DESeq2_output.txt | \n", "ESF1 | \n", "HepG2 | \n", "
| 4 | \n", "MTPAP-BGKLV34-K562_DESeq2_output.txt | \n", "MTPAP | \n", "K562 | \n", "