Skip to content

Commit b220923

Browse files
committed
cleaning and edits to virion string manip lecture
1 parent f997c08 commit b220923

11 files changed

Lines changed: 124 additions & 153 deletions

File tree

content/lecture/api.pdf

-842 KB
Binary file not shown.

content/lecture/basics.pdf

-244 KB
Binary file not shown.

content/lecture/dplyr.pdf

-344 KB
Binary file not shown.

content/lecture/git.pdf

-199 KB
Binary file not shown.

content/lecture/iteration.pdf

-223 KB
Binary file not shown.

content/lecture/lists.pdf

-330 KB
Binary file not shown.

content/lecture/model.pdf

-558 KB
Binary file not shown.

content/lecture/performance.pdf

-531 KB
Binary file not shown.

content/lecture/style.pdf

-227 KB
Binary file not shown.

content/lecture/virion.Rmd

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,41 +48,29 @@ Download the Virion data from the link below:
4848
> https://github.com/viralemergence/virion/tree/main/Virion
4949
5050

51-
There are many different bits of information, including detection information (how was the host-virus association quantified?), taxonomic information on hosts and viruses, and the host-virus association data. Let's load the entire dataset and get a better idea of the scope and nature of the data
52-
53-
> https://github.com/viralemergence/virion/blob/main/Virion/Virion.csv.gz
54-
55-
is where the data lives. It is compressed to avoid file size limitation on GitHub, but can be read into `R` using base functionality (or using the `vroom` package).
56-
51+
There are many different bits of information, including detection information (how was the host-virus association quantified?), taxonomic information on hosts and viruses, and the host-virus association data. Let's load the entire dataset and get a better idea of the scope and nature of the data. Go to the following link and download the data.
5752

53+
> https://github.com/viralemergence/virion/blob/gh-pages/Virion.csv.gz
5854
55+
It is compressed to avoid file size limitation on GitHub, but can be read into `R` using base functionality.
5956

6057
```{r eval=FALSE}
61-
# if you downloaded the file
58+
6259
virion <- read.delim(gzfile('Virion.csv.gz'))
6360
6461
```
6562

6663

67-
The code below may not work. If it does not, please download the file and read it in using the code above. You will have to change the directory or the path to the file based on what you learned a few lectures ago.
64+
Be sure that you know what you're working directory is and that you are making the call to the right directory. This should help reinforce file path skills that are pretty essential.
6865

69-
```{r}
70-
# reading directly from web resource
71-
con <- gzcon(url("https://github.com/viralemergence/virion/raw/main/Virion/Virion.csv.gz"))
72-
txt <- readLines(con)
73-
virion <- read.delim(textConnection(txt))
74-
75-
```
7666

7767

7868

79-
80-
```{r}
69+
```{r eval=FALSE}
8170
8271
# make an interaction matrix
8372
virionInt <- table(virion$Host, virion$Virus)
8473
85-
8674
dim(virionInt)
8775
8876
# how host-specific are viruses?
@@ -312,6 +300,9 @@ str(seqData)
312300
Notice the slight difference in the structure of the data. How would you actually get at the sequence itself? How is it coded?
313301

314302

303+
304+
305+
315306
Map the numbers in the sequence to the actual characters (a,c,g,t) that they correspond to.
316307

317308
```{r}
@@ -320,6 +311,9 @@ Map the numbers in the sequence to the actual characters (a,c,g,t) that they cor
320311
```
321312

322313

314+
315+
316+
323317
Combine into a single string and tell me how many times the combinations `TAA`, `TAG`, or `TGA` occur in the sequence. These are stop codons.
324318

325319

0 commit comments

Comments
 (0)