Hi Christian,
For HuGene20stv1 array I have used xps package:
library(xps)
input <- choose.dir("D:/GeneST_Analyse/ProjectName")
setwd(input)
print(dir(input))
#Subdirectories
scmdir <- paste(input,"schemes",sep="/")
libdir <- paste(input,"library",sep="/")
anndir <- paste(input,"Annotation",sep="/")
celdir <- paste(input,"CELfiles",sep="/")
rootdir <- paste(input,"rootdata",sep="/")
scheme.exon <- import.exon.scheme("Scheme",filedir=scmdir,layoutfile=paste(libdir,"HuGene-2_0-st.clf",sep="/"),schemefile=paste(libdir,"HuGene-2_0-st.pgf",sep="/"),probeset=paste(anndir,"HuGene-2_0-st-v1.na35.hg19.probeset.csv",sep="/"),transcript=paste(anndir,"HuGene-2_0-st-v1.na35.hg19.transcript.csv",sep="/"),verbose=TRUE)
celfiles <- dir(path = "D:/GeneST_Analyse/ProjectName/CELfiles", pattern = "*.CEL$", all.files = FALSE, full.names = FALSE, recursive = FALSE, ignore.case = FALSE)
data.exon <- import.data(scheme.exon,"tmp_data_exon",filedir=rootdir,celfiles=celfiles,celdir=celdir,verbose=FALSE)
unlist(treeNames(data.exon))
Normalization:
data.rma <- rma(data.exon, "tmp_exonRMA", filedir=rootdir, verbose=FALSE, exonlevel="affx+core", option="transcript", background="antigenomic")
Now, how to use limma with this data to get differential expressed genes?
Thank you
Thanks for the reply Christian. Yes I have used in the same way before but its is giving all the genes which are present insted of differential expressed genes. Please check the following :
expr.rma <- export.expr(data.rma, treename = "*", treetype = "mdp", varlist = "fUnitName:fSymbol:fLevel", outfile = "MyName.txt", sep = "\t", as.dataframe = TRUE, verbose = TRUE)
tmp <- as.matrix(log2(expr.rma[,4:9]))
Group <- c("GrpA","GrpA","GrpA","GrpB","GrpB","GrpB")
design <- model.matrix(~factor(Group))
colnames(design) <- c("GrpA","GrpAvsGrpB")
design
fit <- lmFit(tmp, design)
cont.matrix <- makeContrasts(GrpAvsGrpB, levels = design)
fit2 <- contrasts.fit(fit,cont.matrix)
fit3 <- eBayes(fit2)
tab <- topTable(fit3, coef=1, n=Inf, adjust="fdr", sort.by="none")
write.table(tab, file="DEG.xls",row.names=F, sep="\t")
expr.rma has 44796 genes and DEG.xls also have 44796 genes.
.......And Apart from Limma I used PreFilter and UniFilter which is mentioned in xps.pdf
prefltr <- PreFilter(mad=c(0.5), lothreshold=c(7.0,0.02,"mean"), hithreshold=c(10.5,80.0,"percent"))
rma.pfr <- prefilter(data.rma, "tmpdt_exonPrefilter", filedir=rootdir , filter=prefltr, minfilters=2, verbose=FALSE)
tmp <- validData(rma.pfr)
head(tmp)
dim(tmp[tmp[,"FLAG"]==1,])
The data show that 5295 genes of the 44796 genes on the GeneChip are selected for further analysis.
unifltr <- UniFilter(foldchange=c(1.3,"both"), unifilter=c(0.1,"pval"))
rma.ufr <- unifilter(data.rma, "tmpdt_exonUnifilter", filedir=rootdir , unifltr, group=c("GrpA","GrpA","GrpA","GrpB","GrpB","GrpB"), xps.fltr=rma.pfr, verbose=FALSE)
tmp <- validData(rma.ufr)
tmp
dim(tmp)
The data show that only 767 genes of the pre{selected 5295 genes are considered to be differentially expressed.
But I need a heatmap So I also tried using limma. But Dont know where I went wrong. Please help me out.
Thank you