Learn R Programming

MethScope (version 1.0.0)

GenerateReference: 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)

Value

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

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.

Examples

Run this code
if (FALSE) {
# 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)
}

Run the code above in your browser using DataLab