#random forest library(randomForest) # Read in data for RF classifier with SIFT, GO, and PfamLogR.E-value trainingData.Sift.Go.Pfam = read.table(file="training.data.sift.go.pfam",sep="\t",header=T) # Train RF classifier forestSGP = randomForest(Class ~ Sift + Pfam + Go,data=trainingData.Sift.Go.Pfam,importance=T,keep.forest=T, ntree=1000, mtry=2) # Load test data dataTest.sgp = read.table("test.data.crossValidation.sift.go.pfam",sep="\t",header=T) # Classify variants test.forest.sgp = predict(forestSGP,dataTest.sgp[3:5])