Mercurial > repos > davidvanzessen > clonal_sequences_in_paired_samples
diff RScript.r @ 54:ef5ffc8a6e37 draft
Uploaded
author | davidvanzessen |
---|---|
date | Tue, 13 Oct 2015 09:13:24 -0400 |
parents | 8ebe57feecd6 |
children | 43ce3ebfc9b5 |
line wrap: on
line diff
--- a/RScript.r Mon Oct 12 10:48:32 2015 -0400 +++ b/RScript.r Tue Oct 13 09:13:24 2015 -0400 @@ -67,7 +67,7 @@ patient.merge.list = list() #cache the 'both' table, 2x speedup for more memory... patient.merge.list.second = list() - +cat(paste("<table border='0'>", sep=""), file="multiple_matches.html", append=T) patientCountOnColumn <- function(x, product, interval, on, appendtxt=F){ if (!is.data.frame(x) & is.list(x)){ x = x[[1]] @@ -175,7 +175,6 @@ merge.list[["second"]] = vector() - while(nrow(patient.fuzzy) > 1){ first.merge = patient.fuzzy[1,"merge"] first.clone.sequence = patient.fuzzy[1,"Clone_Sequence"] @@ -234,7 +233,7 @@ second.rows.j = table(second.rows$J_Segment_Major_Gene) second.rows.j = names(second.rows.j[which.max(second.rows.j)]) - second.sum = data.frame(merge = first.clone.sequence, + second.sum = data.frame(merge = paste(first.clone.sequence, "*", sep=""), Patient = patient, Receptor = second.rows[1,"Receptor"], Sample = second.rows[1,"Sample"], @@ -270,7 +269,7 @@ } if(nrow(first.rows) > 1 | nrow(second.rows) > 1){ - + cat(paste("<tr><td>", patient, ": ", nrow(first.rows), " ", nrow(second.rows), " ", first.clone.sequence, "</td></tr>", sep=""), file="multiple_matches.html", append=T) } } else {