region:us
![License Badge](https://img.shields.io/badge/license-MIT-green)

# 🌌 BioGalacticModels Zoo

## **🔭 Overview**

### **🛰️ Space Biology Datasets And Models Hub**

The frontier of space biology research is vast, with uncharted territories that hide the secrets of life beyond our blue planet. 🌍 With the increasing need for accurate and reliable methods to understand and decode the effects of space on biology, machine learning, particularly transfer learning, emerges as a promising approach. 🧠 This repository serves as a nexus between space biology and computational methodologies, aimed at harnessing the power of transfer learning for space biology applications. 💡

We present to you a comprehensive database of publicly available biomedical datasets and models that can be used to further space-biology research and discovery. 🌠

### **🚀 Purpose and Scope**

This repository is designed to:

1. **Centralize Resources**: 📚 Provide a curated collection of GeneLab datasets tailored for space biology studies, ranging from whole genome sequencing to DNA methylation.
2. **Promote Transfer Learning**: 🎓 Offer pre-trained models suitable for transfer learning.
3. **Streamline Data Processing**: ⚙️ Offer code samples and scripts for efficient dataset management.
4. **Facilitate Collaboration**: 🤝 Foster collaboration amongst researchers in the field.
5. **Reference Architectures**: 🗺️ Navigate through transfer learning architectures with ease.

### **🎯 Intended Audience**

This hub is for:

- **Space Biologists**: 🔬 Integrating computational methodologies.
- **Data Scientists & Machine Learning Enthusiasts**: 💻 Tackling challenges in space biology.
- **Students & Educators**: 📖 Accessing resources for computational space biology.

### **✉️ Contributing and Feedback**

We believe in community-driven science. 💖 Your contributions are warmly welcomed! By joining hands, we can venture further into the mysteries of space biology.

---

🛸 Join us in this interstellar journey of melding computation and space biology, steering the future of life in space.

## 📜 Table of Contents

- [BioGalactic Models](#🌠-biogalactic-models)
- [Datasets](#🧬-datasets)
- [Insights On BioGalacticModels Zoo Usage & Exploration](#💭-insights-on-biogalacticmodels-zoo-usage-&-exploration)
- [Transfer Learning Model Architectures for Space Biology](#🌐-promising-transfer-learning-model-architectures-for-space-biology)
- [Demo: Predicting Viral Host based on Metagenomic Features](#🧪-demo-predicting-viral-host-based-on-metagenomic-features)

---

## 🌠 BioGalactic Models

[BioGalactic Models](https://huggingface.co/spaces/Alfaxad/BioGalacticModels) 🌌 is a dedicated Hugging Face space containing a curated collection of Biology & Biochemistry Foundation Models. 

**Significance to the BioGalactic Model Zoo**:
- **Ready-to-use Models**: 🚀 These models are pre-trained, optimized for transfer learning tasks.
- **Diverse Applications**: 🎯 Focused on Biology & Biochemistry, catering to space biology.
- **Continuous Evolution**: 🔄 As space biology progresses, this space will evolve.

**Impacting Space Biology Exploration**:
The models provide insights driving our understanding of life in space conditions. These include:
- Decoding genomic sequences.
- Predicting protein structures and interactions.
- Analyzing metabolic pathways in space.

---

## 🧬 Datasets

Dive into the curated datasets, specifically tailored for space biology studies. These datasets, coming directly from the vaults of NASA's GeneLab, cover a range of biological investigations relevant to space.

### **Whole Genome Sequencing Datasets**

1. [Microbiome profiling of feces from mice flown on the RR-10 mission](https://osdr.nasa.gov/bio/repo/data/studies/OSD-466)
2. [Metagenome profiling of feces from mice flown on the RR-23 mission](https://osdr.nasa.gov/bio/repo/data/studies/OSD-465)
3. [Whole genome sequencing and assembly of Eukaryotic microbes isolated from ISS environmental surface, Kirovograd region soil, Chernobyl Nuclear Power Plant and Chernobyl Exclusion Zone](https://osdr.nasa.gov/bio/repo/data/studies/OSD-132)
4. [Draft Genome Sequences of novel Agrobacterium genomospecies 3 Associated from the International Space Station](https://osdr.nasa.gov/bio/repo/data/studies/OSD-306)
5. [Metagenomic analysis of feces from mice flown on the RR-6 mission](https://osdr.nasa.gov/bio/repo/data/studies/OSD-249)
6. [Insta-Deep's Multi-species genome dataset](https://huggingface.co/datasets/InstaDeepAI/multi_species_genomes)

### **DNA Methylation Datasets**

1. [Changes in DNA Methylation in Arabidopsis thaliana Plants Exposed Over Multiple Generations to Gamma Radiation](https://osdr.nasa.gov/bio/repo/data/studies/OSD-520)
2. [Characterization of Epigenetic Regulation in an Extraterrestrial Environment: The Arabidopsis Spaceflight Methylome](https://osdr.nasa.gov/bio/repo/data/studies/OSD-217)
3. [Ionizing radiation induces transgenerational effects of DNA methylation in zebrafish](https://osdr.nasa.gov/bio/repo/data/studies/OSD-524)
4. [Methylome Analysis of Arabidopsis Seedlings Exposed to Microgravity](https://osdr.nasa.gov/bio/repo/data/studies/OSD-220)

For an exhaustive list of datasets and other resources, explore [NASA's Open Science Data Repository (OSDR)](https://osdr.nasa.gov/bio/repo/search?q=&data_source=cgene,alsda&data_type=study).



## **Bulk Downloading GeneLab Datasets with genelab-utils**

### **Quick Usage Guide**

# GeneLab utils

Some helper programs for [NASA GeneLab](https://genelab.nasa.gov/), such as `GL-download-GLDS-data` for downloading files from a specific OSD or GLDS ID, and `GL-get-workflow` for downloading workflows used by [GeneLab for processing datasets](https://github.com/nasa/GeneLab_Data_Processing).



## Conda install
The genelab-utils package should be installed with conda/mamba. If you are not familiar with conda, you can find an introduction [here](https://astrobiomike.github.io/unix/conda-intro) if wanted, and if you are not familiar with mamba, there is a super-short introduction on that same page [here](https://astrobiomike.github.io/unix/conda-intro#bonus-mamba-no-5) if wanted – it's definitely worth using mamba if you use conda at all :+1: 

```bash
conda install -c conda-forge -n base mamba

mamba create -n genelab-utils -c conda-forge -c bioconda -c defaults -c astrobiomike genelab-utils

conda activate genelab-utils
```


All programs are prefixed with `GL-` and have a help menu accessible with `-h`. Version info can be accessed with `GL-version`.



## Some example pages
- Programmatically downloading [GLDS data](https://genelab-data.ndc.nasa.gov/genelab/)
  - [`GL-download-GLDS-data`](https://hackmd.io/@astrobiomike/using-genelab-utils-to-download-GLDS-data)  
- Downloading GeneLab workflows
  - [`GL-get-workflow`](https://hackmd.io/@astrobiomike/using-genelab-utils-to-download-workflows)  


---

## 💭 Insights On BioGalacticModels Zoo Usage & Exploration

### **1. Preprocessing**
For transfer learning these biomedical datasets may require various preprocessing steps depending on their source and format:
- **Data Cleaning:** Removing noise and inconsistencies.
- **Normalization:** Scaling features to a standard range.
- **Data Augmentation:** Especially for image datasets, augmenting data can help improve model robustness.
- **Feature Selection/Extraction:** Especially in genomics, where dimensionality can be very high.
- **Handling Imbalances:** In some datasets, certain classes may be underrepresented.
- **Format Conversion:** Datasets might need to be converted to formats compatible with machine learning frameworks.
  
### **3. Potential Multimodal Data Combinations for Space Biology Knowledge Gain**
Combining different types of datasets, like genomic, proteomic, and transcriptomic data, can provide a holistic view of biological systems.
Additionally, integrating imaging data with molecular data can enhance our understanding of spatial-temporal patterns. 
Multi-modal datasets can help discover patterns or signals that might not be evident when analyzing data types in isolation.


#### a. **Genomic & Transcriptomic Data**:
- **Why**: While genomic data (like Whole Genome Sequencing) provides the blueprint of life, transcriptomic data offers insights into gene expression under specific conditions. Combining both can help in understanding the genetic basis of responses to space environments and how genes are expressed differently in space.

#### b. **Proteomic & Metabolomic Data**:
- **Why**: Proteomic data tells us about the proteins produced, while metabolomic data provides information on the small molecules in an organism. Together, they can offer insights into the functional state of cells in space, revealing which proteins are active and what metabolic pathways they're influencing.

#### c. **Transcriptomic & Metabolomic Data**:
- **Why**: This combination can correlate gene expression with metabolic changes. It can be particularly insightful to understand how gene expression changes influence metabolic responses in space conditions.

#### d. **Genomic & Phenotypic Data**:
- **Why**: Connecting the genetic makeup with observable traits (phenotypes) can help in predicting how specific genetic variations might influence an organism's ability to thrive in space.

#### e. **Imaging & Transcriptomic Data**:
- **Why**: While transcriptomic data reveals gene expression, imaging (like MRI or microscopy) can show structural or functional changes in tissues or cells. Combined, they can link gene expression patterns with visual manifestations.

#### f. **Epigenomic & Transcriptomic Data**:
- **Why**: Epigenomic data, like DNA Methylation, reveals changes in gene activity not caused by DNA sequence changes. By combining it with transcriptomic data, one can understand how space conditions might epigenetically influence gene expression.

#### g. **Genomic & Proteomic Data**:
- **Why**: This combination can be used to understand the translation of genes to proteins under space conditions, offering insights into post-transcriptional modifications in space.

#### h. **Environmental Data & Any Biological Data**:
- **Why**: Combining data on the space environment (like radiation levels or microgravity conditions) with any biological dataset can help correlate external conditions with biological responses.

The task of organizing multimodal datasets may face the following challenges:

1. **Data Integration**: Combining data from different sources and modalities can be challenging due to differences in scale, resolution, and format.
2. **Interpretability**: While multi-modal data can provide richer insights, it can also make interpretations complex.
3. **Computational Needs**: Integrating and analyzing multi-modal data often requires robust computational resources and specialized algorithms.

However, the potential insights gained from such combinations, especially in understanding the complex biological responses to space conditions, can be invaluable.
Leveraging transfer learning with models pretrained on diverse biomedical datasets and refined on space biology datasets can significantly boost the knowledge derived from these multi-modal combinations.



---

## 🌐 Promising Transfer Learning Model Architectures for Space Biology

The deep learning domain has birthed numerous architectures tailor-made for transfer learning. These models, having trained on expansive datasets, excel at grasping general features, which can be specialized for niche tasks, such as those in space biology. Here's a selection of architectures ripe for exploration in this challenge:

### 1. **Convolutional Neural Networks (CNNs)**: 
Primarily efficient for image-centric data.
   - **VGG (e.g., VGG16, VGG19)**: Crafted by the Visual Geometry Group, it's a staple for image recognition.
   - **ResNet**: Features skip connections, countering the vanishing gradient dilemma in deep structures.
   - **Inception (or GoogLeNet)**: Employs varied convolution sizes for multi-scale detail capture.
   - **DenseNet**: Innovatively links each layer to every subsequent one in a feed-forward manner.

### 2. **Transformers**: 
Originally for NLP, but have branched out to other areas like imagery.
   - **BERT**: Tailored for NLP, it's versatile for text-oriented tasks.
   - **ViT (Vision Transformer)**: Modifies the transformer design for visual tasks.

### 3. **Recurrent Neural Networks (RNNs)**: 
Best suited for sequences such as time-series or biological sequences.
   - **LSTM**: Counters the standard RNN's vanishing gradient issue.
   - **GRU**: A streamlined LSTM variant.

### 4. **Autoencoders**: 
For unsupervised learning, adept at feature extraction from unlabeled content.
   - **Variational Autoencoders (VAEs)**: Introduces a probabilistic layer to autoencoders, frequently in generative scenarios.

### 5. **Generative Adversarial Networks (GANs)**: 
Ideal for dataset augmentation, synthesizing data resembling the original distribution.

### 6. **U-Net**: 
Conceived for biomedical image segmentation, amalgamating a context-capturing contractive route with a precision-centric expanding one.

### 7. **Capsule Networks**: 
Navigates the spatial hierarchy between simple and intricate objects in visuals, potentially invaluable for intricate biological imaging.

### 8. **EfficientNet**: 
Balances network breadth, depth, and clarity using fixed scaling coefficients, creating potentially smaller yet more precise models.

### 9. **BioBERT**: 
A BERT variant pre-trained on biomedical datasets, apt for biology-centered tasks.

### 10. **AlphaFold**: 
By DeepMind, it revolutionizes protein structure prediction, a seminal biological conundrum.

### **Recommendations**:
- For the unique aspects of space biology, initiating with biomedically proven architectures like U-Net could be fruitful.
- LSTMs or GRUs, being RNN derivatives, could be promising for genomic or other sequential datasets.
- GANs might be instrumental for data augmentation or crafting synthetic examples to enrich datasets.
- For challenges surrounding protein structures or other molecular biology facets, models like AlphaFold are worthy contenders.


---

## 🧪 Demo: Predicting Viral Host based on Metagenomic Features

In this repository,we also explore a demo using metagenomic features extracted from viral genomes to predict the virus host. Features include Genome size, GC%, and count of CDS. These serve as the independent variables to predict the viral host.

An SVM (Support Vector Machine) model is used, achieving an accuracy rate of 86%. Dive deeper into the methods, data preprocessing, and results [here](https://huggingface.co/datasets/Alfaxad/Space-Biology-Model-Zoo/blob/main/viral_host_demo/predict-viral-host-based-on-meta-genomic-features.ipynb).
