1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package org.utgenome.format.axt;
24
25 import java.io.IOException;
26 import java.io.Writer;
27
28
29
30
31
32
33
34 public class AXTAlignment {
35
36 public int num;
37 public String s_chr;
38 public int s_start;
39 public int s_end;
40 public String d_chr;
41 public int d_start;
42 public int d_end;
43 public String strand;
44 public int score;
45
46 public String primaryAssembly;
47 public String aligningAssembly;
48
49 public void toAXT(Writer out) throws IOException {
50 out.append(Integer.toString(num));
51 out.append("\t");
52 out.append(s_chr);
53 out.append("\t");
54 out.append(Integer.toString(s_start));
55 out.append("\t");
56 out.append(Integer.toString(s_end));
57 out.append("\t");
58 out.append(d_chr);
59 out.append("\t");
60 out.append(Integer.toString(d_start));
61 out.append("\t");
62 out.append(Integer.toString(d_end));
63 out.append("\t");
64 out.append(strand);
65 out.append("\t");
66 out.append(Integer.toString(score));
67 out.append("\n");
68
69 out.append(primaryAssembly);
70 out.append("\n");
71 out.append(aligningAssembly);
72 out.append("\n");
73 out.append("\n");
74 }
75
76 @Override
77 public boolean equals(Object obj) {
78
79 AXTAlignment other = AXTAlignment.class.cast(obj);
80 if (num != other.num)
81 return false;
82 if (!s_chr.equals(other.s_chr))
83 return false;
84 if (s_start != other.s_start)
85 return false;
86 if (s_end != other.s_end)
87 return false;
88 if (!d_chr.equals(other.d_chr))
89 return false;
90 if (d_start != other.d_start)
91 return false;
92 if (d_end != other.d_end)
93 return false;
94 if (!primaryAssembly.equals(other.primaryAssembly))
95 return false;
96 if (!aligningAssembly.equals(other.aligningAssembly))
97 return false;
98 if (score != other.score)
99 return false;
100
101 return true;
102 }
103
104 }