Mercurial > repos > davidvanzessen > argalaxy_tools
changeset 39:bad6a9a53ae7 draft
Uploaded
author | davidvanzessen |
---|---|
date | Mon, 24 Apr 2017 09:39:59 -0400 |
parents | b6936fb52ab9 |
children | 106275b54470 |
files | imgt_loader/imgt_loader.r |
diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/imgt_loader/imgt_loader.r Wed Apr 19 10:21:01 2017 -0400 +++ b/imgt_loader/imgt_loader.r Mon Apr 24 09:39:59 2017 -0400 @@ -13,6 +13,24 @@ 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) +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) +sequences = fix_column_names(sequences) +aa = fix_column_names(aa) +gapped.aa = fix_column_names(gapped.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')