view change_o/define_clones.r @ 6:ea9d5fc4c001 draft default tip

"planemo upload commit 9ada186a78831ca2618ec817a23a77de6adf1a5d"
author rhpvorderman
date Wed, 22 Dec 2021 11:29:16 +0000
parents 64d74ba01a7c
children
line wrap: on
line source

args <- commandArgs(trailingOnly = TRUE)

input=args[1]
output=args[2]

change.o = read.table(input, header=T, sep="\t", quote="", stringsAsFactors=F)

freq = data.frame(table(change.o$CLONE))
freq2 = data.frame(table(freq$Freq))

freq2$final = as.numeric(freq2$Freq) * as.numeric(as.character(freq2$Var1))

names(freq2) = c("Clone size", "Nr of clones", "Nr of sequences")

write.table(x=freq2, file=output, sep="\t",quote=F,row.names=F,col.names=T)