changeset 13:b45a74248628 draft

Uploaded
author davidvanzessen
date Fri, 07 Aug 2015 05:52:21 -0400
parents 010402c959aa
children dca3273a7291
files report_clonality/RScript.r
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/report_clonality/RScript.r	Tue Aug 04 10:00:20 2015 -0400
+++ b/report_clonality/RScript.r	Fri Aug 07 05:52:21 2015 -0400
@@ -114,6 +114,14 @@
 
 # ---------------------- Counting the productive/unproductive and unique sequences ----------------------
 
+if(!("Functionality" %in% inputdata)){ #add a functionality column to the igblast data
+  inputdata$Functionality = "unproductive"
+  search = (inputdata$VDJ.Frame != "In-frame with stop codon" & inputdata$VDJ.Frame != "Out-of-frame" & inputdata$CDR3.Found.How != "NOT_FOUND")
+  if(sum(search) > 0){
+    inputdata[search,]$Functionality = "productive"
+  }
+}
+
 inputdata.dt = data.table(inputdata) #for speed
 
 if(clonaltype == "none"){