ReadBEDAsPanelInfo: Convert BED Target Regions to SATS Panel Information

View source: R/input_conversion.R

ReadBEDAsPanelInfoR Documentation

Convert BED Target Regions to SATS Panel Information

Description

Convert a Browser Extensible Data (BED) target-region file into the SATS-compatible panel-coordinate table used by GeneratePanelSize and GenerateLMatrix.

Usage

ReadBEDAsPanelInfo(bed_file, seq_assay_id = NULL, has_header = FALSE,
                   chromosome_col = 1, start_col = 2, end_col = 3,
                   seq_assay_col = NULL, name_col = NULL)

Arguments

bed_file

Path to a BED file. Files ending in .gz are read with gzfile.

seq_assay_id

Sequencing assay identifier to assign to every interval when seq_assay_col is not supplied.

has_header

Logical value indicating whether the BED file has a header row.

chromosome_col

Column index or name for chromosome.

start_col

Column index or name for the BED start coordinate.

end_col

Column index or name for the BED end coordinate.

seq_assay_col

Optional column index or name containing SEQ_ASSAY_ID.

name_col

Optional column index or name to preserve as Hugo_Symbol.

Details

BED coordinates are 0-based and half-open. SATS panel-coordinate tables use 1-based inclusive coordinates. Therefore this function returns Start_Position = BED_start + 1 and End_Position = BED_end.

The returned data frame contains at least Chromosome, Start_Position, End_Position and SEQ_ASSAY_ID; these columns can be passed directly to GeneratePanelSize or GenerateLMatrix.

Value

A data frame of panel target intervals in SATS coordinate format.

Author(s)

Donghyuk Lee <dhyuklee@pusan.ac.kr> and Bin Zhu <bin.zhu@nih.gov>

See Also

GeneratePanelSize, GenerateLMatrix, ReadVCFAsMutationRecord

Examples

dir <- system.file("extdata", "refitting_examples", package = "SATS")
bed_file <- file.path(dir, "SATS_example_panel.bed")

panel_info <- ReadBEDAsPanelInfo(
    bed_file = bed_file,
    seq_assay_id = "SATS_EXAMPLE_PANEL",
    name_col = 4
)
head(panel_info)

SATS documentation built on Sept. 16, 2026, 1:06 a.m.