001/*
002 *                    BioJava development code
003 *
004 * This code may be freely distributed and modified under the
005 * terms of the GNU Lesser General Public Licence.  This should
006 * be distributed with the code.  If you do not have a copy,
007 * see:
008 *
009 *      http://www.gnu.org/copyleft/lesser.html
010 *
011 * Copyright for this code is held jointly by the individual
012 * authors.  These should be listed in @author doc comments.
013 *
014 * For more information on the BioJava project and its aims,
015 * or to join the biojava-l mailing list, visit the home page
016 * at:
017 *
018 *      http://www.biojava.org/
019 *
020 */
021package org.biojava.nbio.core.search.io.blast;
022
023/**
024 * Designed by Paolo Pavan.
025 * You may want to find my contacts on Github and LinkedIn for code info
026 * or discuss major changes.
027 * https://github.com/paolopavan
028 *
029 * @author Paolo Pavan
030 */
031
032public class BlastHspBuilder {
033        private int hspNum;
034        private double hspBitScore;
035        private int hspScore;
036        private double hspEvalue;
037        private int hspQueryFrom;
038        private int hspQueryTo;
039        private int hspHitFrom;
040        private int hspHitTo;
041        private int hspQueryFrame;
042        private int hspHitFrame;
043        private int hspIdentity;
044        private int hspPositive;
045        private int hspGaps;
046        private int hspAlignLen;
047        private String hspQseq;
048        private String hspHseq;
049        private String hspIdentityString;
050        private Double percentageIdentity;
051        private Integer mismatchCount;
052
053        public BlastHspBuilder() {
054        }
055
056        public BlastHspBuilder setHspNum(int hspNum) {
057                this.hspNum = hspNum;
058                return this;
059        }
060
061        public BlastHspBuilder setHspBitScore(double hspBitScore) {
062                this.hspBitScore = hspBitScore;
063                return this;
064        }
065
066        public BlastHspBuilder setHspScore(int hspScore) {
067                this.hspScore = hspScore;
068                return this;
069        }
070
071        public BlastHspBuilder setHspEvalue(double hspEvalue) {
072                this.hspEvalue = hspEvalue;
073                return this;
074        }
075
076        public BlastHspBuilder setHspQueryFrom(int hspQueryFrom) {
077                this.hspQueryFrom = hspQueryFrom;
078                return this;
079        }
080
081        public BlastHspBuilder setHspQueryTo(int hspQueryTo) {
082                this.hspQueryTo = hspQueryTo;
083                return this;
084        }
085
086        public BlastHspBuilder setHspHitFrom(int hspHitFrom) {
087                this.hspHitFrom = hspHitFrom;
088                return this;
089        }
090
091        public BlastHspBuilder setHspHitTo(int hspHitTo) {
092                this.hspHitTo = hspHitTo;
093                return this;
094        }
095
096        public BlastHspBuilder setHspQueryFrame(int hspQueryFrame) {
097                this.hspQueryFrame = hspQueryFrame;
098                return this;
099        }
100
101        public BlastHspBuilder setHspHitFrame(int hspHitFrame) {
102                this.hspHitFrame = hspHitFrame;
103                return this;
104        }
105
106        public BlastHspBuilder setHspIdentity(int hspIdentity) {
107                this.hspIdentity = hspIdentity;
108                return this;
109        }
110
111        public BlastHspBuilder setHspPositive(int hspPositive) {
112                this.hspPositive = hspPositive;
113                return this;
114        }
115
116        public BlastHspBuilder setHspGaps(int hspGaps) {
117                this.hspGaps = hspGaps;
118                return this;
119        }
120
121        public BlastHspBuilder setHspAlignLen(int hspAlignLen) {
122                this.hspAlignLen = hspAlignLen;
123                return this;
124        }
125
126        public BlastHspBuilder setHspQseq(String hspQseq) {
127                this.hspQseq = hspQseq;
128                return this;
129        }
130
131        public BlastHspBuilder setHspHseq(String hspHseq) {
132                this.hspHseq = hspHseq;
133                return this;
134        }
135
136        public BlastHspBuilder setHspIdentityString(String hspIdentityString) {
137                this.hspIdentityString = hspIdentityString;
138                return this;
139        }
140
141        public BlastHspBuilder setPercentageIdentity(Double percentageIdentity) {
142                this.percentageIdentity = percentageIdentity;
143                return this;
144        }
145
146        public BlastHspBuilder setMismatchCount(Integer mismatchCount) {
147                this.mismatchCount = mismatchCount;
148                return this;
149        }
150        public BlastHsp createBlastHsp() {
151                return new BlastHsp(hspNum, hspBitScore, hspScore, hspEvalue, hspQueryFrom, hspQueryTo, hspHitFrom, hspHitTo, hspQueryFrame, hspHitFrame, hspIdentity, hspPositive, hspGaps, hspAlignLen, hspQseq, hspHseq, hspIdentityString, percentageIdentity, mismatchCount);
152        }
153
154}