Build a sequence object using the pre-tokenized parts from a MAF line.

  s -- a sequence line; has 6 fields in addition to 's':
          * source sequence,
          * start coord. of seq., zero-based. If -'ve strand, rel to start of
            rev. comp.
          * ungapped length of the sequence
          * strand
          * src size -- the full length of the source sequence
          * the sequence itself

def __build_sequence(parts):
  """Build a sequence object using the pre-tokenized parts from a MAF line.

  s -- a sequence line; has 6 fields in addition to 's':
          * source sequence,
          * start coord. of seq., zero-based. If -'ve strand, rel to start of
            rev. comp.
          * ungapped length of the sequence
          * strand
          * src size -- the full length of the source sequence
          * the sequence itself
  """
  strand = parts[4]
  seq_length = int(parts[3])
  total_seq_len = int(parts[5])
  start = (int(parts[2]) if strand == "+"
           else total_seq_len - int(parts[2]) - seq_length)
  end = start + seq_length
  remain = total_seq_len - end
  return Sequence(parts[1], parts[6], start, end, strand, remain)