Skip to content

Commit

Permalink
Add line numbering
Browse files Browse the repository at this point in the history
  • Loading branch information
JSBoey committed Aug 28, 2024
1 parent 7680c45 commit 3a62f12
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ First, we import our `R` libraries with the `library()` command. For this workfl

!!! r-project "code"

```R
```R linenums="1"
# Set working directory
setwd('/nesi/nobackup/nesi02659/MGSS_U/<YOUR FOLDER>/11.data_presentation/cazy_heatmap/')

Expand Down Expand Up @@ -67,7 +67,7 @@ This process is done using the `group_by` and `tally` functions from `dplyr`, ag

!!! r-project "code"

```R
```R linenums="1"
cazy_tally <- cazy %>%
mutate(cazy_id = str_remove(cazy_id, "_.*")) %>%
group_by(bin, cazy_id) %>%
Expand Down Expand Up @@ -108,7 +108,7 @@ We now have a data.frame-like object (a [tibble](https://tibble.tidyverse.org/))

!!! r-project "code"

```R
```R linenums="1"
cazy_matrix <- cazy_tally %>%
pivot_wider(names_from = "bin", values_from = "hits", values_fill = 0) %>%
arrange(cazy_id) %>%
Expand All @@ -123,7 +123,7 @@ Finally, we create the actual plot by passing this matrix into the `pheatmap` li

!!! r-project "code"

```R
```R linenums="1"
# Set cell colours
colours <- viridis(n = 100)

Expand Down

0 comments on commit 3a62f12

Please sign in to comment.