From 495433675d58b93a2ea5c635c8e97b8b3fff327a Mon Sep 17 00:00:00 2001 From: Subrata Saha Date: Wed, 28 Sep 2016 12:47:22 -0400 Subject: [PATCH] Create Contig.java --- COMPRESSION/Contig.java | 63 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 COMPRESSION/Contig.java diff --git a/COMPRESSION/Contig.java b/COMPRESSION/Contig.java new file mode 100644 index 0000000..c3df182 --- /dev/null +++ b/COMPRESSION/Contig.java @@ -0,0 +1,63 @@ +import java.util.List; + +public class Contig implements Comparable { + + private int contigId; + private List fragmentSizeList; + private double matchedScore; + private int startingPosition; + private int endingPosition; + + public int getStartingPosition() { + return startingPosition; + } + + public void setStartingPosition(int startingPosition) { + this.startingPosition = startingPosition; + } + + public int getEndingPosition() { + return endingPosition; + } + + public void setEndingPosition(int endingPosition) { + this.endingPosition = endingPosition; + } + + public int getContigId() { + return contigId; + } + + public void setContigId(int contigId) { + this.contigId = contigId; + } + + public List getFragmentSizeList() { + return fragmentSizeList; + } + + public void setFragmentSizeList(List fragmentSizeList) { + this.fragmentSizeList = fragmentSizeList; + } + + public double getMatchedScore() { + return matchedScore; + } + + public void setMatchedScore(double matchedScore) { + this.matchedScore = matchedScore; + } + + public int compareTo(Object obj) { + Contig tmp = (Contig) obj; + if ((this.matchedScore) < (tmp.matchedScore)) { +/* instance lt received */ + return -1; + } else if ((this.matchedScore) > (tmp.matchedScore)) { +/* instance gt received */ + return 1; + } +/* instance == received */ + return 0; + } +}