Mercurial > repos > davidvanzessen > mutation_analysis
annotate change_o/define_clones.r @ 123:0453ea4d9f14 draft
Uploaded
| author | davidvanzessen |
|---|---|
| date | Mon, 22 Aug 2016 07:00:23 -0400 |
| parents | 613278c1bde0 |
| children |
| rev | line source |
|---|---|
| 120 | 1 args <- commandArgs(trailingOnly = TRUE) |
| 2 | |
| 3 input=args[1] | |
| 4 output=args[2] | |
| 5 | |
| 6 change.o = read.table(input, header=T, sep="\t", quote="", stringsAsFactors=F) | |
| 7 | |
| 8 freq = data.frame(table(change.o$CLONE)) | |
| 9 freq2 = data.frame(table(freq$Freq)) | |
| 10 | |
| 11 freq2$final = as.numeric(freq2$Freq) * as.numeric(as.character(freq2$Var1)) | |
| 12 | |
| 13 names(freq2) = c("Clone size", "Nr of clones", "Nr of sequences") | |
| 14 | |
| 15 write.table(x=freq2, file=output, sep="\t",quote=F,row.names=F,col.names=T) |
