get_bgc_outliers: Parses BGC output and identifies outlier SNPs

View source: R/get_bgc_outliers.R

get_bgc_outliersR Documentation

Parses BGC output and identifies outlier SNPs

Description

Parses BGC output and identifies outlier SNPs

Usage

get_bgc_outliers(
  df.list,
  admix.pop,
  popmap,
  qn = 0.975,
  loci.file = NULL,
  save.obj = NULL
)

Arguments

df.list

List of data.frame objects from combine_bgc_output()

admix.pop

String identifying admixed population in population map file

popmap

Population map file consisting of two tab-separated columns: indID popID (no header line)

qn

Upper quantile interval value for determining outlier SNPs. Default = 0.975

loci.file

Path to two-column tab-separated file containing loci names (in same order as BGC input). Column 1 should be locus name, column2 should be the position of the SNP. header line should be: #CHROM POS

save.obj

File path. If supplied, saves outlier info as .RDS object. The value for save.obj should be the filename for the RDS object

Value

List containing 3 data.frame objects. 1) outlier info, 2)popmap info, 3) hybrid index info

Examples

outliers <- get_bgc_outliers(df.list = aggregated.results,
                             admix.pop = "population1",
                             popmap = "./popmap.txt",
                             qn = 0.975,
                             loci.file = "./bgc_loci.txt",
                             save.obj = "./outlierInfo.rds")

btmartin721/ClineHelpR documentation built on Oct. 15, 2024, 5:05 a.m.