Hello,
I am doing differential expression analysis from Illumina microarray. Annotation package for microarray (illuminaHumanv3.db) contains a lot of useful information which I want to be included in ReportingTools HTML table (e.g. GO ID). How to include this additional information (columns respectively)? I have been searching in documentation, but without success.
This is my current code:
# data_onco is my ExpressionSet
# only "PROBEID", "SYMBOL", "GENENAME", "ENTREZID" will be included in final HTML :/
genes <- select(illuminaHumanv3.db,
keys = featureNames(data_onco),
columns = c("PROBEID", "SYMBOL", "GENENAME", "ENTREZID", "GO"),
keytype = "PROBEID")
genes <- genes[!duplicated(genes[, "PROBEID"]), ]
fData(data_onco) <- genes
sample_group_ <- sample_info$Sample_Group
design <- model.matrix(~0 + sample_group_)
colnames(design) <- levels(sample_group_)
fit <- lmFit(data_onco, design = design)
contrasts <- makeContrasts(levels = design,
NormalVsTumour = Tumour-Normal)
fit2 <- contrasts.fit(fit, contrasts)
fit2 <- eBayes(fit2)
topTable(fit2, coef = "NormalVsTumour", number = N_REPORT_GENES, sort.by = "logFC")
lattice.options(default.theme = reporting.theme())
deReport <- HTMLReport(shortName = "Oncogene",
title = "Oncogene Normal vs Tumour samples",
reportDirectory = REPORT_PATH)
p <- publish(fit2, deReport, eSet = data_onco, factor = sample_group_, n = N_REPORT_GENES, coef = c("NormalVsTumour"))
finish(deReport)

Thanks, good solution! I didn't realize publish is internally using topTable which in fact generates a data.frame. I will definitely look at your package, looks handy.
I haven't mentioned I need only genes with specific GO IDs (I know I am deleting duplicates in my example; that code line shouldn't be there). So I can put a few GO IDs to one row and it will still be well-arranged.