{"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":"Published on April 21, 2023. By Marília Prata, mpwolke ","metadata":{}},{"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)\nimport matplotlib.pyplot as plt\nimport seaborn as sns\n\nimport warnings\nwarnings.filterwarnings(\"ignore\")\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\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\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":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2023-04-21T19:55:37.387526Z","iopub.execute_input":"2023-04-21T19:55:37.38842Z","iopub.status.idle":"2023-04-21T19:55:38.457337Z","shell.execute_reply.started":"2023-04-21T19:55:37.388369Z","shell.execute_reply":"2023-04-21T19:55:38.455998Z"},"_kg_hide-input":true,"_kg_hide-output":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"On my first Notebook (on this competition), I felt so overwhelmed dealing with fasta file and the other (obo) one that I even have noticed what was on the tsv tables.\n\nThen, after reading Chervov's EDA I \"met\" Danio rerio one of my first Notebooks subjects on Kaggle which a learned a lot with the Zebrafish.\n\nTherefore, this work is dedicated to Danio rerio and all Researchers that make Science and Data Science possible with their findings.","metadata":{}},{"cell_type":"markdown","source":"#Zebrafish (Danio rerio)\n\n\"The zebrafish (Danio rerio) is a freshwater fish belonging to the minnow family (Cyprinidae) of the order Cypriniformes. Native to South Asia, it is a popular aquarium fish, frequently sold under the trade name zebra danio (and thus often called a \"tropical fish\" although both tropical and subtropical). It is also found in private ponds.\"\n\n\"The zebrafish is an important and widely used vertebrate model organism in scientific research, for example in drug development, in particular pre-clinical development. It is also notable for its regenerative abilities, and has been modified by researchers to produce many transgenic strains.\"\n\nhttps://en.wikipedia.org/wiki/Zebrafish","metadata":{}},{"cell_type":"markdown","source":"![](https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcSyDFbd3XRG9SrYB95RJTpI11D7ChCMFY5EuIOa6h5hN7pJqHtH)","metadata":{}},{"cell_type":"markdown","source":"#Competition Citation\n\n@misc{cafa-5-protein-function-prediction,\n\n    author = {Addison Howard, Clara De Paolis, Damiano Piovesan, HCL-Rantig, Iddo Friedberg, inversion,\n    \n    Parnal Joshi, Predrag Radivojac},\n    \n    title = {CAFA 5 Protein Function Prediction},\n    \n    publisher = {Kaggle},\n    \n    year = {2023},\n    \n    url = {https://kaggle.com/competitions/cafa-5-protein-function-prediction}","metadata":{}},{"cell_type":"code","source":"tax = pd.read_csv('../input/cafa-5-protein-function-prediction/Test (Targets)/testsuperset-taxon-list.tsv', sep='\\t', error_bad_lines=False, encoding= 'unicode_escape')\ntax.head()","metadata":{"execution":{"iopub.status.busy":"2023-04-21T20:02:10.832903Z","iopub.execute_input":"2023-04-21T20:02:10.83412Z","iopub.status.idle":"2023-04-21T20:02:10.872753Z","shell.execute_reply.started":"2023-04-21T20:02:10.834039Z","shell.execute_reply":"2023-04-21T20:02:10.871952Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"tax.shape","metadata":{"execution":{"iopub.status.busy":"2023-04-21T20:02:56.050796Z","iopub.execute_input":"2023-04-21T20:02:56.051519Z","iopub.status.idle":"2023-04-21T20:02:56.058644Z","shell.execute_reply.started":"2023-04-21T20:02:56.051481Z","shell.execute_reply":"2023-04-21T20:02:56.057563Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"#Code by Taha07  https://www.kaggle.com/taha07/data-scientists-jobs-analysis-visualization/notebook\n\nfrom wordcloud import WordCloud\nfrom wordcloud import STOPWORDS\nstopwords = set(STOPWORDS)\nwordcloud = WordCloud(background_color = 'purple',\n                      height =2000,\n                      width = 2000\n                     ).generate(str(tax[\"Species\"]))\nplt.rcParams['figure.figsize'] = (12,12)\nplt.axis(\"off\")\nplt.imshow(wordcloud)\nplt.title(\"Taxonomy List\")\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2023-04-21T20:07:55.441725Z","iopub.execute_input":"2023-04-21T20:07:55.442219Z","iopub.status.idle":"2023-04-21T20:07:58.450035Z","shell.execute_reply.started":"2023-04-21T20:07:55.442183Z","shell.execute_reply":"2023-04-21T20:07:58.449073Z"},"_kg_hide-input":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#No sign of Danio rerio above","metadata":{}},{"cell_type":"code","source":"dan = tax[(tax['Species']=='Danio rerio[All Names]')].reset_index(drop=True)\ndan.head()","metadata":{"execution":{"iopub.status.busy":"2023-04-21T20:14:02.364069Z","iopub.execute_input":"2023-04-21T20:14:02.365011Z","iopub.status.idle":"2023-04-21T20:14:02.377212Z","shell.execute_reply.started":"2023-04-21T20:14:02.364969Z","shell.execute_reply":"2023-04-21T20:14:02.3758Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"train = pd.read_csv('../input/cafa-5-protein-function-prediction/Train/train_taxonomy.tsv', sep='\\t', error_bad_lines=False)\ntrain.head()","metadata":{"execution":{"iopub.status.busy":"2023-04-21T20:26:07.727516Z","iopub.execute_input":"2023-04-21T20:26:07.728582Z","iopub.status.idle":"2023-04-21T20:26:07.834256Z","shell.execute_reply.started":"2023-04-21T20:26:07.728537Z","shell.execute_reply":"2023-04-21T20:26:07.833101Z"},"_kg_hide-output":true,"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Reasons why Danio rerio is used in research\n\n<iframe width=\"942\" height=\"530\" src=\"https://www.youtube.com/embed/6wx2B55kEN0\" title=\"5 reasons why zebrafish are used in research\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen></iframe>\n\nhttps://www.youtube.com/watch?v=6wx2B55kEN0","metadata":{}},{"cell_type":"code","source":"train[\"taxonomyID\"].value_counts()","metadata":{"execution":{"iopub.status.busy":"2023-04-21T20:45:25.254496Z","iopub.execute_input":"2023-04-21T20:45:25.254884Z","iopub.status.idle":"2023-04-21T20:45:25.265685Z","shell.execute_reply.started":"2023-04-21T20:45:25.254849Z","shell.execute_reply":"2023-04-21T20:45:25.264567Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Above: Danio rerio entries: 12671","metadata":{}},{"cell_type":"code","source":"#By Rob Mulla https://www.kaggle.com/code/robikscube/sign-language-recognition-eda-twitch-stream\n\nfig, ax = plt.subplots(figsize=(4, 4))\ntrain[\"taxonomyID\"].value_counts().head(20).sort_values(ascending=True).plot(\n    kind=\"barh\", color='blue', ax=ax, title=\"Species entries\"\n)\nax.set_xlabel(\"Number of Training Examples\")\nplt.show()","metadata":{"_kg_hide-input":true,"execution":{"iopub.status.busy":"2023-04-21T21:10:18.816413Z","iopub.execute_input":"2023-04-21T21:10:18.817609Z","iopub.status.idle":"2023-04-21T21:10:19.116161Z","shell.execute_reply.started":"2023-04-21T21:10:18.817563Z","shell.execute_reply":"2023-04-21T21:10:19.114863Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#Danio rerio is the 4th in number of entries (total 12671)","metadata":{}},{"cell_type":"code","source":"zebrafish = train[(train['taxonomyID']==7955)].reset_index(drop=True)\nzebrafish.head()","metadata":{"execution":{"iopub.status.busy":"2023-04-21T21:05:36.43723Z","iopub.execute_input":"2023-04-21T21:05:36.437662Z","iopub.status.idle":"2023-04-21T21:05:36.455299Z","shell.execute_reply.started":"2023-04-21T21:05:36.437624Z","shell.execute_reply":"2023-04-21T21:05:36.453984Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"#No double ticks when we're dealing with numbers\n\n#Above, the same taxonomyID of Danio rerio (zebrafish) has different EntryIds.  ","metadata":{}},{"cell_type":"markdown","source":"#Zebrafish and Episodic Memory\n\n\"In 2015, a study was published about zebrafishes' capacity for episodic memory. The individuals showed a capacity to remember context with respect to objects, locations and occasions (what, when, where). Episodic memory is a capacity of explicit memory systems, typically associated with conscious experience.\"\n\nhttps://en.wikipedia.org/wiki/Zebrafish","metadata":{"execution":{"iopub.status.busy":"2023-04-21T20:46:27.42335Z","iopub.execute_input":"2023-04-21T20:46:27.424521Z","iopub.status.idle":"2023-04-21T20:46:27.783564Z","shell.execute_reply.started":"2023-04-21T20:46:27.424464Z","shell.execute_reply":"2023-04-21T20:46:27.782419Z"}}},{"cell_type":"markdown","source":"#Zebrafish (Danio rerio) rock!\n\n![](https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcTfjL1dUUo8e8nWAya4vNlBxAwb653BE3PZIA0DqEEVGgui9ws2)twitter","metadata":{}},{"cell_type":"markdown","source":"#Reasons why zebrafish are used in Research\n\nZebrafish and Humans share similar Genes\n\nZebrafish are easy to care for\n\nZebrafish are easy to breed\n\nZebrafish grow quickly\n\nZebrafish are transparent (allow us to see the changes during development)","metadata":{}}]}