|
24 | 24 | package htsjdk.samtools;
|
25 | 25 |
|
26 | 26 |
|
27 |
| -import htsjdk.variant.variantcontext.VariantContext; |
28 | 27 |
|
29 | 28 | import java.math.BigInteger;
|
30 |
| -import java.net.URI; |
31 |
| -import java.net.URISyntaxException; |
32 | 29 | import java.util.Arrays;
|
33 | 30 | import java.util.HashSet;
|
34 | 31 | import java.util.Map;
|
35 | 32 | import java.util.Set;
|
36 | 33 | import java.util.regex.Pattern;
|
| 34 | +import htsjdk.samtools.util.Locatable; |
37 | 35 |
|
38 | 36 | /**
|
39 | 37 | * Header information about a reference sequence. Corresponds to @SQ header record in SAM text header.
|
40 | 38 | */
|
41 | 39 |
|
42 |
| -public class SAMSequenceRecord extends AbstractSAMHeaderRecord implements Cloneable |
| 40 | +public class SAMSequenceRecord extends AbstractSAMHeaderRecord implements Cloneable, Locatable |
43 | 41 | {
|
44 | 42 | public static final long serialVersionUID = 1L; // AbstractSAMHeaderRecord implements Serializable
|
45 | 43 | public final static int UNAVAILABLE_SEQUENCE_INDEX = -1;
|
@@ -228,5 +226,26 @@ public String toString() {
|
228 | 226 | public String getSAMString() {
|
229 | 227 | return new SAMTextHeaderCodec().getSQLine(this);
|
230 | 228 | }
|
| 229 | + /** always returns <code>getSequenceName()</code> |
| 230 | + * @see #getSequenceName() |
| 231 | + * */ |
| 232 | + @Override |
| 233 | + public final String getContig() { |
| 234 | + return this.getSequenceName(); |
| 235 | + } |
| 236 | + |
| 237 | + /** always returns 1 */ |
| 238 | + @Override |
| 239 | + public final int getStart() { |
| 240 | + return 1; |
| 241 | + } |
| 242 | + |
| 243 | + /** always returns <code>getSequenceLength()</code> |
| 244 | + * @see #getSequenceLength() |
| 245 | + * */ |
| 246 | + @Override |
| 247 | + public final int getEnd() { |
| 248 | + return this.getSequenceLength(); |
| 249 | + } |
231 | 250 | }
|
232 | 251 |
|
0 commit comments