diff aa_histogram.r @ 29:80c4eebf7bc9 draft

Uploaded
author davidvanzessen
date Thu, 08 Dec 2016 04:51:09 -0500
parents 81453585dfc3
children a24f8c93583a
line wrap: on
line diff
--- a/aa_histogram.r	Wed Dec 07 08:17:09 2016 -0500
+++ b/aa_histogram.r	Thu Dec 08 04:51:09 2016 -0500
@@ -16,15 +16,15 @@
 
 for(gene in genes){
 	if(gene == ""){
-			mutations.by.id.gene = mutations.by.id[!grepl("unmatched", mutations.by.id$best_match),]
-			absent.aa.by.id.gene = absent.aa.by.id[!grepl("unmatched", absent.aa.by.id$best_match),]
+		mutations.by.id.gene = mutations.by.id[!grepl("unmatched", mutations.by.id$best_match),]
+		absent.aa.by.id.gene = absent.aa.by.id[!grepl("unmatched", absent.aa.by.id$best_match),]
 	} else {
-			mutations.by.id.gene = mutations.by.id[grepl(paste("^", gene, sep=""), mutations.by.id$best_match),]
-			absent.aa.by.id.gene = absent.aa.by.id[grepl(paste("^", gene, sep=""), absent.aa.by.id$best_match),]
+		mutations.by.id.gene = mutations.by.id[grepl(paste("^", gene, sep=""), mutations.by.id$best_match),]
+		absent.aa.by.id.gene = absent.aa.by.id[grepl(paste("^", gene, sep=""), absent.aa.by.id$best_match),]
 	}
 	print(paste("nrow", gene, nrow(absent.aa.by.id.gene)))
 	if(nrow(mutations.by.id.gene) == 0){
-			next
+		next
 	}
 
 	mutations.at.position = colSums(mutations.by.id.gene[,-c(1,2)])