I cultivated four different neuroblastoma cell lines and want to compare them with three tissue samples from healthy human brains to find the cell line closest to the brain. We used the single-color Agilent SurePrint G3 Human Gene Expression v3 8x60K Microarray Kit (P/N G4851C).
Let's name the cell lines CL1, CL2, CL3, and CL4 and the tissues T1, T2, and T3. I want to compare the following pairs:
- CL1 vs. T1
- CL2 vs. T1
- CL3 vs. T1
- CL4 vs. T1
and
- CL1 vs T2
- CL2 vs T2
- CL3 vs T2
- CL4 vs T2
and
- CL1 vs T3
- CL2 vs T3
- CL3 vs T3
- CL4 vs T3
I already imported the data to limma
and background-corrected and normalized it. The resulting density plot looks good, so my data seems okay. From here, starting with my EList
of background-corrected and normalized data, how can I run through my pairwise comparisons?
targets.tsv
FileName CellType Name Cy3
file1.txt CL1 CL1_1 Sample
file2.txt CL2 CL2_1 Sample
file3.txt CL4 CL4_1 Sample
file4.txt CL3 CL3_1 Sample
file5.txt CL1 CL1_2 Sample
file6.txt CL3 CL3_2 Sample
file7.txt CL2 CL2_2 Sample
file8.txt CL4 CL4_2 Sample
file9.txt CL1 CL1_3 Sample
file10.txt CL2 CL2_3 Sample
file11.txt CL4 CL4_3 Sample
file12.txt T3 T3_1 Control
file13.txt CL3 CL3_3 Sample
file14.txt T3 T3_2 Control
file15.txt T3 T3_3 Control
file16.txt T1 T1_1 Control
file17.txt T1 T1_2 Control
file18.txt T1 T1_3 Control
file19.txt T2 T2_1 Control
file20.txt T2 T2_2 Control
file21.txt T2 T2_3 Control
file22.txt T3 T3_4 Control
script.R
# Targets
targetinfo <- readTargets(targetsFile, row.names = 'Name')
# Converts the raw data to an EListRaw object
wtAgilent.GFilter <- function(qta) { qta[,"gIsPosAndSignif"] }
project <- read.maimages(
targetinfo,
source = 'agilent.median',
green.only = TRUE,
path = "data",
other.columns = 'gIsWellAboveBG',
wt.fun = wtAgilent.GFilter
)
colnames(project) <- row.names(targetinfo)
# Background correction
project.bgcorrect <- backgroundCorrect(project, method = 'normexp')
# Normalization
project.bgcorrect.norm <- normalizeBetweenArrays(project.bgcorrect, method = 'quantile')
# Filtering
Control <- project.bgcorrect.norm$genes$ControlType != 0
NoSymbol <- is.na(project.bgcorrect.norm$genes$external_gene_name)
IsExpr <- rowSums(project.bgcorrect.norm$other$gIsWellAboveBG > 0) >= 3
project.bgcorrect.norm.filt <- project.bgcorrect.norm[!Control & !NoSymbol & IsExpr, ]
These are the relevant parts of my script. Now I wonder how to apply the linear fits to gain access to the desired pairwise comparisons as
cellType <- factor(targetinfo$CellType)
design <- model.matrix(~cellType)
fit <- lmFit(project.bgcorrect.norm.filt.mean, design)
fit <- eBayes(fit, trend = TRUE, robust = TRUE)
results <- decideTests(fit)
doesn't seem to be quite what I want.
Thank you very much for every suggestion for improvement and, most of all, for every hint in the right direction to solve my problem.