(String path)
| 44 | } |
| 45 | |
| 46 | public static boolean isCorrectFormat(String path) { |
| 47 | try { |
| 48 | // try to get the first FASTA record |
| 49 | FastaReader reader = new FastaReader(path); |
| 50 | String seq = reader.next(); |
| 51 | reader.close(); |
| 52 | if (seq == null) { |
| 53 | return false; |
| 54 | } |
| 55 | } |
| 56 | catch (Exception e) { |
| 57 | return false; |
| 58 | } |
| 59 | |
| 60 | return true; |
| 61 | } |
| 62 | |
| 63 | @Override |
| 64 | public synchronized boolean hasNext() { |
no test coverage detected