#!/usr/bin/env python3

import argparse
from fastaq import tasks

parser = argparse.ArgumentParser(
    description = 'Converts multi fasta/q file to single sequence file, preserving original order of sequences',
    usage = '%(prog)s <infile> <outfile>')
parser.add_argument('infile', help='Name of input file. Can be any of FASTA, FASTQ, GFF3, EMBL, GBK, Phylip')
parser.add_argument('outfile', help='Name of output file')
parser.add_argument('-n', '--name', help='Name of sequence in output file [%(default)s]', default='union')
options = parser.parse_args()
tasks.merge_to_one_seq(
    options.infile,
    options.outfile,
    seqname=options.name
)

