generate_Group: Generate Group information.

Description Usage Arguments Value

View source: R/WaveQTL_preprocess_funcs.R

Description

This function generates information on which WCs share hyperparameter \pi in the model described in Shim and Stephens 2014. This information is used as an input in WaveQTL software. As default (group.scale=NULL), the function outputs group information indicating that WCs in the same scale share \pi. To put WCs from multiple scales (only for consecutive scales) in the same group, instruction should be provided in group.scale (see below for details).

Usage

1
generate_Group(numWCs, group.scale = NULL)

Arguments

numWCs

a positive number; power of 2; total number of WCs.

group.scale

default = NULL; a vector of nonnegative numbers; length of the vector is the number of groups; i-th element in the vector indicates the first scale of WCs for i-th group; Suppose group.scale = c(0, 1, 4, 5) and numWCs = 1024. Then, there are four groups. The first group contains WC in the 0-th scale. The second group consists of WCs from the 1st to 3rd scales. WCs in the 4th scale are in the third group and WCs from the 5th to the last (10th) scales are in the fourth group.

Value

group a vector of positive numbers; length of the vector is the number of groups; i-th element in the vector indicates the start position of WCs for i-th group from a list of all WCs; Suppose group = c(1, 2, 9, 17) which can be obtained by using group.scale = c(0, 1, 4, 5) and numWCs = 1024 as input. Then, there are four groups of WCs. The first group has one WC that is in the first position from the list of all WCs. The second group has 7 WCs that locate from the second position to 8th position. WCs from 9th to 16th positions are in the third group and WCs from 17th to the end (1024th) positions are in the fourth group.


jean997/cfdrSims documentation built on May 18, 2019, 11:43 p.m.