edu.unc.csbio.data
Class ExtendedSequenceBuffer

java.lang.Object
  extended by edu.unc.csbio.data.SequenceBuffer
      extended by edu.unc.csbio.data.ExtendedSequenceBuffer

public class ExtendedSequenceBuffer
extends SequenceBuffer

The class extending SequenceBuffer for handling structure variants in the sequence.

Version:
0.1
Author:
Shunping Huang , Jack Wang

Field Summary
private  java.util.ArrayList<Feature> sv
          An ArrayList of Feature representing structure variants in the sequence
 
Constructor Summary
ExtendedSequenceBuffer(java.lang.String _raw, int _offset, java.util.ArrayList<Feature> _sv)
          A constructor for object ExtendedSequenceBuffer
 
Method Summary
private  int findFirstOverlappedSV(int start, int end)
          Find the SV that has the position just before the given region
 java.lang.String get(int start, int end)
          Get the sequence for the region [start, end] including structure variants
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sv

private final java.util.ArrayList<Feature> sv
An ArrayList of Feature representing structure variants in the sequence

Constructor Detail

ExtendedSequenceBuffer

public ExtendedSequenceBuffer(java.lang.String _raw,
                              int _offset,
                              java.util.ArrayList<Feature> _sv)
A constructor for object ExtendedSequenceBuffer

Parameters:
_raw - the sequence
_offset - the position difference between the start position of sequence and the start position of the reference gene
_sv - an ArrayList of Feature representing structure variants in the sequence
Method Detail

findFirstOverlappedSV

private int findFirstOverlappedSV(int start,
                                  int end)
Find the SV that has the position just before the given region

Parameters:
start - the start position of the region in reference coordinate.
end - the end position of the region in reference coordinate.
Returns:
the index of the found SV

get

public java.lang.String get(int start,
                            int end)
Get the sequence for the region [start, end] including structure variants

Overrides:
get in class SequenceBuffer
Parameters:
start - the start position of the region in reference coordinate.
end - the end position of the region in reference coordinate.
Returns:
the sequence in the specified region, including structure variants.