Mercurial > repos > davidvanzessen > plotting_merged
comparison RScript.r @ 42:af2834de221c draft
Uploaded
| author | davidvanzessen |
|---|---|
| date | Fri, 22 Nov 2013 07:51:17 -0500 |
| parents | a9ad03d52680 |
| children | 2c6d04fa10f4 |
comparison
equal
deleted
inserted
replaced
| 41:46c5d9d396a5 | 42:af2834de221c |
|---|---|
| 3 args <- commandArgs(trailingOnly = TRUE) | 3 args <- commandArgs(trailingOnly = TRUE) |
| 4 | 4 |
| 5 inFile = args[1] | 5 inFile = args[1] |
| 6 outFile = args[2] | 6 outFile = args[2] |
| 7 outDir = args[3] | 7 outDir = args[3] |
| 8 clonalType = args[4] | |
| 8 | 9 |
| 9 if (!("gridExtra" %in% rownames(installed.packages()))) { | 10 if (!("gridExtra" %in% rownames(installed.packages()))) { |
| 10 install.packages("gridExtra", repos="http://cran.xl-mirror.nl/") | 11 install.packages("gridExtra", repos="http://cran.xl-mirror.nl/") |
| 11 } | 12 } |
| 12 library(gridExtra) | 13 library(gridExtra) |
| 31 | 32 |
| 32 test$Top.V.Gene = gsub("[*]([0-9]+)", "", test$Top.V.Gene) | 33 test$Top.V.Gene = gsub("[*]([0-9]+)", "", test$Top.V.Gene) |
| 33 test$Top.D.Gene = gsub("[*]([0-9]+)", "", test$Top.D.Gene) | 34 test$Top.D.Gene = gsub("[*]([0-9]+)", "", test$Top.D.Gene) |
| 34 test$Top.J.Gene = gsub("[*]([0-9]+)", "", test$Top.J.Gene) | 35 test$Top.J.Gene = gsub("[*]([0-9]+)", "", test$Top.J.Gene) |
| 35 | 36 |
| 36 test$VDJCDR3 = do.call(paste, c(test[c("Top.V.Gene", "Top.D.Gene", "Top.J.Gene","CDR3.Seq.DNA")], sep = ":")) | 37 #test$VDJCDR3 = do.call(paste, c(test[c("Top.V.Gene", "Top.D.Gene", "Top.J.Gene","CDR3.Seq.DNA")], sep = ":")) |
| 38 test$VDJCDR3 = do.call(paste, c(test[unlist(strsplit(clonalType, ","))], sep = ":")) | |
| 37 | 39 |
| 38 PROD = test[test$VDJ.Frame != "In-frame with stop codon" & test$VDJ.Frame != "Out-of-frame" & test$CDR3.Found.How != "NOT_FOUND" , ] | 40 PROD = test[test$VDJ.Frame != "In-frame with stop codon" & test$VDJ.Frame != "Out-of-frame" & test$CDR3.Found.How != "NOT_FOUND" , ] |
| 39 | 41 |
| 40 NONPROD = test[test$VDJ.Frame == "In-frame with stop codon" | test$VDJ.Frame == "Out-of-frame" | test$CDR3.Found.How == "NOT_FOUND" , ] | 42 NONPROD = test[test$VDJ.Frame == "In-frame with stop codon" | test$VDJ.Frame == "Out-of-frame" | test$CDR3.Found.How == "NOT_FOUND" , ] |
| 41 | 43 |
