Mercurial > repos > davidvanzessen > clonal_sequences_in_paired_samples
comparison RScript.r @ 42:7d4eda663c29 draft
Uploaded
author | davidvanzessen |
---|---|
date | Mon, 14 Sep 2015 10:56:05 -0400 |
parents | f7c07faaa3e8 |
children | 2eef2c438500 |
comparison
equal
deleted
inserted
replaced
41:f7c07faaa3e8 | 42:7d4eda663c29 |
---|---|
175 first.merge = patient.fuzzy[1,"merge"] | 175 first.merge = patient.fuzzy[1,"merge"] |
176 first.clone.sequence = patient.fuzzy[1,"Clone_Sequence"] | 176 first.clone.sequence = patient.fuzzy[1,"Clone_Sequence"] |
177 | 177 |
178 merge.filter = first.merge == patient.fuzzy$merge | 178 merge.filter = first.merge == patient.fuzzy$merge |
179 | 179 |
180 match.filter = merge.filter & grepl(first.clone.sequence, patient.fuzzy$Clone_Sequence) | 180 length.filter = nchar(patient.fuzzy$Clone_Sequence) - nchar(first.clone.sequence) <= 9 |
181 | |
182 match.filter = merge.filter & grepl(first.clone.sequence, patient.fuzzy$Clone_Sequence) & length.filter | |
181 | 183 |
182 if(sum(match.filter) == 2){ | 184 if(sum(match.filter) == 2){ |
183 second.match = which(match.filter)[2] | 185 second.match = which(match.filter)[2] |
184 second.clone.sequence = patient.fuzzy[second.match,"Clone_Sequence"] | 186 second.clone.sequence = patient.fuzzy[second.match,"Clone_Sequence"] |
185 first.sample = patient.fuzzy[1,"Sample"] | 187 first.sample = patient.fuzzy[1,"Sample"] |