{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"name":"python","version":"3.7.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":"# What is about ?\n\n\nCD-hit is popular sequence clustering algorithm.\n\nIt is not straigtfordforward to install it on Kaggle, here is is an example how to do it - thanks to Arthur Zalevsky \n\n","metadata":{}},{"cell_type":"code","source":"import os","metadata":{"execution":{"iopub.status.busy":"2023-07-25T07:41:54.689727Z","iopub.execute_input":"2023-07-25T07:41:54.691409Z","iopub.status.idle":"2023-07-25T07:41:54.730124Z","shell.execute_reply.started":"2023-07-25T07:41:54.691350Z","shell.execute_reply":"2023-07-25T07:41:54.728690Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!wget https://github.com/weizhongli/cdhit/releases/download/V4.8.1/cd-hit-v4.8.1-2019-0228.tar.gz\n!tar -xf cd-hit-v4.8.1-2019-0228.tar.gz","metadata":{"execution":{"iopub.status.busy":"2023-07-25T07:41:54.733006Z","iopub.execute_input":"2023-07-25T07:41:54.733840Z","iopub.status.idle":"2023-07-25T07:41:57.613801Z","shell.execute_reply.started":"2023-07-25T07:41:54.733795Z","shell.execute_reply":"2023-07-25T07:41:57.611922Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"os.chdir(\"/kaggle/working/cd-hit-v4.8.1-2019-0228\")\n!make -j 4\nos.chdir(\"/kaggle/working\")","metadata":{"execution":{"iopub.status.busy":"2023-07-25T07:41:57.615749Z","iopub.execute_input":"2023-07-25T07:41:57.616287Z","iopub.status.idle":"2023-07-25T07:42:06.392415Z","shell.execute_reply.started":"2023-07-25T07:41:57.616222Z","shell.execute_reply":"2023-07-25T07:42:06.390689Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"!/kaggle/working/cd-hit-v4.8.1-2019-0228/cd-hit -h","metadata":{"execution":{"iopub.status.busy":"2023-07-25T07:42:06.397429Z","iopub.execute_input":"2023-07-25T07:42:06.398098Z","iopub.status.idle":"2023-07-25T07:42:07.516308Z","shell.execute_reply.started":"2023-07-25T07:42:06.398048Z","shell.execute_reply":"2023-07-25T07:42:07.514986Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"# And for parsing the output\n# https://pypi.org/project/cdhit-reader/\n!pip install cdhit-reader\nimport cdhit_reader\n","metadata":{"execution":{"iopub.status.busy":"2023-07-25T07:42:07.517948Z","iopub.execute_input":"2023-07-25T07:42:07.518932Z","iopub.status.idle":"2023-07-25T07:42:25.767635Z","shell.execute_reply.started":"2023-07-25T07:42:07.518848Z","shell.execute_reply":"2023-07-25T07:42:25.766006Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{"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"}}