#!/usr/bin/env python3

import argparse
from fastaq import tasks

parser = argparse.ArgumentParser(
    description = 'Renames sequences in a file, calling them 1,2,3... etc',
    usage = '%(prog)s [options] <fasta/q in> <fasta/q out>')
parser.add_argument('--start_index', type=int, help='Starting number [%(default)s]', default=1)
parser.add_argument('--rename_file', help='If used, will write a file of old name to new name')
parser.add_argument('--keep_suffix', action='store_true', help='Use this to keep a /1 or /2 suffix at the end of each name')
parser.add_argument('infile', help='Name of fasta/q file to be read')
parser.add_argument('outfile', help='Name of output fasta/q file')
options = parser.parse_args()
tasks.enumerate_names(options.infile,
                      options.outfile,
                      start_index=options.start_index,
                      keep_illumina_suffix=options.keep_suffix,
                      rename_file=options.rename_file)
