comparison imgt_loader.r @ 47:64711f461c8e draft

Uploaded
author davidvanzessen
date Thu, 04 May 2017 07:43:09 -0400
parents c33d93683a09
children ba3220f921af
comparison
equal deleted inserted replaced
46:cfc9a442e59d 47:64711f461c8e
6 out.file = args[4] 6 out.file = args[4]
7 7
8 summ = read.table(summ.file, sep="\t", header=T, quote="", fill=T) 8 summ = read.table(summ.file, sep="\t", header=T, quote="", fill=T)
9 aa = read.table(aa.file, sep="\t", header=T, quote="", fill=T) 9 aa = read.table(aa.file, sep="\t", header=T, quote="", fill=T)
10 junction = read.table(junction.file, sep="\t", header=T, quote="", fill=T) 10 junction = read.table(junction.file, sep="\t", header=T, quote="", fill=T)
11
12 fix_column_names = function(df){
13 if("V.DOMAIN.Functionality" %in% names(df)){
14 names(df)[names(df) == "V.DOMAIN.Functionality"] = "Functionality"
15 print("found V.DOMAIN.Functionality, changed")
16 }
17 if("V.DOMAIN.Functionality.comment" %in% names(df)){
18 names(df)[names(df) == "V.DOMAIN.Functionality.comment"] = "Functionality.comment"
19 print("found V.DOMAIN.Functionality.comment, changed")
20 }
21 return(df)
22 }
23
24 summ = fix_column_names(summ)
25 aa = fix_column_names(aa)
26 junction = fix_column_names(junction)
11 27
12 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') 28 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')
13 old_sequence_columns=c('CDR1.IMGT','CDR2.IMGT','CDR3.IMGT') 29 old_sequence_columns=c('CDR1.IMGT','CDR2.IMGT','CDR3.IMGT')
14 old_junction_columns=c('JUNCTION') 30 old_junction_columns=c('JUNCTION')
15 31