changeset 8:3968d04b5724 draft

Uploaded
author davidvanzessen
date Mon, 07 Nov 2016 06:52:53 -0500
parents ad9be244b104
children 372ccdcf0b2d
files sequence_overview.r shm_csr.r
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/sequence_overview.r	Mon Nov 07 03:04:07 2016 -0500
+++ b/sequence_overview.r	Mon Nov 07 06:52:53 2016 -0500
@@ -279,7 +279,9 @@
 NTresult = data.frame(nt=c("A", "C", "T", "G"))
 
 for(clazz in gene.classes){
+	print(paste("class:", clazz))
 	NToverview.sub = NToverview[grepl(paste("^", clazz, sep=""), NToverview$best_match),]
+	print(paste("nrow:", nrow(NToverview.sub)))
 	new.col.x = c(sum(NToverview.sub$A), sum(NToverview.sub$C), sum(NToverview.sub$T), sum(NToverview.sub$G))
 	new.col.y = sum(new.col.x)
 	new.col.z = round(new.col.x / new.col.y * 100, 2)
--- a/shm_csr.r	Mon Nov 07 03:04:07 2016 -0500
+++ b/shm_csr.r	Mon Nov 07 06:52:53 2016 -0500
@@ -175,6 +175,8 @@
 
 setwd(outputdir)
 
+write.table(dat, input, sep="\t",quote=F,row.names=F,col.names=T)
+
 base.order = data.frame(base=c("A", "T", "C", "G"), order=1:4)
 
 calculate_result = function(i, gene, dat, matrx, f, fname, name){
@@ -437,8 +439,6 @@
 
 write.table(dat[,c("Sequence.ID", "best_match", "VRegionMutations", "VRegionNucleotides", "percentage_mutations")], "scatter.txt", sep="\t",quote=F,row.names=F,col.names=T)
 
-write.table(dat, input, sep="\t",quote=F,row.names=F,col.names=T)
-
 print("Plotting frequency ranges plot")
 
 dat$best_match_class = substr(dat$best_match, 0, 3)