---
title: "Using iModMixData"
author: "Isis Narvaez-Bandera"
date: "`r Sys.Date()`"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Using iModMixData}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

# Introduction


The `iModMixData` package provides example datasets for the `iModMix` package.  
These datasets are preprocessed and ready to use for testing and demonstrating 
the iModMix workflows.  

The datasets include:

- **PartialCorGenes**: partial correlation values between genes (ccRCC4 study)  
- **PartialCorMetabolites**: partial correlation values between metabolites 
(FloresData_K_TK study)  
- **PartialCorProt**: partial correlation values between proteins 
(FloresData_K_TK study)  

These datasets allow users to explore correlation networks and test 
reproducible analysis pipelines.


# Loading the Package

First, load the `iModMixData` package:

```{r load-package} 
library(iModMixData)
```

# Accessing the Data
The package provides functions to access datasets stored in ExperimentHub.

## Load PartialCorGenes
```{r PartialCorGenes, eval=TRUE} 
genes <- loadPartialCorGenes()

# Preview first rows
genes[1:5, 1:5]

# Check dimensions
dim(genes)
```
The PartialCorGenes dataset contains genes as rows and samples as columns.
Each entry represents a partial correlation value of a gene with other genes, 
adjusted for covariates.
Data were preprocessed using load_data() (filtering low-variance features, 
KNN imputation, scaling) and partial correlations were calculated using 
partial_cors().

This dataset can be used to explore gene correlation networks and for 
demonstrating iModMix workflows.

## Load PartialCorMetabolites

```{r PartialCorMetabolites, eval=TRUE}
metabolites <- loadPartialCorMetabolites()
metabolites[1:5, 1:5]
dim(metabolites)
```
The PartialCorMetabolites dataset contains metabolites as rows and samples 
as columns.
Partial correlations can be used to study metabolic networks or integrate with 
other omics datasets.

## Load PartialCorProt

```{r PartialCorProt, eval=TRUE}
proteins <- loadPartialCorProt()
proteins[1:5, 1:5]
dim(proteins)
```
The PartialCorProt dataset contains proteins as rows and samples as columns.
Users can explore protein correlations or use it in multi-omics analyses.

Suggested Uses

- Testing and demonstrating iModMix pipelines
- Exploratory analysis of gene, metabolite, and protein correlations
- Reproducible examples in publications or teaching

# Session Information

```{r sessionInfo, echo=FALSE}
sessionInfo()
```

