polish_freq: Polishing compared frequencies.

Description Usage Arguments Value Examples

Description

This function polishes a frequency comparision data frame. The output is a subset of the initial data frame only containing loci that are polymorphic in the specified sample.This function is needed because there are cases where a major allele exists but there is not minor allele because of sequencing errors. In much of the analysis we are only interested in polymophisms. This function ensures that is all we observe.

Usage

1
polish_freq(df, relative, min_freq = 0)

Arguments

df

data frame with columns freq1 and freq2

relative

either freq1 or freq2 . unquoted. only look at sites with frequency above 0 at freq1,freq2

min_freq

the minumun frequency allowed. frequencies below will be set to 0. those above to 1

Value

a data frame with polymophoric loci

Examples

1
2
get_freqs(c("HS1595","HS1563"),small_isnv)->small_dups
polish_freq(small_dups,freq1,0.02)

jtmccr1/HIVEr documentation built on May 29, 2019, 1:50 a.m.