{"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"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"markdown","source":"# eterna_openknot_metadata name HistPlot","metadata":{"papermill":{"duration":0.004154,"end_time":"2023-01-24T07:36:26.925718","exception":false,"start_time":"2023-01-24T07:36:26.921564","status":"completed"},"tags":[]}},{"cell_type":"code","source":"import numpy as np\nimport pandas as pd\nimport os\nimport matplotlib.pyplot as plt\nimport seaborn as sns\nfrom tqdm import tqdm\nimport warnings\nwarnings.filterwarnings(\"ignore\")","metadata":{"_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","papermill":{"duration":1.189497,"end_time":"2023-01-24T07:36:28.118361","exception":false,"start_time":"2023-01-24T07:36:26.928864","status":"completed"},"tags":[],"execution":{"iopub.status.busy":"2023-09-13T06:51:31.357056Z","iopub.execute_input":"2023-09-13T06:51:31.358184Z","iopub.status.idle":"2023-09-13T06:51:31.363462Z","shell.execute_reply.started":"2023-09-13T06:51:31.358144Z","shell.execute_reply":"2023-09-13T06:51:31.362439Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"paths=[]\nfor dirname, _, filenames in os.walk('/kaggle/input/stanford-ribonanza-rna-folding/eterna_openknot_metadata'):\n    for filename in filenames:\n        paths+=[(os.path.join(dirname, filename))]","metadata":{"execution":{"iopub.status.busy":"2023-09-13T06:51:31.365902Z","iopub.execute_input":"2023-09-13T06:51:31.366696Z","iopub.status.idle":"2023-09-13T06:51:31.376598Z","shell.execute_reply.started":"2023-09-13T06:51:31.366662Z","shell.execute_reply":"2023-09-13T06:51:31.375454Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"for path in paths:\n    data=pd.read_csv(path, sep='\\t', error_bad_lines=False)\n    display(data[0:3])","metadata":{"execution":{"iopub.status.busy":"2023-09-13T06:51:31.380484Z","iopub.execute_input":"2023-09-13T06:51:31.381058Z","iopub.status.idle":"2023-09-13T06:51:35.868472Z","shell.execute_reply.started":"2023-09-13T06:51:31.381024Z","shell.execute_reply":"2023-09-13T06:51:35.867379Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\nfor i in range(len(paths)):\n    path=paths[i]\n    print(path.split('/')[-1])\n    data0=pd.read_csv(path, sep='\\t', error_bad_lines=False)\n    cols=data0.columns.tolist()\n    #print(cols)\n    print(sorted(data0['name'].unique().tolist()))\n    data=data0\n    fig, ax = plt.subplots(figsize=(16,4))\n    sns.histplot(data['name'], label='name', ax=ax, color='C1', bins=40)\n    ax.legend()\n    ax.grid()\n    ax.tick_params(axis='x', labelrotation=90)\n    plt.show()","metadata":{"execution":{"iopub.status.busy":"2023-09-13T06:51:35.870360Z","iopub.execute_input":"2023-09-13T06:51:35.870747Z","iopub.status.idle":"2023-09-13T06:51:45.437939Z","shell.execute_reply.started":"2023-09-13T06:51:35.870712Z","shell.execute_reply":"2023-09-13T06:51:45.437031Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}],"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"}}