loadSNPData: loadSNPData

Description Usage Arguments Details Value Examples

View source: R/loadSNPData.R

Description

Loads SNP array data in a tabular format

Usage

1
loadSNPData(snp.data, chr.col = NULL, start.col = NULL, end.col = NULL, pos.col = NULL, baf.col = NULL, lrr.col = NULL, id.col = NULL, genome = NULL, 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)

baf.col

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

id.col

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

genome

(character) The name of the genome (defaults to "hg19")

verbose

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

Details

Given a file name or data in a tabular format, the function loads 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 GRanges with a range per SNP

Examples

1
2
3
4
5
6
# There are two examples of posible files to load.
snp.data1 <- system.file("extdata", "snp.data_test.csv", package = "CopyNumberPlots", mustWork=TRUE)
snps <- loadSNPData(snp.data = snp.data1)

snp.data2 <-  system.file("extdata", "snp.data_test2.csv", package = "CopyNumberPlots", mustWork=TRUE)
snps <- loadSNPData(snp.data = snp.data2)

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