Skip to content

Commit

Permalink
Minor updates to text
Browse files Browse the repository at this point in the history
  • Loading branch information
AshKernow committed Nov 7, 2024
1 parent 7390cbe commit 6f74b66
Show file tree
Hide file tree
Showing 2 changed files with 540 additions and 159 deletions.
25 changes: 19 additions & 6 deletions Makerere_Course_Materials/04_DE_analysis_with_DESeq2.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ txi <- readRDS("RObjects/txi.rds")
sampleinfo <- read_tsv("data/samplesheet_corrected.tsv", col_types = "cccc")
```

First check the metadata.

```{r}
sampleinfo
```


It is important to be sure that the order of the samples in rows in the sample
meta data table matches the order of the columns in the data matrix - `DESeq2`
will **not** check this. If the order does not match you will not be running the
Expand Down Expand Up @@ -261,14 +268,13 @@ The default significance level for independent filtering is `0.1`, however, you
should set this to the FDR cut off you are planning to use. We will use `0.05` -
this was the purpose of the `alpha` argument in the previous command.

Remember
in Session 7 we said that there is no need to pre-filter the genes as DESeq2
will do this through a process it calls 'independent filtering'. The genes
with `NA` are the ones `DESeq2` has filtered out.
Earlier we said that there it is not necessary to carefully to pre-filter the
genes as DESeq2 will do this through a process it calls 'independent filtering'.
The genes with `NA` are the ones `DESeq2` has filtered out.

## Fitting an additive model

So far we have fitted a simple model considering just "Status", but in reality
So far we have fit a simple model considering just "Status", but in reality
we want to model the effects of both "Status" and "Time Point".

Let's start with the model with only main effects - an additive model with no
Expand All @@ -288,6 +294,13 @@ results.additive <- results(ddsObj, alpha = 0.05)

### The default contrast of `results`

Let's look at the results.

```{r}
results.additive
```


The `results` function has returned the results for the contrast "Infected vs
Uninfected". Let's have a look at the model matrix to understand why `DESeq2`
has given us this particular contrast.
Expand Down Expand Up @@ -332,7 +345,7 @@ resultsNames(ddsObj)

```{r}
results.d33vd11 <- results(ddsObj, name = "TimePoint_d33_vs_d11", alpha = 0.05)
results.d33vd11
sum(results.d33vd11$padj < 0.05, na.rm = TRUE)
```

Expand Down
674 changes: 521 additions & 153 deletions Makerere_Course_Materials/04_DE_analysis_with_DESeq2.html

Large diffs are not rendered by default.

0 comments on commit 6f74b66

Please sign in to comment.