---
title: "Part I"
format: 
  html:
    code-fold: false
    code-tools: true
editor: visual
---

::: callout-tip
## Page with R code

This page contains an example template for a lab session, where **R code and results** are displayed here.

You can find more information on how to include code in Quarto website [here](https://quarto.org/docs/reference/cells/cells-knitr.html).

You can experiment with `code-fold` and `code-tools` in the yaml header above to change how the code cells look like.
:::

## A Cancer Modeling Example

Exercise on analysis of miRNA, mRNA and protein data from the paper Aure et al, Integrated analysis reveals microRNA networks coordinately expressed with key proteins in breast cancer, Genome Medicine, 2015.

Please run the code provided to replicate some of the analyses. Make sure you can explain what all the analysis steps do and that you understand all the results.

In addition, there are some extra tasks (`Task 1`), where no R code is provided. Please do these tasks when you have time available at the end of the lab.

### Load the data

Read the data, and convert to matrix format.

```{r}
#| label: load-data
#| warning: false
#| echo: true

mrna <- read.table("data/data_example.txt", header=T, sep="\t", dec=".")

# Convert to matrix format

mrna <- as.matrix(mrna)
```

Print the data

```{r}
#| label: look-at-data
#| warning: false
#| echo: true

mrna[1:4, 1:4]
```

Visualise the overall distribution of expression levels by histogram

```{r}
hist(mrna, nclass=40, xlim=c(-5,5), col="lightblue")
```

::: callout-note
## Task 1

*This is a callout-note, and it can be quite useful for exercises. You can find more about callout [here](https://quarto.org/docs/authoring/callouts.html).*

Example: Extend the above analysis to cover all genes.
:::
