Please Explain the code from Lab 5: Cluster Analysis and Lab 6: Classification
0
0
Entering edit mode
dibakar ray ▴ 40
@dibakar-ray-413
Last seen 10.1 years ago
Sorry to bother you people with my silly questions. Following codes are from Lab5 and Lab6 pdf files available at the web site. I could understand the following code. =================================== > data(golubTrain) > X <- exprs(golubTrain) > X[X < 100] <- 100 > X[X > 16000] <- 16000 > mmfilt <- function(r = 5, d = 500, na.rm = TRUE) { + function(x) { + minval <- min(x, na.rm = na.rm) + maxval <- max(x, na.rm = na.rm) + (maxval/minval > r) && (maxval - minval > d) + } + } > mmfun <- mmfilt() > ffun <- filterfun(mmfun) > sub <- genefilter(X, ffun) > sum(sub) [1] 3051 > X <- X[sub, ] > X <- log2(X) ========================== But I am unable to understand this portion - ============= =================== > golubTrainSub <- golubTrain[sub, ] > golubTrainSub@exprs <- X > Y <- golubTrainSub$ALL.AML #I understand the following line > Y <- paste(golubTrain$ALL.AML, golubTrain$T.B.cell) # DO NOT UNDERSTAND THE FOLLOWING ONE. > Y <- sub("NA", "", Y) ======================================================== From Lab6 Code, the following is OK ================================ > data(golubTrain) > data(golubMerge) > data(golubTest) > gTrn <- GolubTrans(golubTrain) > gTest <- GolubTrans(golubTest) > gMerge <- GolubTrans(golubMerge) > mmfun <- mmfilt() > ffun <- filterfun(mmfun) > sub <- genefilter(gTrn, ffun) But why we need to set the following element False? > sub[c(2401, 3398, 4168)] <- FALSE Thanks Dibakar Ray
• 783 views
ADD COMMENT

Login before adding your answer.

Traffic: 449 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6