ContrastTopRegions: ContrastTopRegions

ContrastTopRegionsR Documentation

ContrastTopRegions

Description

ContrastTopRegions

Usage

ContrastTopRegions(CS, Crit, Info, Thres, Simplify = FALSE)

Arguments

CS

a list of contrast summaries as obtained from function ContrastSummary

Crit

a string providing the name of the variable to use to select regions

Info

a data.frame providing information about markers

Thres

the threshold to be used on the Crit variable

Simplify

a boolean specifying whether the results should be displayed as a list (by-default option) or as a single data.frame

Value

a data.frame or a list of data.frames

Examples

## The full example execution takes a few seconds.
# data(Freq);data(NbGamete)
# FreqNbG <- BuildFreqNbG(Freq,NbGamete)
# HFst.m <- HudsonFst.m(FreqNbG)

## Two sets of populations to contrast
# Contrast <- list(America=c("Colombian","Maya"),Europe=c("Tuscan","Italian"))
# Profiles <- HudsonFst.prof(HFst.m,Contrast=Contrast)
# PS <- ProfilingSummary(Profiles,Info) 

# RefLevel <- rapply(Profiles,median,classes = "numeric",how='list')
# Ratio.thres <- 3
# NbSnp.min <- 1
# CS <- ContrastSummary(PS, RefLevel,
#                       Ratio.thres=Ratio.thres,
#                       NbSnp.min=NbSnp.min)
# NbSel.thres <- 2
# TopRegions <- ContrastTopRegions(CS = CS,Crit = 'NbSel',Info = Info,
#                                 Thres = NbSel.thres, Simplify=TRUE)

fst4pg documentation built on July 4, 2022, 1:06 a.m.