On 2020-12-11 20:14 +0500, Anas Jamshed wrote: > On Fri, Dec 11, 2020 at 7:49 PM Rasmus Liland <j...@posteo.no> wrote: > > > On 2020-12-11 19:16 +0500, Anas Jamshed wrote: > > > On Fri, Dec 11, 2020 at 6:37 PM Rasmus Liland wrote: > > > > On 2020-12-11 18:08 +0500, Anas Jamshed wrote: > > > > > > > > > > > > > Anas Jamshed, > > > > > > > > I found this > > > > > > > > https://support.bioconductor.org/p/130817/ > > > > > > > > maybe it helps ... > > > > > > still have the problem in 2nd error > > > > > > > > Also when i tried to: > > > > > > > > > > #Load the target files which the information about the sample and > > > > > their corresponding group by > > > > > > > > > > targets<-read.delim(file="targets.txt", header=T)and create design > > and > > > > > fit the design by > > > > > design <- model.matrix(~0+ conditions) > > > > > > > > > > It gives me the error : > > > > > > > > > > Error in model.frame.default(object, data, xlev = xlev) : > > > > > invalid type (closure) for variable 'conditions' > > > > Glad my suggestion helped. > > > > Do state how you solved that for someone > > else to find it another time (maybe > > yourself even ... ). > > > > One problem at a time ... pocito pocito > > ... > > > > Read here or something > > > > https://stackoverflow.com/questions/33023508/why-am-i-getting-the-error-invalid-type-closure > > ... > > > > > https://postimg.cc/1fKPj1xg > > > > Right, it says the object is not a > > matrix ... there is a flag there called > > «data,» perhaps look into specifying you > > matrix there ... > > > > It would be more helpful for me as a > > helper if you stated your problem in a > > small example code snippet, instead of > > just the error. I might lack the > > sufficient amount of teaching emphathy > > there to se clearly through images and > > error messages from a distance. E.g. > > use dput to paste some small dataset > > here ... > > > > R > > E-MTAB is an original sample data file and another one is normalized data > file but I don't know why I get just one gene(up reg) when I apply top > table and decide test function > > My R history file is : > library(oligo) > if (!requireNamespace("BiocManager", quietly = TRUE)) > install.packages("BiocManager") > BiocManager::install("pd.hg.u133.plus.2") > list.celfiles() > setwd("C:/Users/USER/Desktop/RNA_Seq") > list.celfiles() > names = list.celfiles() > array = read.celfiles(names) > array > eset = rma(array) > write.exprs(eset, file = "data_normalized.txt") #this will be your > normalized data by rma > eset > targets<-read.delim(file="targets.txt", header=T) > targets<-read.delim(file="E-MTAB-5716.sdrf.txt", header=T) > targets > design <- model.matrix(~0+ conditions) > fit <- lmFit(eset, design) > fit <- lmFit(eset, targets) > design <- model.matrix(~ description + 0, gset) > design > fit <- lmFit(eset, design) > targets$Source.Name <-fl > targets$Source.Name <-fl > targets$Source.Name <-f1 > sml <- paste("G", sml, sep="") > targets$Source.Name > design <- model.matrix(~ description + 0, eset) > design <- model.matrix(~ targets + 0, eset) > design <- model.matrix(~ targets + 0, conditions()) > design <- model.matrix(~ targets + 0, conditions) > design <- model.matrix(~0+ conditions) > design <- model.matrix(~ description + 0 + conditions) > design <- model.matrix(~ description + 0 , conditions) > design <- model.matrix(~ description + 0, gset) > design <- model.matrix(~ description + 0, eset) > design <- model.matrix(~ targets + 0, eset) > targets$Source.Name > design <- model.matrix(~ Source.Name + 0, eset) > design <- model.matrix(~ Source + 0, eset) > gset > gset$description > eset <- eset[[idx]] > eset > design <- model.matrix(~ description + 0, eset) > fvarLabels(eset) <- make.names(fvarLabels(eset)) > gsms <- paste0("000000000000000000000000000000XXXXXXXXXXXXXXX11111", > "1111111111XXXXXXXXXXXXXXXXXXX") > sml <- c() > for (i in 1:nchar(gsms)) { sml[i] <- substr(gsms,i,i) } > make.names() > fvarLabels(eset) <- make.names(fvarLabels(eset)) > sel <- which(sml != "X") > sml <- sml[sel] > gset <- eset[ ,sel] > eset > design <- model.matrix(~0+ conditions) > design <- model.matrix(~0+ eset) > design > fit <- lmFit(eset, design) > fit > contrast.matrix <- makeContrasts(group1=condition1-control, > group2=condition2-control, levels = design) > fit > cont.matrix <- makeContrasts(G1-G0, levels=design) > sml <- paste("G", sml, sep="") # set group names > fl <- as.factor(sml) > sml > cont.matrix <- makeContrasts(G1-G0, levels=design) > design > gset > design > cont.matrix <- makeContrasts(eset, levels=design) > fit2 <- contrasts.fit(fit, cont.matrix) > fit2 > fit3 <- eBayes(fit2, 0.01) > fit3 > tT <- topTable(fit3, adjust="fdr", sort.by="B", number=1250) > tT > tT <- topTable(fit3, adjust="fdr", sort.by="B", number=500000) > tT > tT <- topTable(fit3, adjust="fdr", sort.by="B", number=500000,p=0.05) > tT > fit.cont <- contrasts.fit(fit, contrast.matrix) > fit.cont <- contrasts.fit(fit, contrast.matrix) > fit.cont <- contrasts.fit(fit2, contrast.matrix) > fit.cont <- contrasts.fit(fit2, contrasts.fit()) > results<-decideTests(fit3,adjust.method="fdr",p=0.05) > results > summary(results) > cont.matrix <- makeContrasts(eset, levels=design) > fit.cont <- contrasts.fit(fit, cont.matrix) > fit.cont > fit.cont<- eBayes(fit.cont) > fit.cont > results<-decideTests(fit.cont,adjust.method="fdr",p=0.001) > results > summary(results) > heatmap(results) > heatmap(results[:,]) > heatmap(results[,]) > heatmap(results[,0]) > heatmap(results[1,4]) > heatmap(results[1,1]) > heatmap(results[2,2]) > heatmap(results[3,2]) > heatmap(results[,:]) > heatmap(results[:,]) > heatmap(results[1,]) > heatmap(results[1,:])
I think that's too many unspecific lines and too large files directly here on email (24MiB!). Would you please narrow down your question. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.