countAllelesPerCountry: Count alleles per country

View source: R/func__geoTempAnalyser__countAllelesPerCountry.R

countAllelesPerCountryR Documentation

Count alleles per country

Description

Count alleles per country

Usage

countAllelesPerCountry(
  alleles = NULL,
  sam,
  mapping,
  apam,
  nul = NA,
  freq = FALSE
)

Arguments

alleles

A character vector of allele names.

sam

A data frame of sample information. Required columns: Strain, Country, Year_low and Year_up.

mapping

A data frame in the output of lmm or findPhysLink.

apam

Allelic presence-absence matrix.

nul

A value for zero counts. It can be zero definitely, but setting it to NA makes it easier to draw a heat map.

freq

A logical argument determining if the allele frequency (in rather than allele count is returned.

Value

This function returns a list of two elements: count and mapping, when freq = FALSE, else, returns a list of three elements: freq, mapping and sample_size_country.

Author(s)

Yu Wan (wanyuac@126.com)

Examples

a_nat <- countAllelesPerCountry(alleles = nwk$V$allele, sam = sam, mapping = assoc$mapping, apam = assoc$alleles$A, nul = -30)


wanyuac/GeneMates documentation built on Aug. 12, 2022, 7:37 a.m.