+ private String parsePredictions(final InputStream stream, String jobid) throws FileNotFoundException {
+ final FastaReader fr = new FastaReader(stream);
+ String query = "";
+ alignment = new ArrayList<FastaSequence>();
+ predictions = new ArrayList<FastaSequence>();
+ while (fr.hasNext()) {
+ final FastaSequence fs = fr.next();
+ String seqid = fs.getId();
+ String seq = fs.getSequence().replaceAll("\n", "");
+ if (seqid.equals("QUERY") || seqid.equals(jobid)) {
+ query = seq;
+ alignment.add(fs);
+ } else if (seqid.equals("jnetpred") || seqid.equals("Lupas_21") || seqid.equals("Lupas_14") || seqid.equals("Lupas_28")
+ || seqid.equals("JNETSOL25") || seqid.equals("JNETSOL5") || seqid.equals("JNETSOL0") || seqid.equals("JNETCONF")
+ || seqid.equals("JNETHMM") || seqid.equals("JNETPSSM")) {
+ predictions.add(fs);
+ if (seqid.equals("jnetpred"))
+ jnetpred = seq;
+ } else {
+ alignment.add(fs);
+ }
+ }
+ return query;
+ }
+
+ private String parseLogFile(final InputStream stream) throws IOException {
+ String out = "";
+ BufferedReader buffer = new BufferedReader(new InputStreamReader(stream));
+ String line;
+ while (null != (line = buffer.readLine())) {
+ out += line;
+ }
+ return out;
+ }
+
+ private List<Byte> parseArchiveFile(final InputStream stream) throws IOException {
+ DataInputStream data_in = new DataInputStream(stream);
+ List<Byte> out = new ArrayList<Byte>();
+ while (true) {
+ try {
+ out.add(data_in.readByte());
+ } catch (EOFException eof) {
+ break;
+ }
+ }
+ return out;
+ }
+
+ private void ParsingForDate(String input, String date) {