diff imgt_loader.r @ 47:64711f461c8e draft

Uploaded
author davidvanzessen
date Thu, 04 May 2017 07:43:09 -0400
parents c33d93683a09
children ba3220f921af
line wrap: on
line diff
--- a/imgt_loader.r	Wed Apr 12 04:28:16 2017 -0400
+++ b/imgt_loader.r	Thu May 04 07:43:09 2017 -0400
@@ -9,6 +9,22 @@
 aa = read.table(aa.file, sep="\t", header=T, quote="", fill=T)
 junction = read.table(junction.file, sep="\t", header=T, quote="", fill=T)
 
+fix_column_names = function(df){
+    if("V.DOMAIN.Functionality" %in% names(df)){
+        names(df)[names(df) == "V.DOMAIN.Functionality"] = "Functionality"
+        print("found V.DOMAIN.Functionality, changed")
+    }
+    if("V.DOMAIN.Functionality.comment" %in% names(df)){
+        names(df)[names(df) == "V.DOMAIN.Functionality.comment"] = "Functionality.comment"
+        print("found V.DOMAIN.Functionality.comment, changed")
+    }
+    return(df)
+}
+
+summ = fix_column_names(summ)
+aa = fix_column_names(aa)
+junction = fix_column_names(junction)
+
 old_summary_columns=c('Sequence.ID','JUNCTION.frame','V.GENE.and.allele','D.GENE.and.allele','J.GENE.and.allele','CDR1.IMGT.length','CDR2.IMGT.length','CDR3.IMGT.length','Orientation')
 old_sequence_columns=c('CDR1.IMGT','CDR2.IMGT','CDR3.IMGT')
 old_junction_columns=c('JUNCTION')