ga_modelselection_nopc_new: ga_modelselection_nopc_new

Description Usage Arguments Details Value

View source: R/ga_modelselection_nopc_new.R

Description

Performs GA model selection to identify the best model when no principal components are involved. Internal function for modelselection_new().

Usage

1
ga_modelselection_nopc_new(Y,X,regions,regionsnames,significant,number_cores,maxiterations,runs_til_stop,kinship = FALSE)

Arguments

Y

The phenotype response on the reduced scale (aggregating phenotype by ecotype/taxa), this should be a matrix with 1 column.

X

The SNP matrix on the reduced scale (aggregating phenotype by ecotype/taxa).

significant

A vector of 0 and 1's where the 1's indicate what SNP's were found to be significant in the preselection function.

regions

A matrix where each column represents a principal component for each region.

regionsnames

A named list which highlights which SNPs fall into which region.

number_cores

Number of cores to be passed on to the genetic algorithm to increase computational speed.

maxiterations

This is the maximum number of iterations the Genetic Search algorithm will run.

runs_til_stop

This is the number of consecutive iterations where the BIC is not improved before the genetic algorithm is stopped.

kinship

The kinship matrix associated with the SNPs in this analysis.

Details

This function will print out lines corresponding to the convergence of the genetic search algorithm.

Value

A named matrix where the names correspond to the significant SNP's. This will usually out a matrix with a singular row, where the values of this row is 0 or 1 where 1 indicates significance in the final model and 0 indicates non significance in the final model. Sometimes this will output a matrix with multiple columns. This is because there is a SNP or multiple SNPs that when added to the model create rank deficiency issues in the model. Naturally rank deficient columns are forced out but the genetic algorithm is not smart enough to sort these.


GWAS.BAYES documentation built on Nov. 8, 2020, 7:47 p.m.