/// 786

/******************************************************************************/

#pragma once

/******************************************************************************/

/* Corrects the interleaved FASTQ from stdin given the barcode counts
 * generated by _ema count_
 *
 * Parameters:
 *   known_barcodes_path: path for 10x known barcodes
 *   input_prefix:        list of all possible input prefixes
 *                        (each prefix requires prefix.ema-fcnt and prefix.ema-ncnt files)
 *   input_prefix_size:   size of input_prefix array
 *   output_dir:          output directory for buckets (MUST EXIST)
 *   do_h2:               should we do H2-correction as well (0 for H1-only mode)
 *   buffer_size:         size of file buffer for each bucket
 *                        total memory usage: (buffer_size + 10 KB) * nbuckets
 *   nthreads:            how many threads to use for barcode correcting
 *   nbuckets:            how many buckets to create
 */
EXTERNC void correct(
	const char *known_barcodes_path,
	const char **input_prefix,
	const int input_prefix_size,
	const char *output_dir,
	const char do_h2,
	const size_t buffer_size,
	const char do_bx_format,
	const int nthreads,
	const int nbuckets
);
