GenerateReference: Generate reference pattern labels (no default writing)

View source: R/GenerateInput.R

GenerateReferenceR Documentation

Generate reference pattern labels (no default writing)

Description

Generate reference pattern labels (no default writing)

Usage

GenerateReference(binary_file, min_CG = 50, output_path = NULL)

Arguments

binary_file

Path to the pattern strings file (one string per line).

min_CG

Minimum CpG count a pattern must have to keep its own ID (default: 50). Patterns with frequency <= 'min_CG' are grouped as "Pna".

output_path

Optional file path to write the resulting labels. If 'NULL' (default), nothing is written and the labels are only returned.

Value

A character vector of pattern labels (same length/order as the input file).

Examples

## Not run: 
# DO write only to a temp location in examples/vignettes/tests:
tmp_out <- file.path(tempdir(), "patterns.txt")
labs <- GenerateReference("path/to/pattern_strings.txt", min_CG = 50, output_path = tmp_out)
# Or skip writing and just get the vector:
labs <- GenerateReference("path/to/pattern_strings.txt", min_CG = 50)

## End(Not run)

MethScope documentation built on Feb. 27, 2026, 1:08 a.m.