hrunbiasedDiagnostic: Cox model diagnostics using gene random signatures

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/hrunbiasedDiagnostic.r

Description

Contains several diagnostic functions for adjusted Cox proportional hazard models using gene signatures

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
hrunbiasedDiagnostic(nda, correction.type = "NCsignatures",
        score, signature.method = "zscore",
        seqquant = c(0,seq(0.05,1,length.out=6)), sigSize = 50,
        diagnostic.type = c("density.rs", "permutations", "simulations",
        "positive.cont.power", "PCAcorrelation"), ...)

hrunbiasedDensityRS(nda, correction.type = "NCsignatures", score,
        seqquant = c(0,seq(0.05,1,length.out=6)), sigSize = 50,
        nrs = 5000, comp.RUV = c(1,2), adj.var.GS = "GSadj",
        adjusted.var.random = NA, adjusted.var.fixed= NA,
        executation.info = TRUE, mc.cores = 1,  GSs = NULL, rg.cox = TRUE,
        id.size = 1, basic.cont = TRUE, signature.method = "zscore", ...)

hrunbiasedPermutations(nda, correction.type = "NCsignatures",
       score, seqquant = c(0,seq(0.05,1,length.out=6)), sigSize = 50,
        nrs = 5000,  comp.RUV = c(1,2), nperm = 100,
       adj.var.GS = "GSadj", permutation.type = "none", GSassociation = TRUE,
       executation.info = TRUE, mc.cores = 1, GSs = NULL,  basic.cont = TRUE,
       GS = NULL, signature.method = "zscore",  ...)

hrunbiasedPCpower(nda, positive.controls, correction.type = "NCsignatures", score,
     seqquant = c(0,seq(0.05,1,length.out=6)), alternative = "two.sided",
     bootstrapping = TRUE,  prop.pos.cont = 1, sigSize = 50,
     id.size = 1, nrs = 5000, nrpcs = 500, comp.RUV = c(1,2),
     null.dist = "asymptotic",  adj.var.GS = "GSadj", adjusted.var.random = NA,
     adjusted.var.fixed= NA, executation.info = TRUE, mc.cores = 1, GSs = NULL,
     cdRS = NULL, basic.cont = TRUE, ...)

hrunbiasedSimulations(nda, positive.controls, GScoef = 0,
     tscoef = 0, ninst.rs = 10, ninst.ts = 500, nrs = 500, lambdas = c(0.1,0.2),
     gammas = c(1.5,2),  mc.cores = 1,  stat = TRUE,
     executation.info = TRUE, GSs = NULL, signature.method = "zscore",
     basic.cont = TRUE, sigSize = 50, correction.type = "none", ...)

hrunbiasedPCAcorrelation(nda, nrs = 100, sigSize = 50, mc.cores = 1,
      comp.PCA = c(1,2), GS = NULL, executation.info = TRUE,
     signature.method = "zscore", ...)

Arguments

nda

ExpressionSet object. pData(nda) must contain survival information in attributes evn (numeric vector with event description - 0 no event 1 event) and tev (time to event)

correction.type

Standard Cox model can be used when correction.type = "none", otherwise correction for global signature "Gsignature", correction for negative control signatures "NCsignatures" (default) or factor analysis on negative control genes "RUV" are available

score

Vector of the same length as number of rows in nda with scores to be used for "NCsignatures" and "RUV" corrections (see details)

signature.method

Signature score method: to choose from "zscore", "gsva" or "plage"

seqquant

Numeric vector with values between zero and one used to set negative controls

diagnostic.type

Diagnostic to be performed: at least one among "density.rs", "permutations", "positive.cont.power", "simulations" or "PCAcorrelation" (see details)

sigSize

Numeric vector of at least one element with signature sizes to be considered (a single signature size is used for diagnostic.type = "positive.cont.power" following attribute id.size)

nrs

Number of random signature instances used for approximated null distribution

comp.RUV

Factors used in factor analysis signature correction when correction.type = "RUV"

GSs

List with correction variables. If NULL, GSs is found by the approach specified in correction.type

adj.var.GS

Only if correction.type is not "none" and siganture.method is "zscore". Transforming signature scores by subtracting the correction variable scores "GScor", residuals of linear model using the correction variable as covariate "GSlmcor", or using the correction variable in the Cox model "GSadj" (default)

adjusted.var.random

Variables that enter in the Cox model as random effect

adjusted.var.fixed

Confounding variables that enter in the Cox model as fixed effect

executation.info

If TRUE information regarding executation stages is shown

mc.cores

The number of cores to use for parallel executions

rg.cox

If TRUE, survival effects at gene level are computed

alternative

Character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less"

nperm

Number of outcome shuffle instances to be done

permutation.type

Either "none", "Gsignature" or "norm01" (see details)

GSassociation

GS association with survival is computed to show global tendency

GS

List with the global signature (for internal use)

positive.controls

Character string with gene signature to be used as positive control (must match rownames(nda))

bootstrapping

If TRUE, random positive control signatures of size sigSize are sampled with replacement

prop.pos.cont

Numeric vector of at least one element that indicates the amount (proportion between 0 and 1) of purity of the positive control signatures to be tested (one by default, zero would correspond to random signatures, and in betweeen there would be contaminated positive control signatures)

nrpcs

Number of random positive control signature instances to be used to approximate power

