comparison RScript.r @ 43:2eef2c438500 draft

Uploaded
author davidvanzessen
date Mon, 14 Sep 2015 11:01:26 -0400
parents 7d4eda663c29
children 07278582b735
comparison
equal deleted inserted replaced
42:7d4eda663c29 43:2eef2c438500
177 177
178 merge.filter = first.merge == patient.fuzzy$merge 178 merge.filter = first.merge == patient.fuzzy$merge
179 179
180 length.filter = nchar(patient.fuzzy$Clone_Sequence) - nchar(first.clone.sequence) <= 9 180 length.filter = nchar(patient.fuzzy$Clone_Sequence) - nchar(first.clone.sequence) <= 9
181 181
182 match.filter = merge.filter & grepl(first.clone.sequence, patient.fuzzy$Clone_Sequence) & length.filter 182 sample.filter = patient.fuzzy[1,"Sample"] != patient.fuzzy$Sample
183
184 match.filter = merge.filter & grepl(first.clone.sequence, patient.fuzzy$Clone_Sequence) & length.filter & sample.filter
183 185
184 if(sum(match.filter) == 2){ 186 if(sum(match.filter) == 2){
185 second.match = which(match.filter)[2] 187 second.match = which(match.filter)[2]
186 second.clone.sequence = patient.fuzzy[second.match,"Clone_Sequence"] 188 second.clone.sequence = patient.fuzzy[second.match,"Clone_Sequence"]
187 first.sample = patient.fuzzy[1,"Sample"] 189 first.sample = patient.fuzzy[1,"Sample"]