scones.cv_: Find connected explanatory features

View source: R/nongwas.R

scones.cv_R Documentation

Find connected explanatory features

Description

Finds the features maximally associated with a phenotype while being connected in an underlying network. Select the hyperparameters by cross-validation.

Usage

scones.cv_(X, y, featnames, net)

Arguments

X

n x d design matrix

y

Vector of length n with the outcomes

featnames

Vector of length d with the feature names

net

An igraph network that connects the SNPs.

Value

A copy of the SnpMatrix$map data.frame, with the following additions:

  • c: contains the univariate association score for every single SNP.

  • selected: logical vector indicating if the SNP was selected by SConES or not.

  • module: integer with the number of the module the SNP belongs to.

Examples

X <- as(minigwas[['genotypes']], 'numeric')
X <- X + matrix(rnorm(2500, sd = 0.1), nrow(X), ncol(X))
gi <- get_GI_network(minigwas, snpMapping = minisnpMapping, ppi = minippi)
scones.cv_(X, minigwas[['fam']]$affected, minigwas[['map']]$snp, gi)

hclimente/martini documentation built on Feb. 26, 2024, 6:23 p.m.