{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.10.12","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"none","dataSources":[{"sourceId":51294,"databundleVersionId":6923401,"sourceType":"competition"},{"sourceId":6822004,"sourceType":"datasetVersion","datasetId":3719560},{"sourceId":7107895,"sourceType":"datasetVersion","datasetId":4098015}],"dockerImageVersionId":30626,"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"bb627df5-e84b-4d42-b922-b386397de308","_cell_guid":"6ad6b828-4053-458d-983a-4497555e45e2","collapsed":false,"execution":{"iopub.status.busy":"2023-12-15T17:07:05.868360Z","iopub.execute_input":"2023-12-15T17:07:05.869020Z","iopub.status.idle":"2023-12-15T17:07:05.876315Z","shell.execute_reply.started":"2023-12-15T17:07:05.868968Z","shell.execute_reply":"2023-12-15T17:07:05.874879Z"},"jupyter":{"outputs_hidden":false},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import os\nimport pandas as pd\nimport numpy as np","metadata":{"_uuid":"4707ce41-d088-4da3-8e7e-f34536c3b0d9","_cell_guid":"1cd83ca5-985f-416c-96d0-fd934c1f2114","collapsed":false,"execution":{"iopub.status.busy":"2023-12-15T17:07:05.879436Z","iopub.execute_input":"2023-12-15T17:07:05.879969Z","iopub.status.idle":"2023-12-15T17:07:05.894777Z","shell.execute_reply.started":"2023-12-15T17:07:05.879931Z","shell.execute_reply":"2023-12-15T17:07:05.893715Z"},"jupyter":{"outputs_hidden":false},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"file_path=\"/kaggle/input/stanford-ribonanza-rna-folding/train_data_QUICK_START.csv\"","metadata":{"_uuid":"d69e3924-1ca2-4f14-90c6-cca2b781949b","_cell_guid":"b0e88f4f-9f5f-4efd-81cd-4d63e42fff74","collapsed":false,"execution":{"iopub.status.busy":"2023-12-15T17:07:05.896943Z","iopub.execute_input":"2023-12-15T17:07:05.898737Z","iopub.status.idle":"2023-12-15T17:07:05.907825Z","shell.execute_reply.started":"2023-12-15T17:07:05.898676Z","shell.execute_reply":"2023-12-15T17:07:05.906535Z"},"jupyter":{"outputs_hidden":false},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df=pd.read_csv(file_path)","metadata":{"_uuid":"7a1ba1ef-e0aa-48dd-a72c-bc77dddf7b09","_cell_guid":"d22ef03a-c2ad-4be0-967b-5aecd3cbfeea","collapsed":false,"execution":{"iopub.status.busy":"2023-12-15T17:07:05.909585Z","iopub.execute_input":"2023-12-15T17:07:05.910877Z","iopub.status.idle":"2023-12-15T17:07:27.528046Z","shell.execute_reply.started":"2023-12-15T17:07:05.910834Z","shell.execute_reply":"2023-12-15T17:07:27.526714Z"},"jupyter":{"outputs_hidden":false},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"bbp_path=\"/kaggle/input/bpp-files-corrected/bpp.csv\"\ndf_bpp=pd.read_csv(bbp_path)","metadata":{"_uuid":"89b4e8e0-4d39-43e0-9e44-20e371cea558","_cell_guid":"a0b4e913-4471-4a28-8d08-6fd05f73f7c4","collapsed":false,"execution":{"iopub.status.busy":"2023-12-15T17:07:55.010251Z","iopub.execute_input":"2023-12-15T17:07:55.010800Z","iopub.status.idle":"2023-12-15T17:07:57.716129Z","shell.execute_reply.started":"2023-12-15T17:07:55.010746Z","shell.execute_reply":"2023-12-15T17:07:57.714807Z"},"jupyter":{"outputs_hidden":false},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_bpp.head(10)","metadata":{"_uuid":"8cf64fe6-8214-4475-8970-69980c179098","_cell_guid":"52ee2941-889c-41fb-9d48-eb1a00ce4f06","collapsed":false,"execution":{"iopub.status.busy":"2023-12-15T17:08:07.209439Z","iopub.execute_input":"2023-12-15T17:08:07.209893Z","iopub.status.idle":"2023-12-15T17:08:07.225725Z","shell.execute_reply.started":"2023-12-15T17:08:07.209860Z","shell.execute_reply":"2023-12-15T17:08:07.224290Z"},"jupyter":{"outputs_hidden":false},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df = pd.merge(df, df_bpp, on=\"sequence_id\")","metadata":{"_uuid":"417241b7-e746-43cc-a8d0-efe1945b1362","_cell_guid":"b56030c9-4c11-45bb-9c6d-603a6383ac44","collapsed":false,"execution":{"iopub.status.busy":"2023-12-15T17:08:19.054488Z","iopub.execute_input":"2023-12-15T17:08:19.054917Z","iopub.status.idle":"2023-12-15T17:08:25.489821Z","shell.execute_reply.started":"2023-12-15T17:08:19.054885Z","shell.execute_reply":"2023-12-15T17:08:25.488487Z"},"jupyter":{"outputs_hidden":false},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.drop(\"Unnamed: 0\", axis=1)","metadata":{"_uuid":"13debe2f-7478-4581-9476-64e3be5b938c","_cell_guid":"158fbe28-ac97-4088-8031-fc4e45fda2ec","collapsed":false,"execution":{"iopub.status.busy":"2023-12-15T17:10:31.945741Z","iopub.execute_input":"2023-12-15T17:10:31.946370Z","iopub.status.idle":"2023-12-15T17:10:33.061642Z","shell.execute_reply.started":"2023-12-15T17:10:31.946322Z","shell.execute_reply":"2023-12-15T17:10:33.060307Z"},"jupyter":{"outputs_hidden":false},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df=df.drop(\"Unnamed: 0\", axis=1)","metadata":{"_uuid":"baeb4cd6-9c06-4eb0-bd72-166396070386","_cell_guid":"6e46e2e0-351f-4305-a3c9-8e8137f4bc83","collapsed":false,"execution":{"iopub.status.busy":"2023-12-15T17:11:59.826121Z","iopub.execute_input":"2023-12-15T17:11:59.826626Z","iopub.status.idle":"2023-12-15T17:12:00.797660Z","shell.execute_reply.started":"2023-12-15T17:11:59.826590Z","shell.execute_reply":"2023-12-15T17:12:00.795871Z"},"jupyter":{"outputs_hidden":false},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.columns","metadata":{"_uuid":"215da18e-f091-4cea-a24b-714818f12afb","_cell_guid":"a40a660b-cbe8-4e3c-bf19-cd66b58add6f","collapsed":false,"jupyter":{"outputs_hidden":false},"execution":{"iopub.status.busy":"2023-12-15T17:21:20.217297Z","iopub.execute_input":"2023-12-15T17:21:20.217882Z","iopub.status.idle":"2023-12-15T17:21:20.227179Z","shell.execute_reply.started":"2023-12-15T17:21:20.217827Z","shell.execute_reply":"2023-12-15T17:21:20.225886Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\"\"\"\"bbp_directories=df[\"path\"]\ndef extract_bpp(seq_id):\n    df[seq_id]\n    \n\n        \n\n    \n    home=/kaggle/input/stanford-ribonanza-rna-folding/Ribonanza_bpp_files/\n    path=home+\"/\"+df[,]\n    \n    \n    \n    \n    #filepath = self.bpp_root_dir + '/' + self.filepaths[idx] + '/' + self.sequence_id[idx] + '.txt'\n\n/kaggle/input/stanford-ribonanza-rna-folding/Ribonanza_bpp_files/extra_data/0/0/0/00257e85caac.txt\"\"\"","metadata":{"_uuid":"e8f46d4c-5ecd-451f-a58f-cfb2cbe36020","_cell_guid":"e70be274-ab55-49fc-92b6-929d1852199e","collapsed":false,"jupyter":{"outputs_hidden":false},"execution":{"iopub.status.busy":"2023-12-15T17:33:11.891557Z","iopub.execute_input":"2023-12-15T17:33:11.892023Z","iopub.status.idle":"2023-12-15T17:33:11.902076Z","shell.execute_reply.started":"2023-12-15T17:33:11.891988Z","shell.execute_reply":"2023-12-15T17:33:11.900456Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\nos.getcwd()","metadata":{"execution":{"iopub.status.busy":"2023-12-15T17:26:27.674130Z","iopub.execute_input":"2023-12-15T17:26:27.674660Z","iopub.status.idle":"2023-12-15T17:26:27.683130Z","shell.execute_reply.started":"2023-12-15T17:26:27.674622Z","shell.execute_reply":"2023-12-15T17:26:27.682058Z"},"trusted":true},"execution_count":null,"outputs":[]}]}