comparison new_imgt.r @ 65:dc06e94bc1e3 draft

Uploaded
author davidvanzessen
date Wed, 06 Dec 2017 09:55:37 -0500
parents cb779a45537b
children
comparison
equal deleted inserted replaced
64:c6dd3215ebe0 65:dc06e94bc1e3
2 2
3 imgt.dir = args[1] 3 imgt.dir = args[1]
4 merged.file = args[2] 4 merged.file = args[2]
5 gene = args[3] 5 gene = args[3]
6 6
7 merged = read.table(merged.file, header=T, sep="\t", fill=T, stringsAsFactors=F, comment.char="") 7 merged = read.table(merged.file, header=T, sep="\t", fill=T, stringsAsFactors=F, comment.char="", quote="")
8
9 if(!("Sequence.ID" %in% names(merged))){ #change-o db
10 print("Change-O DB changing 'SEQUENCE_ID' to 'Sequence.ID'")
11 names(merged)[which(names[merged] == "SEQUENCE_ID")] = "Sequence.ID"
12 }
8 13
9 if(gene != "-"){ 14 if(gene != "-"){
10 merged = merged[grepl(paste("^", gene, sep=""), merged$best_match),] 15 merged = merged[grepl(paste("^", gene, sep=""), merged$best_match),]
11 } 16 }
12 17