View Javadoc

1   /*--------------------------------------------------------------------------
2    *  Copyright 2008 utgenome.org
3    *
4    *  Licensed under the Apache License, Version 2.0 (the "License");
5    *  you may not use this file except in compliance with the License.
6    *  You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *  Unless required by applicable law or agreed to in writing, software
11   *  distributed under the License is distributed on an "AS IS" BASIS,
12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *  See the License for the specific language governing permissions and
14   *  limitations under the License.
15   *--------------------------------------------------------------------------*/
16  //--------------------------------------
17  // utgb-core Project
18  //
19  // Alignment.java
20  // Since: Sep 5, 2008
21  //
22  // $URL$ 
23  // $Author$
24  //--------------------------------------
25  package org.utgenome.gwt.utgb.client.bio;
26  
27  import java.util.ArrayList;
28  
29  import com.google.gwt.user.client.rpc.IsSerializable;
30  
31  /**
32   * Alignment result
33   * 
34   * @author leo
35   * 
36   */
37  public class Alignment implements IsSerializable {
38  
39  	private int numMatch;
40  	private int numMisMatch;
41  	private int numRepMatch;
42  	private int numN;
43  
44  	// query sequence
45  	private String queryName;
46  	private int querySize;
47  	private int queryStart;
48  	private int queryEnd;
49  
50  	// target sequence
51  	private String targetName;
52  	private int targetSize;
53  	private int targetStart;
54  	private int targetEnd;
55  
56  	private String strand; // "+" or "-"
57  
58  	// alignment blocks
59  	private int blockCount = 0;
60  	private ArrayList<Integer> blockSizeList = new ArrayList<Integer>();
61  	private ArrayList<Integer> queryStartList = new ArrayList<Integer>();
62  	private ArrayList<Integer> targetStartList = new ArrayList<Integer>();
63  
64  	public int getNumMatch() {
65  		return numMatch;
66  	}
67  
68  	public int getQueryLen() {
69  		return querySize;
70  	}
71  
72  	public void setQueryLen(int querySize) {
73  		this.querySize = querySize;
74  	}
75  
76  	public int getTargetSize() {
77  		return targetSize;
78  	}
79  
80  	public void setTargetSize(int targetSize) {
81  		this.targetSize = targetSize;
82  	}
83  
84  	public void setNumMatch(int numMatch) {
85  		this.numMatch = numMatch;
86  	}
87  
88  	public int getNumMisMatch() {
89  		return numMisMatch;
90  	}
91  
92  	public void setNumMisMatch(int numMisMatch) {
93  		this.numMisMatch = numMisMatch;
94  	}
95  
96  	public int getNumRepMatch() {
97  		return numRepMatch;
98  	}
99  
100 	public void setNumRepMatch(int numRepMatch) {
101 		this.numRepMatch = numRepMatch;
102 	}
103 
104 	public int getNumN() {
105 		return numN;
106 	}
107 
108 	public void setNumN(int numN) {
109 		this.numN = numN;
110 	}
111 
112 	public String getQueryName() {
113 		return queryName;
114 	}
115 
116 	public void setQueryName(String queryName) {
117 		this.queryName = queryName;
118 	}
119 
120 	public long getQueryStart() {
121 		return queryStart;
122 	}
123 
124 	public void setQueryStart(int queryStart) {
125 		this.queryStart = queryStart;
126 	}
127 
128 	public long getQueryEnd() {
129 		return queryEnd;
130 	}
131 
132 	public void setQueryEnd(int queryEnd) {
133 		this.queryEnd = queryEnd;
134 	}
135 
136 	public String getTargetName() {
137 		return targetName;
138 	}
139 
140 	public void setTargetName(String targetName) {
141 		this.targetName = targetName;
142 	}
143 
144 	public int getTargetStart() {
145 		return targetStart;
146 	}
147 
148 	public void setTargetStart(int targetStart) {
149 		this.targetStart = targetStart;
150 	}
151 
152 	public int getTargetEnd() {
153 		return targetEnd;
154 	}
155 
156 	public void setTargetEnd(int targetEnd) {
157 		this.targetEnd = targetEnd;
158 	}
159 
160 	public String getStrand() {
161 		return strand;
162 	}
163 
164 	public boolean isPlusStrand() {
165 		return strand.equals("+");
166 	}
167 
168 	public void setStrand(String strand) {
169 		this.strand = strand;
170 	}
171 
172 	public int getBlockCount() {
173 		return blockCount;
174 	}
175 
176 	public void setBlockCount(int blockCount) {
177 		this.blockCount = blockCount;
178 	}
179 
180 	public ArrayList<Integer> getBlockSizes() {
181 		return blockSizeList;
182 	}
183 
184 	public ArrayList<Integer> getQueryStarts() {
185 		return queryStartList;
186 	}
187 
188 	public ArrayList<Integer> getTargetStarts() {
189 		return targetStartList;
190 	}
191 
192 	public void addBlockSizes(int blockSize) {
193 		this.blockSizeList.add(blockSize);
194 	}
195 
196 	public void addQueryStarts(int queryStart) {
197 		this.queryStartList.add(queryStart);
198 	}
199 
200 	public void addTargetStarts(int targetStart) {
201 		this.targetStartList.add(targetStart);
202 	}
203 
204 }