Skip to content

Commit

Permalink
Candace and Daniel pair programming
Browse files Browse the repository at this point in the history
  • Loading branch information
cansavvy committed Feb 21, 2024
1 parent 8aeeec1 commit caa4688
Showing 1 changed file with 22 additions and 13 deletions.
35 changes: 22 additions & 13 deletions vignettes/getting-started.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,26 @@ knitr::opts_chunk$set(

# gimap tutorial

TODO: Describe what this genetic interaction analysis actually is and why someone would want to do it.

```{r}
library(magrittr)
library(gimap)
```

```{r}
example_data <- example_data()
## Data requirements

TODO: What kind of data would someone need to run this? How much flexibility is there in what the experimental set up might look like?

# Let's examine this example pgPEN counts table. It's divided into columns containing:
# - an ID corresponding to the names of paired guides
# - gRNA sequence 1, targeting "paralog A"
# - gRNA sequence 2, targeting "paralog B"
# - The sample, day, and replicate number for which gRNAs were sequenced
Let's examine this example pgPEN counts table. It's divided into columns containing:

- an ID corresponding to the names of paired guides
- gRNA sequence 1, targeting "paralog A"
- gRNA sequence 2, targeting "paralog B"
- The sample, day, and replicate number for which gRNAs were sequenced

```{r}
example_data <- gimap::example_data()
example_data
```
Expand All @@ -41,9 +48,9 @@ colnames(example_data)

We're going to set up three datasets. The first is required, it's the counts that the genetic interaction analysis will be used for.

```{r}
## The first data set contains the readcounts from each sample type. Required for analysis is a Day 0 (or plasmid) sample, and at least one further timepoint sample. QC analysis will follow to correlate replicates if inputted. Comparison of early and late timepoints is possible in this function, but not required if early timepoints were not taken.
The first data set contains the readcounts from each sample type. Required for analysis is a Day 0 (or plasmid) sample, and at least one further timepoint sample. QC analysis will follow to correlate replicates if inputted. Comparison of early and late timepoints is possible in this function, but not required if early timepoints were not taken.

```{r}
example_counts <- example_data %>%
dplyr::select(c("Day00_RepA", "Day05_RepA", "Day22_RepA", "Day22_RepB", "Day22_RepC")) %>%
as.matrix()
Expand All @@ -54,15 +61,17 @@ The next two datasets are metadata that describe the dimensions of the count dat
- The sizes of these metadata must correspond to the dimensions of the counts data.
- The first column of the pg_metadata must be a unique id

`pg_metadata` is the information that describes the paired guide RNA targets. This information contains a table of the paired guide RNA sequences and the corresponding paralog gene that is being targeted for cutting by the gRNA-Cas9 complex.

```{r}
# pg metadata is the information that describes the paired guide RNA targets. This information contains a table of the paired guide RNA sequences and the corresponding paralog gene that is being targeted for cutting by the gRNA-Cas9 complex.
example_pg_metadata <- example_data %>%
dplyr::select(c("id", "seq_1", "seq_2"))
```

# sample metadata is the information that describes timepoint information and replicate information relating to each sample. In general, two replicates at each timepoint are carried through to analysis, where they are later collapsed.
`sample_metadata` is the information that describes timepoint information and replicate information relating to each sample. In general, two replicates at each timepoint are carried through to analysis, where they are later collapsed.

```{r}
example_sample_metadata <- data.frame(
id = 1:5,
day = as.factor(c("Day00", "Day05", "Day22", "Day22", "Day22")),
Expand All @@ -73,7 +82,7 @@ example_sample_metadata <- data.frame(
Now let's setup our data using `setup_data()`. Optionally we can provide the metadata in this function as well so that it is stored with the data.

```{r}
gimap_dataset <- setup_data(counts = example_counts,
gimap_dataset <- gimap::setup_data(counts = example_counts,
pg_metadata = example_pg_metadata,
sample_metadata = example_sample_metadata)
```
Expand Down

0 comments on commit caa4688

Please sign in to comment.