calculate_relatedness: Estimate the relatedness between pairs of isolates

View source: R/pop_genetics.R

calculate_relatednessR Documentation

Estimate the relatedness between pairs of isolates

Description

Estimate the relatedness between pairs of isolates

Usage

calculate_relatedness(snpdata, mat.name="GT", family="Location", sweepRegions=NULL, groups=c("Chogen","DongoroBa"))

Arguments

snpdata

SNPdata object

mat.name

the name of the genotype table to be used. default="GT"

from

the name of the column, in the metadata table, to be used to represent the sample's population

sweepRegions

a data frame with the genomic coordinates of the regions of the genome to be discarded. This should contain the following 3 columns:

  1. Chrom: the chromosome ID

  2. Start: the start position of the region on the chromosome

  3. End: the end position of the region on the chromosome

groups

a vector of character. If specified, relatedness will be generated between these groups

Details

The relatedness calculation is based on the model developed by Aimee R. Taylor and co-authors. https://journals.plos.org/plosgenetics/article?id=10.1371/journal.pgen.1009101

Value

SNPdata object with an extra field: relatedness. This will contain the relatedness data frame of 3 columns and its correspondent matrix


FellouMada/rSNPdata documentation built on June 12, 2022, 7:29 p.m.