def _write_record(self, record, record_idx=0):
    'Write a single SeqRecord to the file (PRIVATE).'
    if (self._length_of_sequences != len(record.seq)):
        raise ValueError('Sequences must all be the same length')
    seq_name = record.name
    try:
        seq_name = str(int(record.name))
    except ValueError:
        seq_name = str((record_idx + 1))
    if (('start' in record.annotations) and ('end' in record.annotations)):
        suffix0 = ('/%s-%s' % (str(record.annotations['start']), str(record.annotations['end'])))
        suffix1 = ('/%s-%s' % (str((record.annotations['start'] + 1)), str(record.annotations['end'])))
        if (seq_name[(- len(suffix0)):] == suffix0):
            seq_name = seq_name[:(- len(suffix0))]
        if (seq_name[(- len(suffix1)):] == suffix1):
            seq_name = seq_name[:(- len(suffix1))]
    if (('start' in record.annotations) and ('end' in record.annotations) and ('strand' in record.annotations)):
        id_line = ID_LINE_FMT.format(seq_name=seq_name, start=(record.annotations['start'] + 1), end=record.annotations['end'], strand=('+' if (record.annotations['strand'] == 1) else '-'), file=(record.name + '.fa'), ugly_hack=record.id)
        lacking_annotations = False
    else:
        id_line = ID_LINE_FMT.format(seq_name=seq_name, start=0, end=0, strand='+', file=(record.name + '.fa'), ugly_hack=record.id)
        lacking_annotations = True
    if (((':0-0 ' in id_line) or (':1-0 ' in id_line)) and (not lacking_annotations)):
        if (not self._wrote_first):
            self._wrote_first = True
            id_line = ID_LINE_FMT.format(seq_name=seq_name, start=0, end=0, strand='+', file=(record.name + '.fa'), ugly_hack=record.id)
            self.handle.write((id_line + '\n'))
    else:
        self.handle.write(id_line)
        for i in range(0, len(record.seq), 80):
            self.handle.write(('%s\n' % str(record.seq[i:(i + 80)])))
Write a single SeqRecord to the file (PRIVATE).
def _write_record(self, record, record_idx=0):
    
    if (self._length_of_sequences != len(record.seq)):
        raise ValueError('Sequences must all be the same length')
    seq_name = record.name
    try:
        seq_name = str(int(record.name))
    except ValueError:
        seq_name = str((record_idx + 1))
    if (('start' in record.annotations) and ('end' in record.annotations)):
        suffix0 = ('/%s-%s' % (str(record.annotations['start']), str(record.annotations['end'])))
        suffix1 = ('/%s-%s' % (str((record.annotations['start'] + 1)), str(record.annotations['end'])))
        if (seq_name[(- len(suffix0)):] == suffix0):
            seq_name = seq_name[:(- len(suffix0))]
        if (seq_name[(- len(suffix1)):] == suffix1):
            seq_name = seq_name[:(- len(suffix1))]
    if (('start' in record.annotations) and ('end' in record.annotations) and ('strand' in record.annotations)):
        id_line = ID_LINE_FMT.format(seq_name=seq_name, start=(record.annotations['start'] + 1), end=record.annotations['end'], strand=('+' if (record.annotations['strand'] == 1) else '-'), file=(record.name + '.fa'), ugly_hack=record.id)
        lacking_annotations = False
    else:
        id_line = ID_LINE_FMT.format(seq_name=seq_name, start=0, end=0, strand='+', file=(record.name + '.fa'), ugly_hack=record.id)
        lacking_annotations = True
    if (((':0-0 ' in id_line) or (':1-0 ' in id_line)) and (not lacking_annotations)):
        if (not self._wrote_first):
            self._wrote_first = True
            id_line = ID_LINE_FMT.format(seq_name=seq_name, start=0, end=0, strand='+', file=(record.name + '.fa'), ugly_hack=record.id)
            self.handle.write((id_line + '\n'))
    else:
        self.handle.write(id_line)
        for i in range(0, len(record.seq), 80):
            self.handle.write(('%s\n' % str(record.seq[i:(i + 80)])))