{"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":"code","source":"!pip install arnie forgi openai langchain\n!conda install -y -c bioconda viennarna\n# Install forgi - a library for working with and visualizing RNA structures\n!pip install -q --upgrade forgi\n\n# Install viennarna\n!conda install -y -q -c bioconda viennarna\n\n# Install draw_rna - a library from DaS for visualizing RNA structures (works with Arnie)\n!pip install -q git+https://github.com/DasLab/draw_rna.git","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:20:12.847877Z","iopub.execute_input":"2023-10-23T20:20:12.848355Z","iopub.status.idle":"2023-10-23T20:24:15.542334Z","shell.execute_reply.started":"2023-10-23T20:20:12.848313Z","shell.execute_reply":"2023-10-23T20:24:15.540954Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"%%capture\n%pip install arnie","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:24:15.544332Z","iopub.execute_input":"2023-10-23T20:24:15.54462Z","iopub.status.idle":"2023-10-23T20:24:25.10784Z","shell.execute_reply.started":"2023-10-23T20:24:15.544594Z","shell.execute_reply":"2023-10-23T20:24:25.106578Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"%%capture\n%pip install draw_rna","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:24:25.109265Z","iopub.execute_input":"2023-10-23T20:24:25.109589Z","iopub.status.idle":"2023-10-23T20:24:34.807343Z","shell.execute_reply.started":"2023-10-23T20:24:25.10956Z","shell.execute_reply":"2023-10-23T20:24:34.805823Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# install eternafold\n!conda config --set auto_update_conda false\n!conda install -c bioconda eternafold --yes","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:24:34.810278Z","iopub.execute_input":"2023-10-23T20:24:34.810639Z","iopub.status.idle":"2023-10-23T20:26:01.019879Z","shell.execute_reply.started":"2023-10-23T20:24:34.810606Z","shell.execute_reply":"2023-10-23T20:26:01.019082Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"%env ETERNAFOLD_PATH=/opt/conda/bin/eternafold-bin\n%env ETERNAFOLD_PARAMETERS=/opt/conda/lib/eternafold-lib/parameters/EternaFoldParams.v1","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:01.021146Z","iopub.execute_input":"2023-10-23T20:26:01.021428Z","iopub.status.idle":"2023-10-23T20:26:01.029602Z","shell.execute_reply.started":"2023-10-23T20:26:01.021403Z","shell.execute_reply":"2023-10-23T20:26:01.02799Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"from Bio import SeqIO\nimport tqdm\nimport numpy as np\nimport pandas as pd \nimport matplotlib.patches as mpatches\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nimport os, gc, re\nfrom arnie.mfe import mfe\nfrom arnie.bpps import bpps\nimport forgi.visual.mplotlib as fvm\nimport forgi.graph.bulge_graph as fgb\nfrom matplotlib.colors import ListedColormap, LinearSegmentedColormap\nfrom matplotlib.patches import Rectangle\nimport matplotlib.patches as patches\nimport plotly.graph_objects as go\nimport matplotlib.pyplot as plt\nfrom tqdm.notebook import tqdm; tqdm.pandas();\nimport plotly.express as px\nimport seaborn as sns\nfrom PIL import Image, ImageEnhance\nfrom collections import Counter, defaultdict\nfrom gensim.models import Word2Vec\nfrom fastai.tabular.all import *\nfrom tensorflow.keras.preprocessing.sequence import pad_sequences\nimport torch.nn as nn\nimport torch.optim as optim\nfrom torch.utils.data import DataLoader, TensorDataset, random_split\nfrom matplotlib import animation, rc; rc('animation', html='jshtml')\nimport cv2\nimport plotly.io as pio\nfrom ipynb.draw import draw_struct\n%matplotlib inline\nCMAP = plt.cm.Pastel2\n\n","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2023-10-23T20:26:01.031038Z","iopub.execute_input":"2023-10-23T20:26:01.031362Z","iopub.status.idle":"2023-10-23T20:26:21.277472Z","shell.execute_reply.started":"2023-10-23T20:26:01.031334Z","shell.execute_reply":"2023-10-23T20:26:21.276466Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_file = '/kaggle/input/stanford-ribonanza-rna-folding/train_data.csv'\ntrain = pd.read_csv(train_file,\n                    nrows = 100000,\n                   )\ntrain.head()","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:21.279127Z","iopub.execute_input":"2023-10-23T20:26:21.279907Z","iopub.status.idle":"2023-10-23T20:26:25.464021Z","shell.execute_reply.started":"2023-10-23T20:26:21.279875Z","shell.execute_reply":"2023-10-23T20:26:25.462915Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"test_file = '/kaggle/input/stanford-ribonanza-rna-folding/test_sequences.csv'\ntest = pd.read_csv(test_file)\ntest.head()","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:25.465669Z","iopub.execute_input":"2023-10-23T20:26:25.466058Z","iopub.status.idle":"2023-10-23T20:26:31.829611Z","shell.execute_reply.started":"2023-10-23T20:26:25.466027Z","shell.execute_reply":"2023-10-23T20:26:31.828799Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train.info()","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:31.830534Z","iopub.execute_input":"2023-10-23T20:26:31.83078Z","iopub.status.idle":"2023-10-23T20:26:31.869269Z","shell.execute_reply.started":"2023-10-23T20:26:31.830758Z","shell.execute_reply":"2023-10-23T20:26:31.867924Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train.columns","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:31.873447Z","iopub.execute_input":"2023-10-23T20:26:31.873737Z","iopub.status.idle":"2023-10-23T20:26:31.880806Z","shell.execute_reply.started":"2023-10-23T20:26:31.873711Z","shell.execute_reply":"2023-10-23T20:26:31.879793Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"reactivity_cols = [\n    col for col in train.columns \n    if bool(re.search('^reactivity_\\d{4}$', col))\n]\n\nreactivity_error_cols = [\n    col for col in train.columns \n    if bool(re.search('^reactivity_error_\\d{4}$', col))\n]\n","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:31.882073Z","iopub.execute_input":"2023-10-23T20:26:31.882416Z","iopub.status.idle":"2023-10-23T20:26:31.897984Z","shell.execute_reply.started":"2023-10-23T20:26:31.882387Z","shell.execute_reply":"2023-10-23T20:26:31.896047Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train[reactivity_cols].info()","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:31.899658Z","iopub.execute_input":"2023-10-23T20:26:31.900123Z","iopub.status.idle":"2023-10-23T20:26:31.958461Z","shell.execute_reply.started":"2023-10-23T20:26:31.90009Z","shell.execute_reply":"2023-10-23T20:26:31.95744Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train.SN_filter.value_counts()","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:38:05.650589Z","iopub.execute_input":"2023-10-23T20:38:05.650966Z","iopub.status.idle":"2023-10-23T20:38:05.660575Z","shell.execute_reply.started":"2023-10-23T20:38:05.650935Z","shell.execute_reply":"2023-10-23T20:38:05.65958Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train[['reads', 'signal_to_noise']].describe()","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:38:37.61799Z","iopub.execute_input":"2023-10-23T20:38:37.619416Z","iopub.status.idle":"2023-10-23T20:38:37.645898Z","shell.execute_reply.started":"2023-10-23T20:38:37.619375Z","shell.execute_reply":"2023-10-23T20:38:37.644727Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"len(train['sequence'])","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:31.959802Z","iopub.execute_input":"2023-10-23T20:26:31.960061Z","iopub.status.idle":"2023-10-23T20:26:31.97359Z","shell.execute_reply.started":"2023-10-23T20:26:31.960039Z","shell.execute_reply":"2023-10-23T20:26:31.972235Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"len(train['sequence'][500])","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:31.975125Z","iopub.execute_input":"2023-10-23T20:26:31.975449Z","iopub.status.idle":"2023-10-23T20:26:31.986266Z","shell.execute_reply.started":"2023-10-23T20:26:31.975422Z","shell.execute_reply":"2023-10-23T20:26:31.985029Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train[reactivity_cols].shape","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:31.987349Z","iopub.execute_input":"2023-10-23T20:26:31.987636Z","iopub.status.idle":"2023-10-23T20:26:32.032506Z","shell.execute_reply.started":"2023-10-23T20:26:31.987614Z","shell.execute_reply":"2023-10-23T20:26:32.031169Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"(~train[reactivity_cols].isnull()).any().values","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:32.033977Z","iopub.execute_input":"2023-10-23T20:26:32.03522Z","iopub.status.idle":"2023-10-23T20:26:32.086747Z","shell.execute_reply.started":"2023-10-23T20:26:32.035152Z","shell.execute_reply":"2023-10-23T20:26:32.085404Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"(~train[reactivity_cols].isnull()).any().sum()","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:32.088085Z","iopub.execute_input":"2023-10-23T20:26:32.088398Z","iopub.status.idle":"2023-10-23T20:26:32.136429Z","shell.execute_reply.started":"2023-10-23T20:26:32.088371Z","shell.execute_reply":"2023-10-23T20:26:32.135337Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"(~train[reactivity_cols].isnull()).any().values.nonzero()","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:32.137678Z","iopub.execute_input":"2023-10-23T20:26:32.137947Z","iopub.status.idle":"2023-10-23T20:26:32.184109Z","shell.execute_reply.started":"2023-10-23T20:26:32.137924Z","shell.execute_reply":"2023-10-23T20:26:32.182948Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"len((~train[reactivity_cols].isnull()).any().values.nonzero()[0])","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:32.1853Z","iopub.execute_input":"2023-10-23T20:26:32.186336Z","iopub.status.idle":"2023-10-23T20:26:32.232423Z","shell.execute_reply.started":"2023-10-23T20:26:32.186311Z","shell.execute_reply":"2023-10-23T20:26:32.23158Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"count_null=0\nfor i in reactivity_cols:\n    print(train[i].isnull().mean())\n    ","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:32.233658Z","iopub.execute_input":"2023-10-23T20:26:32.2339Z","iopub.status.idle":"2023-10-23T20:26:32.287055Z","shell.execute_reply.started":"2023-10-23T20:26:32.233879Z","shell.execute_reply":"2023-10-23T20:26:32.286309Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"non_null_reactivity_vals = [\n    i for i in reactivity_cols if train[i].isnull().mean()!=1\n]","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:32.288451Z","iopub.execute_input":"2023-10-23T20:26:32.289053Z","iopub.status.idle":"2023-10-23T20:26:32.344366Z","shell.execute_reply.started":"2023-10-23T20:26:32.289026Z","shell.execute_reply":"2023-10-23T20:26:32.343082Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"non_null_reactivity_vals","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:32.345674Z","iopub.execute_input":"2023-10-23T20:26:32.346317Z","iopub.status.idle":"2023-10-23T20:26:32.353309Z","shell.execute_reply.started":"2023-10-23T20:26:32.346293Z","shell.execute_reply":"2023-10-23T20:26:32.352614Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train[non_null_reactivity_vals].describe()","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:32.354781Z","iopub.execute_input":"2023-10-23T20:26:32.355136Z","iopub.status.idle":"2023-10-23T20:26:32.887885Z","shell.execute_reply.started":"2023-10-23T20:26:32.355107Z","shell.execute_reply":"2023-10-23T20:26:32.887262Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train['sequence'].apply(len).max()","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:32.888955Z","iopub.execute_input":"2023-10-23T20:26:32.889212Z","iopub.status.idle":"2023-10-23T20:26:32.914096Z","shell.execute_reply.started":"2023-10-23T20:26:32.88919Z","shell.execute_reply":"2023-10-23T20:26:32.913047Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_seqs_len = train['sequence'].apply(len)\ntest_seqs_len = test['sequence'].apply(len)\nprint(f'''\n      \nRNA Sequences Statistics\n\nTrain Data \n___________\n\nMax Sequence Length: {train_seqs_len.max()}\nMin Sequence Length: {train_seqs_len.min()}\nMean Sequence Length: {train_seqs_len.mean()}\nMedian Sequence Length: {train_seqs_len.median()}\nStd of Lengths: {train_seqs_len.std()}\n\n***********************************************************\n\nTest Data\n___________\n\nMax Sequence Length: {test_seqs_len.max()}\nMin Sequence Length: {test_seqs_len.min()}\nMean Sequence Length: {test_seqs_len.mean()}\nMedian Sequence Length: {test_seqs_len.median()}\nStd of Lengths: {test_seqs_len.std()}''')\n\n","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:32.915534Z","iopub.execute_input":"2023-10-23T20:26:32.915872Z","iopub.status.idle":"2023-10-23T20:26:33.197709Z","shell.execute_reply.started":"2023-10-23T20:26:32.915828Z","shell.execute_reply":"2023-10-23T20:26:33.197069Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sequence = train[train[\"sequence_id\"] == \"5f1e97702c64\"]['sequence'][84719]\nsequence","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:33.198444Z","iopub.execute_input":"2023-10-23T20:26:33.198662Z","iopub.status.idle":"2023-10-23T20:26:33.213559Z","shell.execute_reply.started":"2023-10-23T20:26:33.198642Z","shell.execute_reply":"2023-10-23T20:26:33.21209Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"structure = mfe(sequence, package = \"eternafold\")\nstructure","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:33.214721Z","iopub.execute_input":"2023-10-23T20:26:33.215093Z","iopub.status.idle":"2023-10-23T20:26:33.296661Z","shell.execute_reply.started":"2023-10-23T20:26:33.215068Z","shell.execute_reply":"2023-10-23T20:26:33.295574Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# forgi visualizer\nplt.figure(figsize=(10, 10))\nbg = fgb.BulgeGraph.from_fasta_text(f'>rna1\\n{structure}\\n{sequence}')[0]\nfvm.plot_rna(bg, lighten=0.5, text_kwargs = {\"fontweight\":None})\nplt.show();","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:33.301354Z","iopub.execute_input":"2023-10-23T20:26:33.301693Z","iopub.status.idle":"2023-10-23T20:26:34.40369Z","shell.execute_reply.started":"2023-10-23T20:26:33.301667Z","shell.execute_reply":"2023-10-23T20:26:34.402807Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# DAS visualizer\ndraw_struct(sequence, structure)","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:34.404732Z","iopub.execute_input":"2023-10-23T20:26:34.405874Z","iopub.status.idle":"2023-10-23T20:26:36.183546Z","shell.execute_reply.started":"2023-10-23T20:26:34.405814Z","shell.execute_reply":"2023-10-23T20:26:36.182599Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# sequences = train['sequence'].sample(n = 10, replace = False).tolist()\n\n# for sequence in sequences:\n#     draw_struct(sequence,structure)","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:31:01.809191Z","iopub.execute_input":"2023-10-23T20:31:01.809557Z","iopub.status.idle":"2023-10-23T20:31:01.813903Z","shell.execute_reply.started":"2023-10-23T20:31:01.809529Z","shell.execute_reply":"2023-10-23T20:31:01.812958Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"bp_matrix = bpps(sequence, package=\"eternafold\")\nplt.figure(figsize=(10,10))\nplt.title('Base-Pairing Probability NxN Array', fontweight=\"bold\")\nplt.xlabel(\"Sequence Position\", fontweight=\"bold\")\nplt.ylabel(\"Sequence Position\", fontweight=\"bold\")\nplt.imshow(bp_matrix, origin='lower', cmap='magma')\nplt.colorbar(shrink=0.8)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:31:23.315078Z","iopub.execute_input":"2023-10-23T20:31:23.315415Z","iopub.status.idle":"2023-10-23T20:31:23.724631Z","shell.execute_reply.started":"2023-10-23T20:31:23.315393Z","shell.execute_reply":"2023-10-23T20:31:23.723449Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train['experiment_type'].unique()","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:32:12.639472Z","iopub.execute_input":"2023-10-23T20:32:12.639893Z","iopub.status.idle":"2023-10-23T20:32:12.653528Z","shell.execute_reply.started":"2023-10-23T20:32:12.639864Z","shell.execute_reply":"2023-10-23T20:32:12.652089Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_2a3 = train[train['experiment_type']=='2A3_MaP']\ntrain_dms = train[train['experiment_type']=='DMS_MaP']\n\n# train_2a3_seqs_len = train_2a3.apply(len)\n# train_dms_seqs_len = train_dms.apply(len)\ntrain_2a3_seqs_len =  train_2a3.apply(lambda row: len(row))\ntrain_dms_seqs_len =  train_dms.apply(lambda row: len(row))\n\nprint(f'''\n\nRNA Sequences Statistics For Training Data For Each Experiment Type\n\n2A3 Data \n___________\n\nMax Sequence Length: {train_2a3_seqs_len.max()}\nMin Sequence Length: {train_2a3_seqs_len.min()}\nMean Sequence Length: {train_2a3_seqs_len.mean()}\nMedian Sequence Length: {train_2a3_seqs_len.median()}\nStd of Lengths: {train_2a3_seqs_len.std()}\n\n*******************************************************\n\nDMS Data \n___________\n\nMax Sequence Length: {train_dms_seqs_len.max()}\nMin Sequence Length: {train_dms_seqs_len.min()}\nMean Sequence Length: {train_dms_seqs_len.mean()}\nMedian Sequence Length: {train_dms_seqs_len.median()}\nStd of Lengths: {train_dms_seqs_len.std()}\n\n''')\n\n","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:37:09.559454Z","iopub.execute_input":"2023-10-23T20:37:09.559809Z","iopub.status.idle":"2023-10-23T20:37:09.704505Z","shell.execute_reply.started":"2023-10-23T20:37:09.559783Z","shell.execute_reply":"2023-10-23T20:37:09.703078Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_dms[['reads', 'signal_to_noise']].describe()","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:39:25.926304Z","iopub.execute_input":"2023-10-23T20:39:25.926624Z","iopub.status.idle":"2023-10-23T20:39:25.944226Z","shell.execute_reply.started":"2023-10-23T20:39:25.926599Z","shell.execute_reply":"2023-10-23T20:39:25.943222Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train_2a3[['reads', 'signal_to_noise']].describe()","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:39:26.203661Z","iopub.execute_input":"2023-10-23T20:39:26.206096Z","iopub.status.idle":"2023-10-23T20:39:26.230429Z","shell.execute_reply.started":"2023-10-23T20:39:26.206051Z","shell.execute_reply":"2023-10-23T20:39:26.229547Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"### Modeling","metadata":{}},{"cell_type":"code","source":"encode_neuclotide_mapping = \n{\n    'A': [1, 0, 0, 0],\n    'U': [0, 1, 0, 0],\n    'G': [0, 0, 1, 0],\n    'C': [0, 0, 0, 1]}","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:36.67899Z","iopub.status.idle":"2023-10-23T20:26:36.679287Z","shell.execute_reply.started":"2023-10-23T20:26:36.679148Z","shell.execute_reply":"2023-10-23T20:26:36.67916Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"rna_sequence_data = train.copy()\nrna_sequence_data = rna_sequence_data.drop(['sequence_id', 'dataset_name', 'reads', 'SN_filter'], axis=1)\nrna_sequence_data = rna_sequence_data.drop([reactivity_error_cols], axis=1)\n\n# reactivity_error_cols","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:36.680335Z","iopub.status.idle":"2023-10-23T20:26:36.68061Z","shell.execute_reply.started":"2023-10-23T20:26:36.680478Z","shell.execute_reply":"2023-10-23T20:26:36.68049Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"rna_sequence_data","metadata":{"execution":{"iopub.status.busy":"2023-10-23T20:26:36.681369Z","iopub.status.idle":"2023-10-23T20:26:36.681633Z","shell.execute_reply.started":"2023-10-23T20:26:36.681505Z","shell.execute_reply":"2023-10-23T20:26:36.681517Z"},"trusted":true},"execution_count":null,"outputs":[]}]}