knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  library(kableExtra),
  library(geometric2)
)

This vignette discusses micro arrays using two colors of which one is a common reference. Only the steps that set this approach apart from other are addressed here.

Loading the data

gse <- "GSE30849"
eset <- getGEO(gse, destdir = "GSE30849/GEOtemp/")

This step assumes that the the get_input() function including the annotation of the sample_review.txt file and the subsequent QC was performed at an earlier state. For details of these procedure consult the 1C_experiments vignette.

Setting up a targets object

The targets object is a table of the general format:

tabl <- "
| Filename | Cy3 | Cy5 |
|---|:---:|----:|
|Filename 1| experimentA | common reference |
|Filename 2| experimentA | common reference |
|Filename 3| experimentA | common reference |
"
cat(tabl)

We can use the edited sample_review.txt file to create this target object. Reading in the file and examining the columns:

sample_review3 <- fread("GSE30849/sample_review3.txt")
names(sample_review3)

The title column holds relevant information for the treatment.

sample_review3$title

Removing the second half of the title yields the different treatments.

sample_review3$treatment <- str_trim(str_remove(sample_review3$title, "- *repeat.*$"))
sample_review3$treatment <- str_trim(str_replace_all(sample_review3$treatment, " ","_"))
sample_review3$treatment <- str_trim(str_replace_all(sample_review3$treatment, "\\W",""))
sample_review3$treatment <- str_trim(str_replace_all(sample_review3$treatment, "_+","."))

sample_review3$treatment

Now the target object can be constructed. This has to be a matrix.

SlideNumber <- sample_review3$geo_accession
Cy3 <- "Universal.Mouse.Reference.RNA"
Cy5 <- sample_review3$Group

targets <- cbind(SlideNumber, Cy3, Cy5)
kable(targets)

Creating the design

design <- modelMatrix(targets, ref = "Universal.Mouse.Reference.RNA")
design

The rest of the procedure (creating a contrast file and fitting the data) is laid out in the 1C_experiments vignette.



axelmuller/geometric2 documentation built on May 25, 2019, 6:26 p.m.