Entering edit mode
#GSE76540
getGEOSuppFiles(GEO = "GSE76540", makeDirectory = TRUE)
untar("./GSE76540/GSE76540_RAW.tar", exdir = "./GSE76540")
#Processing Affy microarray data
celfilelist<-list.files(path = "./GSE76540/", pattern = ".CEL", full.names = TRUE)
#This command will list all files in GSE76540 that have “.CEL” in the filename.
cf<-read.celfiles(filenames = celfilelist)
print(class(cf))
#This command will read the list of CEL files (object “celfilelist”) and store them in the cf ExpressionFeatureSet object
print(cf)
#This object stores all of your samples and contains information about the appropriate annotation for this type of chip (“pd.hg.u133.plus.2”)
#Histogram before normalization
hist(cf)
#Boxplot
boxplot(cf)
#Normalizing Affy array data using RMA
cf.norm<-rma(object = cf)
pData(cf.norm)
#Histogram of intensity after normalization
hist(cf.norm)
#Boxplot of intensity after normalization
boxplot(cf.norm)
#Filtering out low expression and low variance probes can improve later statistics. Using the genefilter() function, we can remove all probes that have less than log2(100) expression in more than 20% of samples and have an inter-quartile range less than 0.25.
filter<-genefilter(cf.norm, filterfun(pOverA(p = 0.2, A = log2(100)), function(x) (IQR(x) > 0.25)))
cf.norm<-cf.norm[filter,]
#Number of probes removed
table(filter)
#To make comparisons between groups, you will need to create a design matrix that describes your experiment.
s<-factor(c(rep('Parental', 3), rep('Resistant', 3)))
mod<-model.matrix(~0+s)
print(head(mod, n = 6))
fit1<-lmFit(cf.norm, mod)
contr<-makeContrasts(sResistant-sParental, levels=mod)
fit2<-contrasts.fit(fit = fit1, contrasts = contr)
fit3<-eBayes(fit2)
topTable(fit3)
tab<-topTable(fit3, adjust.method = "fdr", sort.by = "t",p.value=0.05)
pr<-row.names(tab)
sy<-getSYMBOL(pr, data = "hgu133plus2.db")
df<-data.frame(Symbol = sy, tab)
write.table(df, file = "./GSE76540_array_data_norm.txt", sep="\t", quote = FALSE)
head(topTable(fit3))''
sessionInfo( )
thank you I tried it and it worked.