#################### Loading and view sample data
data(MethPed_sample)
head(MethPed_sample,10)
#################### Check dimention of sample data
dim(MethPed_sample) # Check number pof probes and samples in data
#################### Checking missing value in the data
missingIndex <- checkNA(MethPed_sample)
#################### Apply MethPed to sample data (Probability for all tumor group)
myClassification<-MethPed(MethPed_sample)
myClassification<-MethPed(MethPed_sample,prob=TRUE)
#################### Apply MethPed to sample data (Only maximum probability expected)
myClassification_max<-MethPed(MethPed_sample,prob=FALSE)
#################### Summary of results
summary(myClassification)
summary(myClassification)
#################### Barplot of conditional prediction probability on different samples
par(mai = c(1, 1, 1, 2), xpd=TRUE)
mat<-t(myClassification$predictions)
mycols <- c("green",rainbow(nrow(mat),start=0,end=1)[nrow(mat):1],"red")
barplot(mat, col = mycols,
beside=FALSE,axisnames=TRUE,
ylim=c(0,1),xlab= "Sample",ylab="Probability")
legend( ncol(mat)+0.5,1,
legend = rownames(mat),fill = mycols,xpd=TRUE, cex = 0.6)
## Generic function to plot
plot(myClassification) # myClassification should be an object in "methPed" class
Run the code above in your browser using DataLab