loadSNPDataDNAcopy: loadSNPDataDNAcopy

Description Usage Arguments Details Value Examples

View source: R/loadSNPData.DNAcopy.R

Description

Loads SNP array data in a tabular format using data from DNAcopy rawdata or DNAcopy results

Usage

1
loadSNPDataDNAcopy (snp.data, chr.col = "chrom", start.col = NULL, end.col = NULL, pos.col = "maploc", lrr.col = NULL, chr.transformation = "23:X,24:Y,25:MT", genome = NULL, na.rm = FALSE, verbose = TRUE)

Arguments

snp.data

Either the name of the file with the data or a variable containing 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 NULL)

start.col

(number or character) the name or number of the column with start position

end.col

(number or character) the name of number of the column with end position

pos.col

(number or character) The name or number of the column with position information. If NULL, it is automatically identified. (defaults to NULL)

lrr.col

(number or character) The name or number of the column with LRR 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 "hg19")

na.rm

(logical) Whether to remove NA values. (defaults to FALSE)

verbose

Wether information messages should be generated. (defaults to TRUE)

Details

Given a DNAcopy rawdata or DNAcopy results object, the function load SNP array data in a tabular format. It will try to identify the columns with the relevant information (chr, position, BAF, LRR, etc...) or will use the column number or name supplied by the user, if any. It will convert the tabular data into a GRanges, with one range per SNP in the table.

Value

A list of GRanges with a range per SNP and one GRanges per sample.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(DNAcopy)
data(coriell)
#one sample
CNA.object <- CNA(cbind(coriell$Coriell.05296), coriell$Chromosome, coriell$Position, data.type="logratio")
CNA.object <-  smooth.CNA(CNA.object)
snps <- loadSNPDataDNAcopy(snp.data = CNA.object, na.rm = TRUE) 

# 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"))
CNA.object <-  smooth.CNA(CNA.object)
snps <- loadSNPDataDNAcopy(snp.data = CNA.object, na.rm = TRUE)

#If the data come from DNAcopy results
DNAcopy.object <- segment(CNA.object, verbose=1)
snps <- loadSNPDataDNAcopy(snp.data = DNAcopy.object)

CopyNumberPlots documentation built on Nov. 8, 2020, 6:51 p.m.