loadCopyNumberCallsCNVkit {CopyNumberPlots} | R Documentation

## loadCopyNumberCallsCNVkit

### Description

Loads copy number calls from CNVkit.cns file format

### Usage

    loadCopyNumberCallsCNVkit(cnvkit.file, chr.col = "chromosome", start.col = "start", end.col = "end", segment.value.col = "log2", cn.col = NULL, genome = NULL, verbose = TRUE)

### Arguments

`cnvkit.file` | The name of the file with the data
`chr.col` | (number or character) The name or number of the column with chromosome information. If NULL, it is automatically identified. (defaults to "chromosome")
`start.col` | (number or character) The name or number of the column with start position information. If NULL, it is automatically identified. (defaults to "start")
`end.col` | (number or character) The name or number of the column with end position information. If NULL, it is automatically identified. (defaults to "end")
`segment.value.col` | (number or character) The name or number of the column with segment value. If NULL, it is automatically identified. (defaults to "log2")
`cn.col` | (number or character) The name or number of the column with CN information. If NULL, it is automatically identified. (defaults to NULL)
`genome` | (character) The name of the genome (defaults to NULL)
`verbose` | (logical) Whether to show information messages. (defaults to TRUE)

### Details

This function will load segments data from CNVkit.cns file format. Internally it uses the `toGRanges` function from regioneR package and can work with any format accepted by it, including R objects and local or remote files. If no column names are specified, it will use simple heuristics to try to identify the relevant data columns.

### Value

A GRanges with a range per copy number segment.

### Examples

    ## loadCopyNumberCallsCNVkit from .cns file format:
    ## An example of .cns file format is found at https://github.com/etal/cnvkit/blob/master/test/formats/cl_seq.cns.

    cnvkit.file <- system.file("extdata", "CNVkit_output.cns", package = "CopyNumberPlots", mustWork = TRUE)
    cnv.call <- loadCopyNumberCallsCNVkit(cnvkit.file)

[Package CopyNumberPlots version 1.3.3 Index]