make_si: make_si

View source: R/dnam_search_index.R

make_siR Documentation

make_si

Description

Make search index from table of hashed features. Additional details about the hnswlib search index parameters (e..g 'space_val', 'efc_val', 'm_val', and 'ef_val') can be found in the Python package docstrings and ReadMe.

Usage

make_si(
  fh_csv_fpath,
  si_fname = "new_search_index.pickle",
  si_dict_fname = "new_index_dict.pickle",
  threads = 4,
  space_val = "l2",
  efc_val = 2000,
  m_val = 1000,
  ef_val = 2000
)

Arguments

fh_csv_fpath

Name/path of csv (e.g. a table of hashed features) containing data for the index (required, string, "bvaltest.csv", where rows = samples, cols = features).

si_fname

Name of new search index file to save (required, string, "new_search_index.pickle")

si_dict_fname

Name of new index dictionary, with string labels, to save (required, string, "new_index_dict.pickle").

threads

Number of threads for processing new index (required, int, 4).

space_val

Space value for new search index (required, valid string, l2').

efc_val

EFC value for the index (required, int, 2000).

m_val

M value for the index (required, int, 1000).

ef_val

EF value for the index (required, int, 2000).

Value

Boolean, TRUE if new search index and dictionary created, FALSE if creating the new search index and dictionary files failed, otherwise NULL.

Examples

# fh_csv_fpath <- system.file("extdata", "fhtest", 
# package = "recountmethylation")
# fh_csv_fpath <- file.path(fh_csv_fpath, "bval_fn.csv")
# make_si(fh_csv_fpath)

metamaden/recountmethylation documentation built on Jan. 5, 2023, 9:56 a.m.