id.size

Signature size used sigSize[id.size] for some random signature based diagnostics

null.dist

Either "asymptotic" (default) or "random.signatures"

cdRS

A hrunbiasedDensityRS object (to avoid computation burden) or NULL

basic.cont

Basic controls are performed, these are done no matter the basic.cont specification if hrunbiasedDiagnostic is called

GScoef

The log HR effect of global signature (common tendency) for simulations

tscoef

The log HR effect of target signature (unique tendency) for simulations

ninst.rs

Instances of random signature distributions for simulated data analysis (must be larger than zero)

ninst.ts

Instances of target signature estimated effect for simulated data analysis (can be zero)

lambdas

Weibull distribution shape parameters (see simsurv), first element for times to event distribution and second element for follow-up times distribution

gammas

Weibull distribution scale parameters (see simsurv), first element for times to event distribution and second element for follow-up times distribution

stat

If TRUE, simulated data analysis is performed on the HR statistic instead of the logHR coefficient

comp.PCA

Numeric(2) vector with the specific components to compute correlation between random signatures and the projections

...

Arguments passed to or from other methods to the low level.

Details

Several diagnostic plots via plot.hrunbiasedDiagnostic are available which can be useful to decide whether an adjustment in estimating hazard ratios for gene signatures is needed and, in some extent, which class of correction could be appropriate. The diagnostics implemented in this function can be grouped in five modules: (i) density random signatures; (ii) permutated outcome; (iii) positive control power; (iv) simulated survival data; and (v) random signatures correlation with PC. Detailed information about the plots in each of the modules is provided in plot.hrunbiasedDiagnostic.

Correction types include adjustments by global signature ("Gsignature"), negative control signatures ("NCsignatures"), or negative control factors ("RUV"). Global signature is a summary across all standardized genes in the data whereas negative control adjustments are found by summarising the information of only a few particular genes. All genes are given a score via attribute score (i.e., gene variability, cross-study reproducibility,...). Selected negative control genes are those whose score is smaller than the percentile indicated in seqquant. Several values for seqquant can be given so the diagnostic can be done over different specifications of negative control genes.

Permutations based diagnostic is done to show global biases in random signature distributions due to both sampling and gene-to-gene dependence structure. The permutation.type equal to "none" or "Gsignature" have the same interpretation as the one for the correction type. Besides, in "norm01" we also consider a shuffling of the samples independently for all genes in the data so gene-to-gene relationships are broken.

Value

If diagnostic.type = "density.rs" or hrunbiasedDensityRS function is called, return an object of class hrunbiasedDensityRS with attributes

"hr.rs"

Cox model outcome of random signatures

"geneMeanHR.signatureHR"

Average log HR genewise in random signature and log HR in the same random signatures

If diagnostic.type = "permutations" or hrunbiasedPermutations function is called, return an object of class hrunbiasedPermutations with attributes

"perms"

Time-to-event data permuted indexes

"perm.out"

Outcome of permutations study

If diagnostic.type = "positive.cont.power" or hrunbiasedPCpower function is called, return an object of class hrunbiasedPCpower with attributes

"hr.pc"

Cox model outcome of positive control signature

"pvals.pc"

P-values found for positive control signatures

If diagnostic.type = "simulations" or hrunbiasedSimulations function is called, return an object of class hrunbiasedSimulations with attributes

"simu.info"

Simulated data analysis output for diagnostic plot

If diagnostic.type = "PCAcorrelations" or hrunbiasedPCAcorrelation function is called, return an object of class hrunbiasedPCAcorrelation with attributes

"rs.cor"

Correlation between random signatures and the projections of the comp.PCA components

"rs.gs.cor"

Correlation between random signatures adjusted by GS and the projections of the comp.PCA components

"gs.cor"

Correlation between Global signature and the projections of the comp.PCA components

For all called functions or diagnostic.type options, the following items are also included

"GS"

Global signature

"seqquant"

Sequence seqquant used

"sigSize"

Signature size

"correction.type"

Correction approach used

"diagnostic.type"

Diagnostic type used

Author(s)

Adria Caballe Mestres

References

Caballe Mestres A, Berenguer Llergo A and Stephan-Otto Attolini C. Adjusting for systematic technical biases in risk assessment of gene signatures in transcriptomic cancer cohorts. bioRxiv (2018).

Gagnon-Bartsch J. and Speed T. Using control genes to correct for unwanted variation in microarray data. Biostatistics 13, 539-552 (2012).

Hanzelmann S., Castelo R. and Guinney J. GSVA: gene set variation analysis for microarray and RNA-Seq data. BMC Bioinformatics 7 (2013).

See Also

plot.hrunbiasedDiagnostic and hrunbiasedTesting

Examples

1
2
3
4
5
6
7
eh <- ExperimentHub()
nda.brca <- query(eh, "mcsurvdata")[["EH1497"]]
nda.gse1456 <- nda.brca[,nda.brca$dataset=="GSE1456"]

out.brca.GSE1456 <- hrunbiasedDiagnostic(nda.gse1456,
 correction.type = "none", mc.cores = 1, diagnostic.type = "density.rs",
 sigSize = 50, nrs = 100, id.size = 1, executation.info = FALSE)

adricaba/hrunbiased documentation built on May 24, 2019, 7:48 a.m.