9.4 Exercise 3

We will start from gtf object.

Read it as follows, if it is not in your environment:

gtf <- read_csv("DataViz_source_files-main/files/gencode.v44.annotation.csv")
  1. Rename column chr to Chromosome. Assign to a new object.
correction
gtf2 <- rename(gtf, chromosome=chr)


2. Keep only rows corresponding to the + strand and to chromosome chr4. assign to a new object.

correction
gtf3 <- filter(gtf2, strand=="+" & chromosome=="chr4")


  1. Select only columns gene_symbol and gene_type.
correction
gtf4 <- select(gtf3, gene_symbol, gene_type)