View source: R/func__geoTempAnalyser__countAllelesPerCountry.R
countAllelesPerCountry | R Documentation |
Count alleles per country
countAllelesPerCountry( alleles = NULL, sam, mapping, apam, nul = NA, freq = FALSE )
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. |
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.
Yu Wan (wanyuac@126.com)
a_nat <- countAllelesPerCountry(alleles = nwk$V$allele, sam = sam, mapping = assoc$mapping, apam = assoc$alleles$A, nul = -30)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.