diff imgt_loader/imgt_loader.r @ 28:798b62942b4b draft

Uploaded
author davidvanzessen
date Wed, 01 Mar 2017 10:41:30 -0500
parents 9185c3dfc679
children 3a76faa53c59
line wrap: on
line diff
--- a/imgt_loader/imgt_loader.r	Tue Feb 28 08:10:34 2017 -0500
+++ b/imgt_loader/imgt_loader.r	Wed Mar 01 10:41:30 2017 -0500
@@ -4,11 +4,13 @@
 sequences.file = args[2]
 aa.file = args[3]
 junction.file = args[4]
-out.file = args[5]
+gapped.aa.file = args[5]
+out.file = args[6]
 
 summ = read.table(summ.file, sep="\t", header=T, quote="", fill=T)
 sequences = read.table(sequences.file, sep="\t", header=T, quote="", fill=T)
 aa = read.table(aa.file, sep="\t", header=T, quote="", fill=T)
+gapped.aa = read.table(gapped.aa.file, sep="\t", header=T, quote="", fill=T)
 junction = read.table(junction.file, sep="\t", header=T, quote="", fill=T)
 
 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')
@@ -32,8 +34,8 @@
 out[,"CDR3.Seq"] = aa[,"CDR3.IMGT"]
 out[,"CDR3.Length"] = summ[,"CDR3.IMGT.length"]
 
-out[,"CDR3.Seq.DNA"] = sequences[,"CDR3.IMGT"]
-out[,"CDR3.Length.DNA"] = nchar(as.character(sequences[,"CDR3.IMGT"]))
+out[,"CDR3.Seq.DNA"] = gapped.aa[,"CDR3.IMGT"]
+out[,"CDR3.Length.DNA"] = nchar(as.character(out[,"CDR3.Seq.DNA"]))
 out[,"Strand"] = summ[,"Orientation"]
 out[,"CDR3.Found.How"] = "a"