gcCorrect: Correct copy number for GC content

Description Usage Arguments Value Examples

View source: R/utils.R

Description

Copy number estimates from various platforms show 'Genomic Waves' (Diskin et al., Nucleic Acids Research, 2008, PMID: 18784189) where copy number trends with local GC content. This function regresses copy number on GC percentage and removes the effect (returns residuals). GC content should be smoothed along the genome in wide windows >= 100kb.

Usage

1
gcCorrect(ds, gc, retain.mean = TRUE)

Arguments

ds

numeric matrix of copynumber or log2ratio values, samples in columns

gc

numeric vector, GC percentage for each row of ds, must not have NAs

retain.mean

logical, center on zero or keep same mean?

Value

numeric matrix, residuals of ds regressed on gc

Examples

1
2
3
  gc = runif(n=100, min=1, max=100)
  ds = rnorm(100) + (0.1 * gc)
  gcCorrect(ds, gc)

Example output

Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, basename, cbind, colMeans, colSums, colnames,
    dirname, do.call, duplicated, eval, evalq, get, grep, grepl,
    intersect, is.unsorted, lapply, lengths, mapply, match, mget,
    order, paste, pmax, pmax.int, pmin, pmin.int, rank, rbind,
    rowMeans, rowSums, rownames, sapply, setdiff, sort, table, tapply,
    union, unique, unsplit, which, which.max, which.min

Loading required package: GenomicRanges
Loading required package: stats4
Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following object is masked from 'package:base':

    expand.grid

Loading required package: IRanges
Loading required package: GenomeInfoDb
Loading required package: SummarizedExperiment
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: DelayedArray
Loading required package: matrixStats

Attaching package: 'matrixStats'

The following objects are masked from 'package:Biobase':

    anyMissing, rowMedians


Attaching package: 'DelayedArray'

The following objects are masked from 'package:matrixStats':

    colMaxs, colMins, colRanges, rowMaxs, rowMins, rowRanges

The following object is masked from 'package:base':

    apply

Warning messages:
1: no function found corresponding to methods exports from 'DelayedArray' for: 'acbind', 'arbind' 
2: no function found corresponding to methods exports from 'SummarizedExperiment' for: 'acbind', 'arbind' 
3: multiple methods tables found for 'pos' 
  [1] 4.787849 4.373944 5.218585 5.962035 4.668018 5.820919 4.175281 3.246556
  [9] 3.908293 4.819575 4.926167 3.578118 4.586037 4.478748 5.045806 6.281543
 [17] 5.607432 5.046814 5.550648 4.292792 5.378039 4.995432 4.951478 4.897601
 [25] 5.427453 5.919734 5.732491 3.709762 4.872989 4.071064 4.914971 5.023481
 [33] 4.682755 3.930551 5.164160 4.295100 5.467794 3.415030 5.609453 5.014569
 [41] 5.672276 4.993245 6.649385 6.435712 5.146453 3.430123 4.677671 4.304791
 [49] 4.338688 5.451498 5.327844 3.990503 3.986083 3.826374 4.983201 4.046089
 [57] 4.513834 4.545894 5.319440 5.143138 4.087036 5.022848 6.343885 4.577782
 [65] 5.513071 3.777086 3.863567 4.649167 3.456917 5.017462 4.846450 5.145742
 [73] 4.216063 5.544396 3.623119 4.298897 5.378491 6.640164 4.697875 5.269476
 [81] 6.509258 4.518331 5.448405 5.706901 3.268562 5.278389 4.143674 4.738949
 [89] 3.813196 5.653625 4.498858 5.184547 6.256605 4.147213 4.209817 3.862050
 [97] 4.676949 6.136426 6.888688 5.899426

genoset documentation built on Nov. 8, 2020, 6:07 p.m.