| ArrayViews-class {VanillaICE} | R Documentation |
ArrayViews provides views to the low-level data – log R ratios, B allele frequencies, and genotypes that are stored in parsed files on disk, often scaled and coerced to an integer. Accessors to the low-level data are provided that extract the marker-level summaries from disk, rescaling when appropriate.
ArrayViews(class = "ArrayViews", colData, rowRanges = GRanges(), sourcePaths = character(), scale = 1000, sample_ids, parsedPath = getwd(), lrrFiles = character(), bafFiles = character(), gtFiles = character()) ## S4 method for signature 'ArrayViews,ANY,ANY,ANY' x[i, j, ..., drop = FALSE] colnames(x) <- value ## S4 method for signature 'ArrayViews' colnames(x, do.NULL = TRUE, prefix = "col") ## S4 method for signature 'ArrayViews' x$name ## S4 replacement method for signature 'ArrayViews' x$name <- value ## S4 method for signature 'ArrayViews' show(object) ## S4 method for signature 'ArrayViews' sapply(X, FUN, ..., simplify = TRUE, USE.NAMES = TRUE) ## S4 method for signature 'ArrayViews' ncol(x) ## S4 method for signature 'ArrayViews' nrow(x) ## S4 method for signature 'ArrayViews' dim(x) ## S4 method for signature 'ArrayViews' start(x)
class |
character string |
colData |
DataFrame |
rowRanges |
GRanges object |
sourcePaths |
character string provide complete path to plain text source files (one file per sample) containing log R ratios and B allele frequencies |
scale |
log R ratios and B allele frequencies can be stored as integers on disk to increase IO speed. If scale =1, the raw data is not transformed. If scale = 1000 (default), the log R ratios and BAFs are multipled by 1000 and coerced to an integer. |
sample_ids |
character vector indicating how to name samples. Ignored if colData is specified. |
parsedPath |
character vector indicating where parsed files should be saved |
lrrFiles |
character vector of file names for storing log R ratios |
bafFiles |
character vector of file names for storing BAFs |
gtFiles |
character vector of file names for storing genotypes |
x |
a |
i |
numeric vector or missing |
j |
numeric vector or missing |
... |
additional arguments to |
drop |
ignored |
value |
a character-string vector |
do.NULL |
ignored |
prefix |
ignored |
name |
character string indicating name in colData slot of ArrayViews object |
object |
a |
X |
a |
FUN |
a function to apply to each column of |
simplify |
logical indicating whether result should be simplied |
USE.NAMES |
whether the output should be a named vector |
colDataA character string
rowRangesA DataFrame. WARNING: The accessor for this slot is rowRanges, not rowRanges!
indexA GRanges object
sourcePathsA character string providing complete path to source files (one file per sample) containing low-level summaries (Log R ratios, B allele frequencies, genotypes)
scaleA length-one numeric vector
parsedPathA character string providing full path to where parsed files should be saved
lrrFilescharacter vector of filenames for log R ratios
bafFilescharacter vector of filenames for BAFs
gtFilescharacter vector of filenames for genotypes
CopyNumScanParams parseSourceFile
ArrayViews()
## From unit test
require(BSgenome.Hsapiens.UCSC.hg18)
require(data.table)
extdir <- system.file("extdata", package="VanillaICE", mustWork=TRUE)
features <- suppressWarnings(fread(file.path(extdir, "SNP_info.csv")))
fgr <- GRanges(paste0("chr", features$Chr), IRanges(features$Position, width=1),
isSnp=features[["Intensity Only"]]==0)
fgr <- SnpGRanges(fgr)
names(fgr) <- features[["Name"]]
bsgenome <- BSgenome.Hsapiens.UCSC.hg18
seqlevels(fgr) <- seqlevels(bsgenome)[seqlevels(bsgenome) %in% seqlevels(fgr)]
seqinfo(fgr) <- seqinfo(bsgenome)[seqlevels(fgr),]
fgr <- sort(fgr)
files <- list.files(extdir, full.names=TRUE, recursive=TRUE, pattern="FinalReport")
ids <- gsub(".rds", "", gsub("FinalReport", "", basename(files)))
views <- ArrayViews(rowRanges=fgr,
sourcePaths=files,
sample_ids=ids)
lrrFile(views)
## view of first 10 markers and samples 3 and 5
views <- views[1:10, c(3,5)]