###Loading PD and TM scores and cut from 0.0 to 1.0 by step 1/k (k=number of intervals) for protein Gerge Set's SameFold and NoSameFold ##Files: /home/recerca/public_html/ProtDeform/PDscore/ ## For PD "/home/recerca/public_html/ProtDeform/PDscore/GS/PD/NoSameFold" ## "/home/recerca/public_html/ProtDeform/PDscore/GS/PD/SameFold" ## For TM "/home/recerca/public_html/ProtDeform/PDscore/GS/TM/NoSameFold" ## "/home/recerca/public_html/ProtDeform/PDscore/GS/TM/NoSameFold" ## The variables for Xu and Gerge files are ## scores" "absolute.freqs.same.fold.PD" "absolute.freqs.no.same.fold.PD" "absolute.freqs.same.fold.TM" "absolute.freqs.no.same.fold.TM" #Phat's for paper (put hear your paths) PDNoSameFold <- "/home/recerca/public_html/ProtDeform/PDscore/GS/PD/NoSameFold" PDSameFold <- "/home/recerca/public_html/ProtDeform/PDscore/GS/PD/SameFold" TMNoSameFold <- "/home/recerca/public_html/ProtDeform/PDscore/GS/TM/NoSameFold" TMSameFold <- "/home/recerca/public_html/ProtDeform/PDscore/GS/TM/SameFold" #Set the file name of results PDTMFreq <- "/home/recerca/public_html/ProtDeform/PDscore/stat/FreqsCutsPDTMGergeFold.dat" #Compute Absolute Frecuencies k intervals, breaks from 0.00 to 1.00 by=step #Set the parameters for breaks k <- 20 step <- 1/100 breaks <- seq(0,1,by=step) length <- length(breaks) #Inicializate the data.frame for results source.counts.scores <- data.frame(scores=breaks[2:length]) #Computing the frecuencies.... # #For PD Score #Load PD scores score.data.same.fold <- read.table(PDSameFold,head=F,colClasses=c("character","character","numeric","numeric")) score.data.same.fold <- score.data.same.fold[,4] score.data.no.same.fold <- read.table(PDNoSameFold,head=F,colClasses=c("character","character","numeric","numeric")) score.data.no.same.fold <- score.data.no.same.fold[,4] #Counts PDscores counts.same.fold <- as.numeric(table(cut(score.data.same.fold,breaks=breaks))) counts.no.same.fold <- as.numeric(table(cut(score.data.no.same.fold,breaks=breaks))) source.counts.scores$absolute.freqs.same.fold.PD <- counts.same.fold source.counts.scores$absolute.freqs.no.same.fold.PD <- counts.no.same.fold #Load TM scores score.data.same.fold <- read.table(TMSameFold,head=F, colClasses=c("character","character","numeric","numeric")) score.data.same.fold <- score.data.same.fold[,3] score.data.no.same.fold <- read.table(TMNoSameFold,head=F, colClasses=c("character","character","numeric")) score.data.no.same.fold <- score.data.no.same.fold[,3] #Counts TMscores counts.same.fold <- as.numeric(table(cut(score.data.same.fold,breaks=breaks))) counts.no.same.fold <- as.numeric(table(cut(score.data.no.same.fold,breaks=breaks))) source.counts.scores$absolute.freqs.same.fold.TM <- counts.same.fold source.counts.scores$absolute.freqs.no.same.fold.TM <- counts.no.same.fold #Writing counts write.table(source.counts.scores,file=PDTMFreq,row.names=F)