| 1484 | } |
| 1485 | |
| 1486 | public static ArrayDeque<Integer> getPolyASignalPositions(String seq, Pattern pasPattern, Pattern tailPattern) { |
| 1487 | ArrayDeque<Integer> positions = new ArrayDeque<>(); |
| 1488 | |
| 1489 | Matcher tailMatcher = tailPattern.matcher(seq); |
| 1490 | if (tailMatcher.find()) { |
| 1491 | int tailStartPos = tailMatcher.start(); |
| 1492 | |
| 1493 | if (tailStartPos > 10) { |
| 1494 | Matcher pasMatcher = pasPattern.matcher(seq); |
| 1495 | pasMatcher.region(Math.max(0, tailStartPos-60), tailStartPos-10); |
| 1496 | |
| 1497 | while (pasMatcher.find()) { |
| 1498 | positions.add(pasMatcher.start()); |
| 1499 | } |
| 1500 | } |
| 1501 | } |
| 1502 | |
| 1503 | return positions; |
| 1504 | } |
| 1505 | |
| 1506 | public static int[] getPolyATailRegion(String seq, int searchRange, int window, int minWindowMatch, int seedSize) { |
| 1507 | // int searchRange = 100; |