git://source.jalview.org
/
proteocache.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fi bug for wrong job selection
[proteocache.git]
/
datadb
/
compbio
/
cassandra
/
CassandraReaderOld.java
diff --git
a/datadb/compbio/cassandra/CassandraReaderOld.java
b/datadb/compbio/cassandra/CassandraReaderOld.java
index
6055e60
..
ccd13ed
100644
(file)
--- a/
datadb/compbio/cassandra/CassandraReaderOld.java
+++ b/
datadb/compbio/cassandra/CassandraReaderOld.java
@@
-207,27
+207,24
@@
public class CassandraReaderOld {
* getting protein sequence from the db ProteinRow
*/
public Map<String, String> ReadProtein() {
* getting protein sequence from the db ProteinRow
*/
public Map<String, String> ReadProtein() {
- final long startTime = System.currentTimeMillis();
+ //final long startTime = System.currentTimeMillis();
String com = "SELECT * FROM ProteinRow;";
System.out.println("Command: " + com);
ResultSet results = session.execute(com);
if (results.isExhausted())
return null;
String com = "SELECT * FROM ProteinRow;";
System.out.println("Command: " + com);
ResultSet results = session.execute(com);
if (results.isExhausted())
return null;
- final long queryTime = System.currentTimeMillis();
+ //final long queryTime = System.currentTimeMillis();
List<Row> rows = results.all();
List<Row> rows = results.all();
- System.out.println("Query time is " + (queryTime - startTime) + " msec");
- System.out.println(" rows analysed, " + rows.size());
- Map<String, String> res = new HashMap<String, String>();
- int c = 0;
+ Map<String, String> output = new HashMap<String, String>();
for (Row r : rows) {
for (Row r : rows) {
- String prot = r.getString("Protein");
+ String protein = r.getString("Protein");
String prediction = findJnetpred(r.getMap("Predictions", String.class, String.class));
String prediction = findJnetpred(r.getMap("Predictions", String.class, String.class));
- if (prot != null || prediction != null)
- res.put(prot, prediction);
+ if (protein != null && prediction != null) {
+ output.put(protein, prediction);
+ }
}
}
- final long endTime = System.currentTimeMillis();
- System.out.println(c + " rows analysed, execution time is " + (endTime - startTime) + " msec");
- return res;
+ //final long endTime = System.currentTimeMillis();
+ return output;
}
private String findJnetpred(Map<String, String> pred) {
}
private String findJnetpred(Map<String, String> pred) {