Creates a simple data frame containing chromosome information extracted from genomic window identifiers (matrix column names in "chr_start_end" format).

generate_mock_window_data(matrix_colnames)

Arguments

matrix_colnames

A character vector of column names in the format "chr_start_end" (e.g., "chr1_1000_2000")

Value

A data frame with one column:

  • chr: Character vector containing chromosome names extracted from input

Details

This function creates a mock data frame containing chromosome information extracted from the column names of a matrix. The column names are expected to be in the format chromosome_start_end, and the function extracts the chromosome part to create the chr column in the resulting data frame.

The function:

  1. Splits each column name by "_"

  2. Extracts the first element (chromosome name)

  3. Creates a data frame with these chromosome names

Examples

if (FALSE) { # \dontrun{
col_names <- c("chr1_1000_2000", "chr1_2000_3000", "chr2_1000_2000")
window_data <- generate_mock_window_data(col_names)
# Returns data frame:
#   chr
# 1 chr1
# 2 chr1
# 3 chr2
} # }