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