Mercurial > repos > davidvanzessen > combined_immune_repertoire_pipeline
comparison RScript.r @ 4:87fb14480352 draft
Uploaded
author | davidvanzessen |
---|---|
date | Fri, 22 Nov 2013 08:12:53 -0500 |
parents | 4e3df2384422 |
children | 00d432c66fb8 |
comparison
equal
deleted
inserted
replaced
3:2b1d3d6843e8 | 4:87fb14480352 |
---|---|
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 |