| 172 | | object Event(fileName:String, refSeq:String, sampleSeq:String, startPos:ZZ32, endPos:ZZ32) |
| 173 | | getter fileName():String = fileName |
| 174 | | getter refSeq():String = refSeq |
| 175 | | getter sampleSeq():String = sampleSeq |
| 176 | | getter startPos():ZZ32 = startPos |
| 177 | | getter endPos():ZZ32 = endPos |
| 178 | | |
| 179 | | isValid():Boolean = true |
| 180 | | |
| 181 | | compare(other:Event):Boolean = true |
| 182 | | check_valid():Boolean = true |
| 183 | | end |
| 184 | | |
| 238 | | sampleCompare(ref:FlatString, sample:FlatString):String = do |
| 239 | | last:ZZ32 = |ref| MIN |sample| |
| 240 | | var result:String = "" |
| 241 | | var index:ZZ32 = 0 |
| 242 | | while (index < last) do |
| 243 | | if (ref.get(index) =/= sample.get(index)) then |
| 244 | | result := result || 'X' |
| 245 | | else result := result || '.' |
| 246 | | end |
| 247 | | index:= index + 1 |
| | 227 | object Event(fileName:String, refSeq:String, sampleSeq:String, startPos:ZZ32, endPos:ZZ32) |
| | 228 | getter fileName():String = fileName |
| | 229 | getter refSeq():String = refSeq |
| | 230 | getter sampleSeq():String = sampleSeq |
| | 231 | getter startPos():ZZ32 = startPos |
| | 232 | getter endPos():ZZ32 = endPos |
| | 233 | end |
| | 234 | |
| | 235 | (* This code is a little obtuse. The idea is that if the sample differs from the reference |
| | 236 | chicken in more than one consecutive location it may be an interesting mutation. We look |
| | 237 | for these potential interesting mutations and return a list of them. |
| | 238 | *) |
| | 239 | |
| | 240 | makeTuple(loc:ZZ32, diffs:String):(ZZ32,ZZ32) = do |
| | 241 | temp:String = diffs.asFlatString().javaSubstr(loc).javaRegExpSplit("\\.",0) |
| | 242 | (loc, |temp|) |
| | 243 | end |
| | 244 | |
| | 245 | isInteresting(loc:ZZ32, diffs:String):Boolean = do |
| | 246 | if loc = 0 OR: diffs.get(loc) = '.' OR: loc = (|diffs| - 1) OR: (diffs.get(loc - 1) = 'X') OR: (|diffs.asFlatString().javaSubstr(loc).javaRegExpSplit("\\.",0)| < 2) then |
| | 247 | false |
| | 248 | else true |