import java.util.Date;
import java.util.List;
+import compbio.data.sequence.FastaReader;
+import compbio.data.sequence.FastaSequence;
+
public class JpredParserLocalFile implements JpredParser {
- private CassandraNativeConnector cc = new CassandraNativeConnector();
+ private CassandraWriter cw = new CassandraWriter();
private String dirprefix;
public void setSource(String newsourceprefix) {
this.dirprefix = newsourceprefix;
}
- JpredParserLocalFile() {
+ public JpredParserLocalFile() {
this.dirprefix = "/home/asherstnev/Projects/Java.projects/proteocache/data_stress_test/data.dat";
}
- JpredParserLocalFile(String sourceurl) {
+ public JpredParserLocalFile(String sourceurl) {
this.dirprefix = sourceurl;
}
System.out.println("Execution Time = " + execTime + " ms");
}
- private int ParsingForDate(List<String> input, String date) {
+ private void ParsingForDate(List<String> input, String date) {
int totalcount = 0;
int countNoData = 0;
int countUnclearFASTAid = 0;
int countinserted = 0;
int counAlignments = 0;
int countStrange = 0;
- int njobs = 0;
System.out.println("Inserting jobs for " + date);
for (String in : input) {
- if (in.matches(date + "(.*)jp_[^\\s]+")) {
+ if (in.matches(date + ":(.*)jp_[^\\s]+")) {
String[] table = in.split("\\s+");
String starttime = table[0];
String finishtime = table[1];
} catch (ParseException e) {
e.printStackTrace();
}
- cc.InsertData(insertdate, starttime, finishtime, ip, id, "OK", "OK", newprotein, seqs);
- ++countinsertions;
- ++njobs;
+ //countinsertions += cw.FormQueryTables(insertdate, starttime, finishtime, ip, id, "OK", "OK", newprotein, seqs);
}
fr.close();
} catch (IOException e) {
System.out.println(" " + countUnclearFASTAid + " jobs with unclear FASTA protein id in *.concise.fasta");
System.out.println(" " + countinsertions + " new job insertions\n");
}
- return njobs;
}
}