Week 3 - Homework

week03
homework

Write your code directly in a Quarto document.

To create a Quarto document: go to File -> New File -> Quarto Document, then click Create.

  1. Create a matrix of two columns to store numbers 1 to 8, use the dimnames parameter of the matrix function to name the rows and columns directly. (see ?matrix) (You can name the rows/columns whatever you want.)

Use the following code to import the file “read-counts.csv” (you have already downloaded it for the hand-on examples of week01). Name the imported data expr_data.

expr_data <- read.table(
  file = "../exos_data/read-counts.csv",  # replace the path with your own
  header = TRUE, sep = ",", row.names = 1
)
  1. Create a list info_expr to store information about expr_data:
  1. Calculate the median of the average gene expression levels across all samples.
  1. Use summary() to generate summary statistics of the sum of expression level across all genes.
  1. Calculate the log2 fold change of the gene TOS6 for the WT and RRP6 samples. Is TOS6 up or down-regulated in the RRP6 samples compared to WT?
  1. Perform a Wilcoxon test to check if the TOS6 expression is different between WT and RRP6 samples.
  1. Visualize the expression level of TOS6 for WT and RRP6 samples using boxplot.
  1. Click “Render” to generate your Quarto report.

The homework correction is available here: link