Mercurial > repos > davidvanzessen > argalaxy_tools
diff report_clonality/RScript.r @ 67:69a6bba9ada9 draft
Uploaded
author | davidvanzessen |
---|---|
date | Thu, 21 Jul 2016 03:56:52 -0400 |
parents | 7696dd687f39 |
children | a59de79f6c0f |
line wrap: on
line diff
--- a/report_clonality/RScript.r Thu May 19 09:42:53 2016 -0400 +++ b/report_clonality/RScript.r Thu Jul 21 03:56:52 2016 -0400 @@ -19,12 +19,12 @@ library(data.table) if (!("reshape2" %in% rownames(installed.packages()))) { - install.packages("reshape2", repos="http://cran.xl-mirror.nl/") + install.packages("reshape2", repos="http://cran.xl-mirror.nl/") } library(reshape2) if (!("lymphclon" %in% rownames(installed.packages()))) { - install.packages("lymphclon", repos="http://cran.xl-mirror.nl/") + install.packages("lymphclon", repos="http://cran.xl-mirror.nl/") } library(lymphclon) @@ -182,6 +182,16 @@ write.table(x=count, file="productive_counting.txt", sep=",",quote=F,row.names=F,col.names=F) +# ---------------------- V+J+CDR3 sequence count ---------------------- + +VJCDR3.count = data.frame(table(clonalityFrame$Top.V.Gene, clonalityFrame$Top.J.Gene, clonalityFrame$CDR3.Seq.DNA)) +names(VJCDR3.count) = c("Top.V.Gene", "Top.J.Gene", "CDR3.Seq.DNA", "Count") + +VJCDR3.count = VJCDR3.count[VJCDR3.count$Count > 0,] +VJCDR3.count = VJCDR3.count[order(-VJCDR3.count$Count),] + +write.table(x=VJCDR3.count, file="VJCDR3_count.txt", sep="\t",quote=F,row.names=F,col.names=T) + # ---------------------- Frequency calculation for V, D and J ---------------------- print("Report Clonality - frequency calculation V, D and J")