{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# Read in the RMDB data set as CSV","metadata":{}},{"cell_type":"code","source":"import numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\nimport matplotlib.pyplot as plt","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df = pd.read_csv('/kaggle/input/rmdb-rna-mapping-database-2023-data/rmdb_data.v1.3.0.csv')\ndf","metadata":{"execution":{"iopub.status.busy":"2023-11-10T16:53:43.151985Z","iopub.execute_input":"2023-11-10T16:53:43.152439Z","iopub.status.idle":"2023-11-10T16:53:58.168023Z","shell.execute_reply.started":"2023-11-10T16:53:43.152405Z","shell.execute_reply":"2023-11-10T16:53:58.166900Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"# Quick data inspection","metadata":{}},{"cell_type":"markdown","source":"## `DMS` data are DMS profiles\nThese data are similar to the Ribonanza data with experiment_type `DMS_MaP` but generally use a different experimental readout of the DMS modification profiles.","metadata":{}},{"cell_type":"code","source":"length = 433\nlabel_names=[f\"reactivity_{i+1:04}\" for i in range(length)]\nexperiment_type = 'DMS'\nreactivity = df[ df[\"experiment_type\"]==experiment_type][label_names].to_numpy()\nplt.imshow( reactivity,vmin=0,vmax=1,aspect='auto',interpolation='none',cmap='binary' )","metadata":{"execution":{"iopub.status.busy":"2023-11-10T17:00:29.255921Z","iopub.execute_input":"2023-11-10T17:00:29.256868Z","iopub.status.idle":"2023-11-10T17:00:30.015259Z","shell.execute_reply.started":"2023-11-10T17:00:29.256830Z","shell.execute_reply":"2023-11-10T17:00:30.013801Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## `DMS_M2_seq` data are mutate-and-map-seq profiles.\n\nThese mutate-and-map data come in blocks which show inferred DMS profiles for a target RNA sequence and then sequences that have mutations at each nucleotide.","metadata":{}},{"cell_type":"code","source":"experiment_type = 'DMS_M2_seq'\n# Just show first 1000 profiles so we can see the interesting patterns\nreactivity = df[df[\"experiment_type\"]==experiment_type][:1000][label_names].to_numpy()\nplt.imshow( reactivity,vmin=0,vmax=1,aspect='auto',interpolation='none',cmap='binary' )","metadata":{"execution":{"iopub.status.busy":"2023-11-10T17:08:20.066580Z","iopub.execute_input":"2023-11-10T17:08:20.067361Z","iopub.status.idle":"2023-11-10T17:08:20.442315Z","shell.execute_reply.started":"2023-11-10T17:08:20.067309Z","shell.execute_reply":"2023-11-10T17:08:20.441205Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"## `DMS_cotx` profiles are co-transriptional DMS sequence profiles\nThese profiles show the reactivities of RNA sequences as they 'grow' during RNA transcription. The data look like triangles!\n","metadata":{}},{"cell_type":"code","source":"experiment_type = 'DMS_cotx'\nreactivity = df[ df[\"experiment_type\"]==experiment_type][label_names].to_numpy()\nplt.imshow( reactivity,vmin=0,vmax=1,aspect='auto',interpolation='none',cmap='binary' )","metadata":{"execution":{"iopub.status.busy":"2023-11-10T17:00:36.684771Z","iopub.execute_input":"2023-11-10T17:00:36.685212Z","iopub.status.idle":"2023-11-10T17:00:37.096698Z","shell.execute_reply.started":"2023-11-10T17:00:36.685179Z","shell.execute_reply":"2023-11-10T17:00:37.095495Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}