comparison RScript.r @ 4:89d80f086328 draft

Uploaded
author davidvanzessen
date Mon, 25 Sep 2017 08:20:12 -0400
parents 20f0df3721aa
children bcf1469e8feb
comparison
equal deleted inserted replaced
3:20f0df3721aa 4:89d80f086328
45 dat$J_Segment_Major_Gene = as.factor(as.character(lapply(strsplit(as.character(dat$J_Segment_Major_Gene), "; "), "[[", 1))) 45 dat$J_Segment_Major_Gene = as.factor(as.character(lapply(strsplit(as.character(dat$J_Segment_Major_Gene), "; "), "[[", 1)))
46 46
47 cat("<tr><td>Calculating Frequency</td></tr>", file=logfile, append=T) 47 cat("<tr><td>Calculating Frequency</td></tr>", file=logfile, append=T)
48 48
49 dat$Frequency = ((10^dat$Log10_Frequency)*100) 49 dat$Frequency = ((10^dat$Log10_Frequency)*100)
50 dat = dat[dat$Frequency <= 100,] #just in case
50 51
51 dat = dat[dat$Frequency >= min_freq,] 52 dat = dat[dat$Frequency >= min_freq,]
52 53
53 patient.sample.counts = data.frame(data.table(dat)[, list(count=.N), by=c("Patient", "Sample")]) 54 patient.sample.counts = data.frame(data.table(dat)[, list(count=.N), by=c("Patient", "Sample")])
54 patient.sample.counts = data.frame(data.table(patient.sample.counts)[, list(count=.N), by=c("Patient")]) 55 patient.sample.counts = data.frame(data.table(patient.sample.counts)[, list(count=.N), by=c("Patient")])