{"cells":[{"metadata":{},"cell_type":"markdown","source":"For introduction, I made overview of the organelle to be predicted and the data are summarized."},{"metadata":{},"cell_type":"markdown","source":"---------------------"},{"metadata":{},"cell_type":"markdown","source":"# Background\n\nThe labels we will predict are following integers. The map is,"},{"metadata":{},"cell_type":"markdown","source":"0. Nucleoplasm\n1. Nuclear membrane\n2. Nucleoli\n3. Nucleoli fibrillar center\n4. Nuclear speckles\n5. Nuclear bodies\n6. Endoplasmic reticulum\n7. Golgi apparatus\n8. Intermediate filaments\n9. Actin filaments \n10. Microtubules\n11. Mitotic spindle\n12. Centrosome\n13. Plasma membrane\n14. Mitochondria\n15. Aggresome\n16. Cytosol\n17. Vesicles and punctate cytosolic patterns\n18. Negative"},{"metadata":{},"cell_type":"markdown","source":"Here is a brief description and link for each of the 0~16."},{"metadata":{},"cell_type":"markdown","source":"## [Nucleoplasm](https://www.britannica.com/science/nucleus-biology#ref242881)\n\nMain function is to store DNA and facilitate an isolated environment where controlled transcription and gene regulation is enabled. Nucleoplasm is in nucleus."},{"metadata":{},"cell_type":"markdown","source":"## [Nuclear membrane](https://en.wikipedia.org/wiki/Nuclear_envelope)\n\nMade up by two lipid bilayer membranes which in eukaryotic cells surrounds the nucleus, which encases the genetic material."},{"metadata":{},"cell_type":"markdown","source":"## [Nucleoli](https://en.wikipedia.org/wiki/Nucleolus)\n\nThe largest structure in the nucleus of eukaryotic cells. It is best known as the site of ribosome biogenesis."},{"metadata":{},"cell_type":"markdown","source":"## [Nucleoli fibrillar center](https://en.wikipedia.org/wiki/Nucleolus#Structure)\n\nTranscription of the rDNA occurs in fibrillar center.\n\n[Picture](https://www.proteinatlas.org/news/2016-07-22/image-of-the-week-nucleoli-fibrillar-center)"},{"metadata":{},"cell_type":"markdown","source":"## [Nuclear speckles](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3039535/#:~:text=Nuclear%20speckles%2C%20also%20known%20as,the%20nucleoplasm%20of%20mammalian%20cells.)\n\nProtein found in these speckles serves as a reservoir of factors that participate in transcription and pre-mRNA processing. \n"},{"metadata":{},"cell_type":"markdown","source":"## [Nuclear bodies](https://en.wikipedia.org/wiki/Nuclear_bodies#:~:text=Nuclear%20bodies%20(also%20known%20as,Nuclear%20bodies%20also%20include%20ND10s.))\n\nMembraneless structures found in the cell nuclei of eukaryotic cells."},{"metadata":{},"cell_type":"markdown","source":"## [Endoplasmic reticulum](https://en.wikipedia.org/wiki/Endoplasmic_reticulum)\n\nThe endoplasmic reticulum serves many general functions, including the folding of protein molecules in sacs called cisternae and the transport of synthesized proteins in vesicles to the Golgi apparatus."},{"metadata":{},"cell_type":"markdown","source":"## [Golgi apparatus](https://en.wikipedia.org/wiki/Golgi_apparatus)\n\nThe Golgi apparatus is a major collection and dispatch station of protein products received from the endoplasmic reticulum. "},{"metadata":{},"cell_type":"markdown","source":"## [Intermediate filaments](https://en.wikipedia.org/wiki/Intermediate_filament)\n\nPlay basically a structural role by providing mechanical strength to cells and tissues."},{"metadata":{},"cell_type":"markdown","source":"## [Microfilament](https://en.wikipedia.org/wiki/Microfilament)\n\nProtein filaments in the cytoplasm of eukaryotic cells that form part of the cytoskeleton. "},{"metadata":{},"cell_type":"markdown","source":"## [Microtubules](https://en.wikipedia.org/wiki/Microtubule)\n\nPolymers of tubulin that form part of the cytoskeleton and provide structure and shape to eukaryotic cells."},{"metadata":{},"cell_type":"markdown","source":"## [Mitotic spindle](https://en.wikipedia.org/wiki/Spindle_apparatus)\n\nThe cytoskeletal structure of eukaryotic cells that forms during cell division to separate sister chromatids between daughter cells."},{"metadata":{},"cell_type":"markdown","source":"## [Centrosome](https://en.wikipedia.org/wiki/Centrosome)\n\nRegulator of cell-cycle progression"},{"metadata":{},"cell_type":"markdown","source":"## [Plasma membrane](https://www.genome.gov/genetics-glossary/Plasma-Membrane#:~:text=The%20plasma%20membrane%2C%20also%20called,membrane%20on%20its%20outside%20surface.)\n\nThe plasma membrane consists of a lipid bilayer that is semipermeable. The plasma membrane regulates the transport of materials entering and exiting the cell by embedded proteins."},{"metadata":{},"cell_type":"markdown","source":"## [Mitochondria](https://www.genome.gov/genetics-glossary/Mitochondria)\n\nGenerate most of the chemical energy needed to power by the cell's biochemical reactions. "},{"metadata":{},"cell_type":"markdown","source":"## [Aggresome](https://en.wikipedia.org/wiki/Aggresome#:~:text=In%20eukaryotic%20cells%2C%20an%20aggresome,proteins%20into%20a%20single%20location.)\n\nAn aggregation of misfolded proteins in the cell."},{"metadata":{},"cell_type":"markdown","source":"## [Cytosol](https://biologydictionary.net/cytosol/#:~:text=Cytosol%20is%20the%20liquid%20found,of%20life%20to%20take%20place.)\n\nThe liquid fills inside of cells."},{"metadata":{},"cell_type":"markdown","source":"---------------------"},{"metadata":{"trusted":true},"cell_type":"code","source":"import os\n\nimport matplotlib.pyplot as plt\nimport numpy as np\nimport pandas as pd\nfrom PIL import Image\nimport seaborn as sns","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"DATA = \"../input/hpa-single-cell-image-classification/\"","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"# About Data"},{"metadata":{"trusted":true},"cell_type":"code","source":"!ls ../input/hpa-single-cell-image-classification","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"We can know ID of train data and its' labels with train.csv."},{"metadata":{"trusted":true},"cell_type":"code","source":"train = pd.read_csv(DATA + \"train.csv\")\ntrain.head(10)","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"We can know ID of test data for predict."},{"metadata":{"trusted":true},"cell_type":"code","source":"sub = pd.read_csv(DATA + \"sample_submission.csv\")\nsub.head(10)","execution_count":null,"outputs":[]},{"metadata":{},"cell_type":"markdown","source":"# Visualize images"},{"metadata":{"trusted":true},"cell_type":"code","source":"def show_train_images(id:str):\n    \"\"\"Show 4 kinds images in train directory.\n    \"\"\"\n    \n    blue_img = Image.open(DATA + \"train/\" + f\"{id}_blue.png\")\n    red_img = Image.open(DATA + \"train/\" + f\"{id}_red.png\")\n    yellow_img = Image.open(DATA + \"train/\" + f\"{id}_yellow.png\")\n    green_img = Image.open(DATA + \"train/\" + f\"{id}_green.png\")\n    \n    fig, axs = plt.subplots(2, 2,  figsize=(15,15))\n    \n    axs[0][0].imshow(blue_img)\n    axs[0][0].set_title(f\"nucleus - {id}\")\n    axs[1][0].imshow(red_img)\n    axs[1][0].set_title(f\"microtubules - {id}\")\n    axs[0][1].imshow(yellow_img)\n    axs[0][1].set_title(f\"endoplasmic reticulum - {id}\")\n    axs[1][1].imshow(green_img)\n    axs[1][1].set_title(f\"the protein of interest - {id}\")","execution_count":null,"outputs":[]},{"metadata":{"trusted":true},"cell_type":"code","source":"show_train_images(train.iloc[0][\"ID\"])","execution_count":null,"outputs":[]}],"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":4,"nbformat_minor":4}