rm(list = ls()) # clean-up workspace
library("tidyverse")
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✓ ggplot2 3.3.5     ✓ purrr   0.3.4
## ✓ tibble  3.1.5     ✓ dplyr   1.0.7
## ✓ tidyr   1.1.4     ✓ stringr 1.4.0
## ✓ readr   2.0.1     ✓ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag()    masks stats::lag()

In this lab, we practice reading data from a PDF file and extract information from strings.

Here is a reference that you could follow.

The pdf file “gisaid_id_table.pdf” has information about COVID_19 sequences that contain certain mutations.

The task is to extract all of the Accesssion IDs from the pdf file.

In the end, output a text file as “EPI_ids.txt” that contains all the accession ids.

Good luck!

writeLines(readLines("EPI_ids.txt", 10))
## EPI_id
## EPI_ISL_417765
## EPI_ISL_418332
## EPI_ISL_420159
## EPI_ISL_421690
## EPI_ISL_424369
## EPI_ISL_424372
## EPI_ISL_426794
## EPI_ISL_432503
## EPI_ISL_432511