Mercurial > repos > davidvanzessen > clonal_sequences_in_paired_samples
diff RScript.r @ 14:1735e91a8f4b draft
Uploaded
author | davidvanzessen |
---|---|
date | Thu, 05 Feb 2015 06:20:36 -0500 |
parents | 576de7c96c4f |
children | d137974763b3 |
line wrap: on
line diff
--- a/RScript.r Thu Jan 22 07:12:13 2015 -0500 +++ b/RScript.r Thu Feb 05 06:20:36 2015 -0500 @@ -125,8 +125,8 @@ both = (grepl(V_Segment, patientMerge$V_Segment_Major_Gene.x) & grepl(J_Segment, patientMerge$J_Segment_Major_Gene.x) & patientMerge[,paste(on, ".x", sep="")] > threshhold & patientMerge[,paste(on, ".y", sep="")] > threshhold) one = (grepl(V_Segment, patient1$V_Segment_Major_Gene) & grepl(J_Segment, patient1$J_Segment_Major_Gene) & patient1[,on] > threshhold & !(patient1$CDR3_Sense_Sequence %in% patientMerge[both,]$CDR3_Sense_Sequence.x)) two = (grepl(V_Segment, patient2$V_Segment_Major_Gene) & grepl(J_Segment, patient2$J_Segment_Major_Gene) & patient2[,on] > threshhold & !(patient2$CDR3_Sense_Sequence %in% patientMerge[both,]$CDR3_Sense_Sequence.x)) - read1Count = append(read1Count, sum(patient1[one,]$normalized_read_count) + sum(patientMerge[both,]$normalized_read_count.x)) - read2Count = append(read2Count, sum(patient2[two,]$normalized_read_count) + sum(patientMerge[both,]$normalized_read_count.y)) + read1Count = append(read1Count, sum(patient1[one,]$normalized_read_count)) + read2Count = append(read2Count, sum(patient2[two,]$normalized_read_count)) res1 = append(res1, sum(one)) res2 = append(res2, sum(two)) resBoth = append(resBoth, sum(both)) @@ -269,9 +269,9 @@ two = (grepl(V_Segment, patient2$V_Segment_Major_Gene) & grepl(J_Segment, patient2$J_Segment_Major_Gene) & patient2[,on] > threshhold & !(patient2$CDR3_Sense_Sequence %in% patientMerge[all,]$CDR3_Sense_Sequence.x)) three = (grepl(V_Segment, patient3$V_Segment_Major_Gene) & grepl(J_Segment, patient3$J_Segment_Major_Gene) & patient3[,on] > threshhold & !(patient3$CDR3_Sense_Sequence %in% patientMerge[all,]$CDR3_Sense_Sequence.x)) - read1Count = append(read1Count, sum(patient1[one,]$normalized_read_count) + sum(patientMerge[all,]$normalized_read_count.x)) - read2Count = append(read2Count, sum(patient2[two,]$normalized_read_count) + sum(patientMerge[all,]$normalized_read_count.y)) - read3Count = append(read3Count, sum(patient3[three,]$normalized_read_count) + sum(patientMerge[all,]$normalized_read_count.z)) + read1Count = append(read1Count, sum(patient1[one,]$normalized_read_count)) + read2Count = append(read2Count, sum(patient2[two,]$normalized_read_count)) + read3Count = append(read3Count, sum(patient3[three,]$normalized_read_count)) res1 = append(res1, sum(one)) res2 = append(res2, sum(two)) res3 = append(res3, sum(three))