loadCopyNumberCallsDNAcopy {CopyNumberPlots} | R Documentation

## loadCopyNumberCallsDNAcopy

### Description

Loads copy number calls from DNACopy results.

### Usage

    loadCopyNumberCallsDNAcopy(DNAcopy.data, chr.col = "chrom", start.col = "loc.start", end.col = "loc.end", segment.value.col = "seg.mean", cn.col = NULL, chr.transformation = "23:X,24:Y,25:MT", genome = NULL, verbose = TRUE)

### Arguments

`DNAcopy.data` | 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 "chrom")
`start.col` | (number or character) The name or number of the column with start position information. If NULL, it is automatically identified. (defaults to "loc.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 "loc.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 "seg.mean")
`cn.col` | (number or character) The name or number of the column with CN information. If NULL, it is automatically identified. (defaults to NULL)
`chr.transformation` | (character) The transformation of the chromosome names in a comma separated "key:value" format.(defaults to "23:X,24:Y,25:MT")
`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 DNAcopy data structure in R. 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 or a list of GRanges with a GRanges per sample.

### Examples

    library(DNAcopy)

    data(coriell)
    CNA.object <- suppressWarnings(CNA(cbind(coriell$Coriell.05296), coriell$Chromosome, coriell$Position, data.type="logratio",sampleid="c05296"))

    smoothed.CNA.object <- smooth.CNA(CNA.object)
    DNAcopy.data <- segment(smoothed.CNA.object, verbose=1)

    cnv.call <- loadCopyNumberCallsDNAcopy(DNAcopy.data = DNAcopy.data)

    # more than 1 sample
    CNA.object <- CNA(genomdat = cbind(coriell$Coriell.05296, coriell$Coriell.13330), chrom = coriell$Chromosome, maploc = coriell$Position, data.type = "logratio", sampleid = c("c05296", "c13330"))
    smoothed.CNA.object <- smooth.CNA(CNA.object)
    DNAcopy.data <- segment(smoothed.CNA.object, verbose=1)

    cnv.call <- loadCopyNumberCallsDNAcopy(DNAcopy.data = DNAcopy.data)

[Package CopyNumberPlots version 1.3.3 Index]