% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gpart.R
\name{GPART}
\alias{GPART}
\title{Partitioning genodata based on the result obtained by using Big-LD and gene region information.}
\usage{
GPART(geno=NULL, SNPinfo=NULL, geneinfo=NULL, genofile=NULL,
SNPinfofile=NULL, geneinfofile=NULL, geneDB = c("ensembl","ucsc"),
assembly = c("GRCh38", "GRCh37"), geneid = "hgnc_symbol",ensbversion = NULL,
chrN=NULL, startbp=-Inf, endbp=Inf, BigLDresult=NULL, minsize=4, maxsize=50,
LD=c("r2", "Dprime"), CLQcut=0.5, CLQmode=c("density", "maximal"), MAFcut = 0.05,
GPARTmode=c("geneBased", "LDblockBased"),
Blockbasedmode=c("onlyBlocks", "useGeneRegions"))
}
\arguments{
\item{geno}{Data frame or matrix of additive genotype data, each column is additive genotype of each SNP.}

\item{SNPinfo}{Data frame or matrix of SNPs information.  1st column is rsID and 2nd column is bp position.}

\item{geneinfo}{Data frame or matrix of Gene info data.
(1st col : Genename, 2nd col : chromosome, 3rd col : start bp,  4th col : end bp)}

\item{genofile}{Character constant; Genotype data file name (supporting format: .txt, .ped, .raw, .traw, .vcf).}

\item{SNPinfofile}{Character constant; SNPinfo data file name (supporting format: .txt, .map).}

\item{geneinfofile}{A Character constant; file containing the gene information
(1st col : Genename, 2nd col : chromosome, 3rd col : start bp,  4th col : end bp)}

\item{geneDB}{A Character constant; database type for gene information. Set \code{"ensembl"} to get gene info from "Ensembl",
or set \code{"ucsc"} to get gene info from "UCSC genome browser" (See package "biomaRt" or
package "homo.sapiens"/"TxDb.Hsapiens.UCSC.hg38.knownGene"/ "TxDb.Hsapiens.UCSC.hg19.knownGene" for details.)}

\item{assembly}{A character constant; set \code{"GRCh37"} for GRCh37, or set \code{"GRCh38"} for GRCh38}

\item{geneid}{A character constant; When you use the gene information by \code{geneDB}. specity the symbol for gene name to use.
default is "hgnc_symbol".
(eg. 'ensembl_gene_id' for \code{geneDB = "ensembl"}, "ENTREZID"/"ENSEMBL"/"REFSEQ"/"TXNAME" for \code{geneDB="ucsc"}.
See package 'biomaRt' or package 'Homo.sapiens' for details)}

\item{ensbversion}{a integer constant; you can set the release version of ensembl
when you use the gene information by using \code{geneDB='emsembl'} and \code{assembly='GRCh38'}}

\item{chrN}{Numeric(or Character) constant (or vector); chromosome number to use. If \code{NULL}(default), we use all chromosome.}

\item{startbp}{Numeric constant; starting bp position of the \code{chrN}. Default -Inf.}

\item{endbp}{Numeric constant; last bp position of the \code{chrN}. Default Inf.}

\item{BigLDresult}{Data frame; a result obtained by \code{BigLD} function. If \code{NULL}(default),
the \code{GPART} function first excute \code{BigLD} function to obtain LD blocks estimation result.}

\item{minsize}{Numeric constant; the lower bound of number of SNPs in a partition.}

\item{maxsize}{Numeric constant; the upper bound of number of SNPs in a partition.}

\item{LD}{Character constant; LD measure to use, r2 or Dprime.}

\item{CLQcut}{Numeric constant; threshold for the correlation value |r|, between 0 to 1.}

\item{CLQmode}{Character constant; the way to give priority among detected cliques.
if \code{CLQmode = "density"} then the algorithm gives priority to the clique of largest value of \eqn{(Number of SNPs)/(range of clique)},
else if \code{CLQmode = "maximal"}, then the algorithm gives priority to the largest clique. The default is "density".}

\item{MAFcut}{Numeric constant; the MAF threshold. Default 0.05.}

\item{GPARTmode}{Character constant; GPART algorithm methods to use, "geneBased" or "LDblockBased". Default is ??geneBased??}

\item{Blockbasedmode}{Character constant; When you set \code{GPARTmode = "LDblockBased"}, specify LDblock based method as
\code{"onlyBlocks"}("LDblock based only" algorithm) or \code{"useGeneRegions"}(LDblock based and also use gene info algorithm).}
}
\value{
\code{GPART} returns data frame which contains 9 information of each partition
(chromosome, index number of the first SNP and last SNP, rsID of the first SNP and last SNP,
basepair position of the first SNP and last SNP, blocksize, Name of a block)
}
\description{
\code{GPART} partition the given genodata using the result obtained by Big-LD and gene region information.
The algorithm partition the whole sequence into sub sequences of which size do not exceed the given threshold.
}
\examples{
data(geno)
data(SNPinfo)
data(geneinfo)
GPART(geno=geno, SNPinfo=SNPinfo, geneinfo=geneinfo, startbp = 16058400, endbp = 16076500)

}
\seealso{
\code{\link{BigLD}}
}
\author{
Sun Ah Kim <sunny03@snu.ac.kr>, Yun Joo Yoo <yyoo@snu.ac.kr>
}
