ArrayViews-class {VanillaICE} | R Documentation

## ArrayViews class, constructor, and methods

### Description

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.

### Usage

    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)

### Arguments

`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 `ArrayViews` object
`i` | numeric vector or missing
`j` | numeric vector or missing
`...` | additional arguments to `FUN`
`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 `ArrayViews` object
`X` | a `ArrayViews` object
`FUN` | a function to apply to each column of `X`
`simplify` | logical indicating whether result should be simplied
`USE.NAMES` | whether the output should be a named vector

### Slots

`colData`

  A character string

`rowRanges`

  A `DataFrame`. WARNING: The accessor for this slot is `rowRanges`, not `rowRanges`!

`index`

  A `GRanges` object

`sourcePaths`

  A character string providing complete path to source files (one file per sample) containing low-level summaries (Log R ratios, B allele frequencies, genotypes)

`scale`

  A length-one numeric vector

`parsedPath`

  A character string providing full path to where parsed files should be saved

`lrrFiles`

  character vector of filenames for log R ratios

`bafFiles`

  character vector of filenames for BAFs

`gtFiles`

  character vector of filenames for genotypes

### See Also

`CopyNumScanParams` `parseSourceFile`

### Examples

    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, pruning.mode="coarse") <- 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)]

[Package VanillaICE version 1.48.0 Index]