
NAME
	bior_index_catalog -- Creates an index from a given catalog

SYNOPSIS
	bior_index_catalog
		--database <CATALOG_PATH>
		--path <JSON_PATH>
		[--help]
		[--index <INDEX>]
		[--log]  OR  [--logfile <logfile_name>]
		[--verbose]
		[--version]

DESCRIPTION
	Creates a searchable index for a key contained within the JSON column of a given catalog.  The
	output is a table containing a Key/FilePosition pair, where the FilePosition is a location
	within the catalog bgzip file pointing to the beginning of the line containing the key. By
	default, the index file is stored within the catalog's ./index/ subdirectory in the format:
	./index/[catalogPrefix].[jsonPath].idx.h2.db Users can also create their own indexes by using
	the --index flag and specifying a location to write the index file.

OPTIONS

Required:

	-d, --database <CATALOG_PATH>
		The catalog file (bgzip format) that will be indexed.
	
	-p, --path <JSON_PATH>
		The JSON path within the catalog's JSON column. The index will be created based on this key. 
		JSON Paths are case sensitive.

Optional:

	-h, --help
		Display help text and exit.
	
	-i, --index <INDEX>
		The path to the index file that will be built.  This should have a similar format to the
		catalog.  For example: [catalogPrefix].[JsonPath].idx.h2.db. If not specified, the index file
		will be created within the index subfolder where the catalog is located.
	
	--log  OR  --logfile <logfile_name>
		-l, --log
			Generate the default log file 'bior.log' in the current directory. By default, the log file is
			not generated. Only one logging option may be specified, either -l or -lf.
		
		-lf, --logfile <logfile_name>
			Generate the log file as specified by <logfile_name>, which overrides the default log file
			name, as shown in the -l, --log description. Only one logging option may be specified, either
			-l or -lf.
	
	-v, --version
		Display the version of the application and exit
	
	--verbose
		Prints all low-level messages while creating the index.

EXAMPLE
	This is a basic example of creating an index based on a key contained within the catalog's
	JSON structure.  Here, the bior_index_catalog command creates an index on the HGNC id within
	the NCBIGene catalog's JSON column.
	
	bior_index_catalog  -d $BIOR_CATALOG/NCBIGene/GRCh37_p10/genes.tsv.bgz  -p HGNC 
	OR
	bior_index_catalog  -d $BIOR_CATALOG/NCBIGene/GRCh37_p10/genes.tsv.bgz  -p HGNC  -i
	/data/myindexes/genes.HGNC.idx.h2.db

