示例#1
0
string FastaReference::getTargetSubSequence(FastaRegion& target) {
    if (target.startPos == -1) {
	return getSequence(target.startSeq);
    } else {
	return getSubSequence(target.startSeq, target.startPos - 1, target.length());
    }
}
示例#2
0
/**
 * Say if a subsequence is invalid (if it has a pipe or a $ is invalid)
 * @return true if invalid
 */
bool SubSequence::isInvalid() const
{
  int end = startPos_ + size_ ;

  if (end > motherSequence_->getSize())
  {
    return true;
  }

  int * subSeq = getSubSequence();

  for(int i = 0; i<size_; i++)
  {
    int current = subSeq[i];
    if ((current == 1) || (current == 2))
    {
      return true;
    }
  }
  return false;
}