load_chas: Load a ChAS text export file.

View source: R/input.R

load_chasR Documentation

Load a ChAS text export file.

Description

Load a ChAS text export file.

Usage

load_chas(filename, kit.coverage)

Arguments

filename

Path to the ChAS file.

kit.coverage

A GRanges object containing the regions covered on each chromosome arm by the kit.

Details

The ChAS file is expected to have the following column names: 'CN State' (number or empty), 'Type' (expected value: 'Gain', 'Loss' or 'LOH') and 'Full Location' (in the format 'chr:start-end').

The segments are attributed to each chromosome arm and split if necessary.

Value

A GRanges object containing the segments, their copy number (field cn), their copy number types (field cntype). cntype contains either 'Gain', 'Loss' or 'LOH'. If the file contains twice the same segment or does not respect the format specifications, then an error is raised. NB. The chromosome name is in the format '1' and not 'chr1' and will be transformed if needed.

Examples

segs.filename <- system.file('extdata', 'chas_example.txt',
  package = 'oncoscanR')
segs.chas_example <- load_chas(segs.filename, oncoscan_na33.cov)

yannchristinat/oncoscanR documentation built on Oct. 26, 2024, 12:58 p.m.