generate.modules: Function for creation of genomic interaction modules based on...

Description Usage Arguments Value Examples

View source: R/all_functions.R

Description

Generate.modules normalizes the epistatic interaction coefficients and performs hierarchical clustering,SNP selection and parameter selection for module construction, and generates modules. It uses the WGCNA workflow modified for epistatic correlations and outputs the module components and analysis parameters.

Usage

1
2
generate.modules(correlations,values="Coefficients",power=c(seq(1,10,0.1),c(12:22)),
n.snps=dim(correlations$Coefficients)[1],minClusterSize=50,type="unsigned",threads=1)

Arguments

correlations

List of epistatic correlations and p-values generated by epistatic.correlation()

values

Character which can be "Pvalues" or "Coefficients" Indicating if P-values or Coefficients should be used for analysis. The recomended and defualt values is Coefficients

power

Powers to test for creating scale free network. Only change if the default values don't work

n.snps

Number of SNPs to select. SNPs are selected by connectivity, so 500 will select the top 500 most connected Snps. Default is to use all

minClusterSize

Minimum module (cluster) size. Default, is 50, but changing this may be recommended in case of sparse SNPs

type

Type of network to generate. Default is "unsigned", can be "signed" or "signed hybrid"

threads

Number of threads to use if parallelization is possible.

Value

Plots the network connectivity and the scale and SNP tree clustering with modules found. Returns a named list with all the data generated:

SNPs

SNPs used in the analysis and their correlations

connectivity

The connectivity matrix of the SNPs

adjMat

The adjacency matrix of the SNPs

dissTom

The dissimilarity TOM

genetree

The clustering object used for the genetree

modules

The module numbers for each SNP, in order of the SNP matrix

modulcolors

The colors used in the modules for each SNP

power.estimate

The power estimate to generate a scale free network

Examples

1
 generate.modules(correlations)

AQS-Group/WISH documentation built on July 17, 2020, 12:12 a.m.