X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=server%2Fcompbio%2Fstatistic%2FStatisticsProt.java;fp=server%2Fcompbio%2Fstatistic%2FStatisticsProt.java;h=df6fec51d358fbb102a46900451b27cf091a5b62;hb=a2da61d72212909ad6ededefdc06b04113e380e6;hp=0294747594bc89c7b40481353acb5c4e7cc1f5e2;hpb=e9b30dea3b174d340d695f122a2b57a02165e161;p=proteocache.git diff --git a/server/compbio/statistic/StatisticsProt.java b/server/compbio/statistic/StatisticsProt.java index 0294747..df6fec5 100644 --- a/server/compbio/statistic/StatisticsProt.java +++ b/server/compbio/statistic/StatisticsProt.java @@ -119,7 +119,7 @@ public class StatisticsProt { while (itCol.hasNext()) { String id = itCol.next().getName(); long lenResult = CountID(id); - if (lenResult <= 30) + if (lenResult <= 30) timeResult.set(0, timeResult.get(0) + 1); else if (lenResult > 30 && lenResult <= 60) timeResult.set(1, timeResult.get(1) + 1); @@ -129,6 +129,8 @@ public class StatisticsProt { timeResult.set(3, timeResult.get(3) + 1); } } + for (int i = 0; i < 4; i++) + totalTime.set(i, totalTime.get(i) + timeResult.get(i)); DataBase db = new DataBase(); db.setTimeRez(timeResult); db.setDate(DateFormat(dateStart)); @@ -136,6 +138,9 @@ public class StatisticsProt { } dateStart += MILLISECONDS_PER_DAY; } + DataBase db = new DataBase(); + db.setTimeTotalExec(totalTime); + query.add(db); System.out.println("StatisticsProt.readLength: total number of dates = " + query.size()); return query; } @@ -165,7 +170,7 @@ public class StatisticsProt { } // query by a protein sequence - public List readProtID() { + public List readProtID(int counter) { query = new ArrayList(); int row_count = 100000000; RangeSlicesQuery result = HFactory.createRangeSlicesQuery(cc.GetKeyspace(), StringSerializer.get(), @@ -190,7 +195,7 @@ public class StatisticsProt { ++npred; } } - if (npred > 3) { + if (npred >= counter) { DataBase db = new DataBase(); db.setProt(last_key); db.setTotalId(npred);