Package ngs

# Interface ReferenceSequence

public interface ReferenceSequence
Represents a reference sequence standalone object

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getCanonicalName()`
  getCanonicalName
  `boolean`
  `getIsCircular()`
  getIsCircular
  `long`
  `getLength()`
  getLength
  `String`
  `getReferenceBases(long offset)`
  getReferenceBases
  `String`
  `getReferenceBases(long offset, long length)`
  getReferenceBases
  `String`
  `getReferenceChunk(long offset)`
  getReferenceChunk
  `String`
  `getReferenceChunk(long offset, long length)`
  getReferenceChunk

- ## Method Details

  - ### getCanonicalName

    String getCanonicalName() throws ErrorMsg
    getCanonicalName
    Returns:
      the accessioned name of reference, e.g. "NC_000001.11"
    Throws:
      `ErrorMsg` - if no cannonical name found

  - ### getIsCircular

    boolean getIsCircular() throws ErrorMsg
    getIsCircular
    Returns:
      true if reference is circular
    Throws:
      `ErrorMsg` - if cannot detect if reference is circular

  - ### getLength

    long getLength() throws ErrorMsg
    getLength
    Returns:
      the length of the reference sequence
    Throws:
      `ErrorMsg` - if length cannot be detected

  - ### getReferenceBases

    String getReferenceBases(long offset) throws ErrorMsg
    getReferenceBases
    Parameters:
      `offset` - is zero-based and non-negative
    Returns:
      sub-sequence bases for Reference
    Throws:
      `ErrorMsg` - if no reference-bases found at offset

  - ### getReferenceBases

    String getReferenceBases(long offset, long length) throws ErrorMsg
    getReferenceBases
    Parameters:
      `offset` - is zero-based and non-negative
      `length` - must be ≥ 0
    Returns:
      sub-sequence bases for Reference
    Throws:
      `ErrorMsg` - if no reference-bases found at offset or lenght invalid

  - ### getReferenceChunk

    String getReferenceChunk(long offset) throws ErrorMsg
    getReferenceChunk
    Parameters:
      `offset` - is zero-based and non-negative
    Returns:
      largest contiguous chunk available of sub-sequence bases for Reference

      NB - actual returned sequence may be shorter than requested. to obtain all bases available in chunk, use a negative "size" value

    Throws:
      `ErrorMsg` - if no ReferenceChunk found

  - ### getReferenceChunk

    String getReferenceChunk(long offset, long length) throws ErrorMsg
    getReferenceChunk
    Parameters:
      `offset` - is zero-based and non-negative
      `length` - must be > 0
    Returns:
      largest contiguous chunk available of sub-sequence bases for Reference

      NB - actual returned sequence may be shorter than requested. to obtain all bases available in chunk, use a negative "size" value

    Throws:
      `ErrorMsg` - if no ReferenceChunk found