-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2_principle.qmd
56 lines (38 loc) · 1.17 KB
/
2_principle.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
---
title: "Principles of compositional data"
format:
html:
code-fold: false
code-tools: true
editor: visual
---
## Example
TBD
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]
```
Visualize 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.
:::