Mercurial > repos > davidvanzessen > clonal_sequences_in_paired_samples
comparison RScript.r @ 63:39ea37070e90 draft
Uploaded
author | davidvanzessen |
---|---|
date | Wed, 04 Nov 2015 11:02:01 -0500 |
parents | b1ad6f515338 |
children | 39fff0180d41 |
comparison
equal
deleted
inserted
replaced
62:b1ad6f515338 | 63:39ea37070e90 |
---|---|
712 patient.fuzzy = patient.fuzzy[!(match.filter.1 | match.filter.3),] | 712 patient.fuzzy = patient.fuzzy[!(match.filter.1 | match.filter.3),] |
713 | 713 |
714 hidden.clone.sequences = c(rows.1[-1,"Clone_Sequence"], rows.3[rows.3$Clone_Sequence != first.clone.sequence,"Clone_Sequence"]) | 714 hidden.clone.sequences = c(rows.1[-1,"Clone_Sequence"], rows.3[rows.3$Clone_Sequence != first.clone.sequence,"Clone_Sequence"]) |
715 merge.list[["second"]] = append(merge.list[["second"]], hidden.clone.sequences) | 715 merge.list[["second"]] = append(merge.list[["second"]], hidden.clone.sequences) |
716 | 716 |
717 } else if(nrow(rows.1) > 1){ | |
718 patient1 = patient1[!(patient1$Clone_Sequence %in% rows.1$Clone_Sequence),] | |
719 patient1 = rbind(patient1, sum.1) | |
720 patient.fuzzy = patient.fuzzy[-match.filter.1,] | |
717 } else { | 721 } else { |
718 patient.fuzzy = patient.fuzzy[-1,] | 722 patient.fuzzy = patient.fuzzy[-1,] |
719 } | 723 } |
720 | 724 |
721 tmp.rows = rbind(rows.1, rows.2, rows.3) | 725 tmp.rows = rbind(rows.1, rows.2, rows.3) |
743 patientMerge$thresholdValue = pmax(patientMerge[,onx], patientMerge[,ony], patientMerge[,onz]) | 747 patientMerge$thresholdValue = pmax(patientMerge[,onx], patientMerge[,ony], patientMerge[,onz]) |
744 patientMerge12$thresholdValue = pmax(patientMerge12[,onx], patientMerge12[,ony]) | 748 patientMerge12$thresholdValue = pmax(patientMerge12[,onx], patientMerge12[,ony]) |
745 patientMerge13$thresholdValue = pmax(patientMerge13[,onx], patientMerge13[,ony]) | 749 patientMerge13$thresholdValue = pmax(patientMerge13[,onx], patientMerge13[,ony]) |
746 patientMerge23$thresholdValue = pmax(patientMerge23[,onx], patientMerge23[,ony]) | 750 patientMerge23$thresholdValue = pmax(patientMerge23[,onx], patientMerge23[,ony]) |
747 | 751 |
748 patient1 = patient1[!(patient1$Clone_Sequence %in% patient.merge.list.second[[label1]]),] | 752 patient1 = patient1[!(patient1$Clone_Sequence %in% merge.list[["second"]]),] |
749 patient2 = patient2[!(patient2$Clone_Sequence %in% patient.merge.list.second[[label1]]),] | 753 patient2 = patient2[!(patient2$Clone_Sequence %in% merge.list[["second"]]),] |
750 patient2 = patient3[!(patient3$Clone_Sequence %in% patient.merge.list.second[[label1]]),] | 754 patient3 = patient3[!(patient3$Clone_Sequence %in% merge.list[["second"]]),] |
751 | 755 |
752 if(F){ | 756 if(F){ |
753 patientMerge = merge(patient1, patient2, by="merge") | 757 patientMerge = merge(patient1, patient2, by="merge") |
754 patientMerge = merge(patientMerge, patient3, by="merge") | 758 patientMerge = merge(patientMerge, patient3, by="merge") |
755 colnames(patientMerge)[which(!grepl("(\\.x$)|(\\.y$)|(merge)", names(patientMerge)))] = paste(colnames(patientMerge)[which(!grepl("(\\.x$)|(\\.y$)|(merge)", names(patientMerge), perl=T))], ".z", sep="") | 759 colnames(patientMerge)[which(!grepl("(\\.x$)|(\\.y$)|(merge)", names(patientMerge)))] = paste(colnames(patientMerge)[which(!grepl("(\\.x$)|(\\.y$)|(merge)", names(patientMerge), perl=T))], ".z", sep="") |