comparison sequence_overview.r @ 8:3968d04b5724 draft

Uploaded
author davidvanzessen
date Mon, 07 Nov 2016 06:52:53 -0500
parents ad9be244b104
children fe44a905aee9
comparison
equal deleted inserted replaced
7:ad9be244b104 8:3968d04b5724
277 #NToverview = rbind(NToverview, NTsum) 277 #NToverview = rbind(NToverview, NTsum)
278 278
279 NTresult = data.frame(nt=c("A", "C", "T", "G")) 279 NTresult = data.frame(nt=c("A", "C", "T", "G"))
280 280
281 for(clazz in gene.classes){ 281 for(clazz in gene.classes){
282 print(paste("class:", clazz))
282 NToverview.sub = NToverview[grepl(paste("^", clazz, sep=""), NToverview$best_match),] 283 NToverview.sub = NToverview[grepl(paste("^", clazz, sep=""), NToverview$best_match),]
284 print(paste("nrow:", nrow(NToverview.sub)))
283 new.col.x = c(sum(NToverview.sub$A), sum(NToverview.sub$C), sum(NToverview.sub$T), sum(NToverview.sub$G)) 285 new.col.x = c(sum(NToverview.sub$A), sum(NToverview.sub$C), sum(NToverview.sub$T), sum(NToverview.sub$G))
284 new.col.y = sum(new.col.x) 286 new.col.y = sum(new.col.x)
285 new.col.z = round(new.col.x / new.col.y * 100, 2) 287 new.col.z = round(new.col.x / new.col.y * 100, 2)
286 288
287 tmp = names(NTresult) 289 tmp = names(NTresult)