| 1 | package jasper; |
| 2 | |
| 3 | public class Comparison { |
| 4 | |
| 5 | /** |
| 6 | * Object for storing sequence similarity values between two nodes |
| 7 | * @param queryID_ int Node ID of the primary query sequence. |
| 8 | * @param refID_ int Node ID of the reference sequence. |
| 9 | * @param identity_ double similarity value between both nodes. |
| 10 | */ |
| 11 | public Comparison(int queryID_, int refID_, double identity_) { |
| 12 | |
| 13 | //Set the queryID as the input value |
| 14 | this.queryID = queryID_; |
| 15 | |
| 16 | //Set the refID as the input value |
| 17 | this.refID = refID_; |
| 18 | |
| 19 | //Set the identity as the input value |
| 20 | this.identity = identity_; |
| 21 | } |
| 22 | /** |
| 23 | * toString method to return the queryID, the refID and the similarity with some formatting. |
| 24 | */ |
| 25 | public String toString() { |
| 26 | return "Query node ID = " + queryID + ", Reference node ID = " + refID + |
| 27 | ", Similarity identity = " + identity; |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * Current node/organism of focus. |
| 32 | */ |
| 33 | int queryID; |
| 34 | |
| 35 | /** |
| 36 | * Node being compared to the queryID node. |
| 37 | */ |
| 38 | int refID; |
| 39 | |
| 40 | /** |
| 41 | * Similarity between the queryID node and the refID node. |
| 42 | */ |
| 43 | double identity; |
| 44 | |
| 45 | } |