/**
- * Adds capability to read in and write out HMMER3 files. Currently only supports HMMER3/f.
+ * Adds capability to read in and write out HMMER3 files. .
*
*
* @author TZVanaalten
*/
void parseAnnotations(Scanner scanner, int index)
{
- if (hmm.mapIsActive())
+ if (hmm.mapIsActive() && scanner.hasNext())
{
int column;
column = scanner.nextInt();
* @param numberOfElements
* The number of elements in the list to be filled.
* @return filled list Returns the list of doubles.
+ * @throws IOException
*/
static List<Double> fillList(Scanner input,
- int numberOfElements)
+ int numberOfElements) throws IOException
{
List<Double> list = new ArrayList<>();
for (int i = 0; i < numberOfElements; i++)
list.add(prob);
}
}
+ if (list.size() < numberOfElements)
+ {
+ throw new IOException("Incomplete data");
+ }
return list;
}