findfixedSNP: Calculates allele frequency in each population.

Description Usage Arguments Value Examples

View source: R/findfixedSNP.R

Description

Determines the allele frequencies of each SNPs in specifed populations

Usage

1
findfixedSNP(filePath = NULL, dataIn, popinfo)

Arguments

filePath

full path to the vcf file; this calls the vcfLoad

dataIn

data.table obtained using vcfLoad function

popinfo

dataframe with population identifier (column1) and sample identifier (column2)

Value

A data.table with population.allele as columns and SNPs as rows with frequencies as values

Examples

1
2
3
4
5
6
# reads example.vf, reads table containing sample id and population
# id of each sample then computes allele frequency for each snp in
# each population
vcfInput <- vcfLoad("example.vcf")
populationData <- read.table("populationMetadata")
findfixedSNP(dataIn = vcfInput, popinfo = populationData)

dinmatias/reconproGS documentation built on Sept. 9, 2017, 12:24 a.m.