def cat_files(infiles, outfile):
    '''Cats all files in list infiles into outfile'''
    f_out = pyfastaq.utils.open_file_write(outfile)

    for filename in infiles:
        if os.path.exists(filename):
            f_in = pyfastaq.utils.open_file_read(filename)
            for line in f_in:
                print(line, end='', file=f_out)
            pyfastaq.utils.close(f_in)

    pyfastaq.utils.close(f_out)
Cats all files in list infiles into outfile