logical. If TRUE (default), flag "folded" is set to 0, otherwise to 1.
verbose
logical. If TRUE (default), prints filter statements.
Value
A dataframe with four columns:
position marker position
x (absolute) frequency of the alternative (derived) variant
n number of non-missing genotypes
folded a flag marking polarization
Details
SweepFinder and SweeD are two stand-alone programs which
implement the same method to detect selective sweeps using the
allele frequency at each site. This function calculates these frequencies
from a haplohh-class and returns a table which
can be saved into a file (with tabs as separators, without row names and quotes) that can
be used as input for the two programs.
Sites with less than two haplotypes genotyped or with more than two alleles are removed.
If polarized, sites monomorphic for the ancestral allele are removed, too.
References
DeGiorgio, M., and, Huber, CD and Hubisz, MJ and, Hellmann, I. and Nielsen, R. (2016)
SweepFinder2: increased robustness and flexibility. Bioinformatics32:1895-1897
Pavlidis, P., D. Zivkovic, A. Stamatakis, and N. Alachiotis, (2013)
SweeD: likelihood-based detection of selective sweeps in thousands of genomes.
Molecular Biology and Evolution30: 2224-34.
# NOT RUN {#example# sweepfinder example from vignettemake.example.files()
hh <- data2haplohh("example_sweep_with_recombination.vcf")
haplohh2sweepfinder(hh)
remove.example.files()
# }