siteEFF: Calculation of Sites Effective

View source: R/vis_functionalSites.R

siteEFFR Documentation

Calculation of Sites Effective

Description

Calculation of Sites Effective

Usage

siteEFF(hap, pheno, phenoNames, quality = FALSE, method = "auto",
        p.adj = "none")

Arguments

hap

object of "hapResult" class

pheno

phenotype data, with column names as pheno name and row name as accessions.

phenoNames

pheno names used for analysis, if missing, will use all pheno names in pheno

quality

bool type, indicate whther the type of phenos are quality or quantitative. Length of quality could be 1 or equal with length of phenoNames. Default as FALSE

method

character or character vector with length equal with phenoNames indicate which method should be performed towards each phenotype. Should be one of "t.test", "chi.test", "wilcox.test" and "auto". Default as "auto", see details.

p.adj

character, indicate correction method. Could be "BH", "BY", "none"

Details

The site EFF was determinate by the phenotype difference between each site geno-type.

The p was calculated with statistical analysis method as designated by the parameter method. If method set as "auto", then chi.test will be selected for quantity phenotype, eg.: color; for quantity phynotype, eg.: height, with at least 30 observations per geno-type and fit Gaussian distribution t.test will be performed, otherwise wilcox.test will be performed.

Value

a list containing two matrix names as "p" and "EFF", with column name are pheno names and row name are site position. The matrix names as "p" contains all p-value. The matrix named as "EFF" contains scaled difference between each geno-types per site.

Examples


data("geneHapR_test")

# calculate site functional effect
# siteEFF <- siteEFF(hapResult, pheno, names(pheno))
# plotEFF(siteEFF, gff = gff, Chr = "scaffold_1")


geneHapR documentation built on May 29, 2024, 11:59 a.m.