rep_peaks.Rd
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_gemma_lmm.R
\name{rep_peaks}
\alias{rep_peaks}
\title{Find peaks and LD blocks in the LMM results}
\usage{
rep_peaks(
genotypes,
gwas_pvs,
rs_thr = 0.4,
pthr = 1e-20,
mxd = 1e+07,
test = "p_wald"
)
}
\arguments{
\item{genotypes}{The genotypes matrix, one column for each strain, used for computing correlations}
\item{gwas_pvs}{GWAS output pvalues}
\item{rs_thr}{Threshold for correlation, \eqn{r^2} larger than this value will be considered same peak}
\item{pthr}{P-value threshold}
\item{mxd}{Maximal peak width}
\item{test}{Test name in the results data frmae}
}
\value{
a table with the marker name, choose = peak region number, ispeak = marker is peak, rsq = r square value
}
\description{
\code{rep_peaks} use the individual starins genomtypes matrix to find LD blocks in a greedy way
it starts by sorting the GWAS p-values and then choosing the lowest p-value and removing all
markers with a high correlation. It then selects the next marker and so on until all markers with
p-values smaller than the threshold are in peak regions.
}