LDblockHeatmap: visualization of LD block structure

Description Usage Arguments Value Author(s) See Also Examples

View source: R/gpart.R

Description

LDblockHeatmap visualize the LD structure or LD block results of the inputed data. LDblockHeatmap <- function(geno=NULL, SNPinfo=NULL, genofile=NULL, SNPinfofile=NULL,geneinfo=NULL, geneinfofile = NULL, geneDB = c("ensembl","ucsc","file"), assembly = c("GRCh38", "GRCh37"), geneid = "hgnc_symbol", ensbversion = NULL, chrN=NULL,startbp=-Inf, endbp=Inf, blockresult=NULL, blocktype=c("bigld", "gpart"), minsize=4, maxsize=50, LD=c("r2", "Dprime", "Dp-str"), MAFcut=0.05,CLQcut=0.5, CLQmode=c("density", "maximal"), CLQshow=FALSE, type=c("png", "tif"), filename="heatmap", res=300, onlyHeatmap=FALSE)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
LDblockHeatmap(geno = NULL, SNPinfo = NULL, genofile = NULL,
  SNPinfofile = NULL, geneinfo = NULL, geneinfofile = NULL,
  geneDB = c("ensembl", "ucsc", "file"), assembly = c("GRCh38",
  "GRCh37"), geneid = "hgnc_symbol", ensbversion = NULL,
  geneshow = TRUE, chrN = NULL, startbp = -Inf, endbp = Inf,
  blockresult = NULL, blocktype = c("bigld", "gpart"), minsize = 4,
  maxsize = 50, LD = c("r2", "Dprime", "Dp-str"), MAFcut = 0.05,
  CLQcut = 0.5, CLQmode = c("density", "maximal"), CLQshow = FALSE,
  type = c("png", "tif"), filename = "heatmap", res = 300,
  onlyHeatmap = FALSE)

Arguments

geno

Data frame or matrix of additive genotype data, each column is additive genotype of each SNP.

SNPinfo

Data frame or matrix of SNPs information. 1st column is rsID and 2nd column is bp position.

genofile

Character constant; Genotype data file name (supporting format: .txt, .ped, .raw, .traw, .vcf).

SNPinfofile

Character constant; SNPinfo data file name (supporting format: .txt, .map).

geneinfo

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

geneinfofile

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

geneDB

A Character constant; database type for gene information. Set "ensembl" to get gene info from "Ensembl", or set "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.)

assembly

A character constant; set "GRCh37" for GRCh37, or set "GRCh38" for GRCh38

geneid

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

ensbversion

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

geneshow

logical; do not show the gene information if geneshow=FALSE. Default is geneshow=TRUE

chrN

Numeric(or Character) constant ; chromosome number to use. If the data contains more than one chromosome, you need to specify the chromosome to show.

startbp

Numeric constant; starting bp position of the chrN.

endbp

Numeric constant; last bp position of the chrN.

blockresult

Data frame; a result obtained by BigLD function or GPART. If NULL(default), the function first excute BigLD orGPART to obtain block estimation result denpending on the blocktype.

blocktype

Character constant; "bigld" for Big-LD or "gpart" for GPART. Default is "gpart".

minsize

Integer constant; when blockresult=NULL, blocktype="gpart" specify the threshold for minsize of a block obtained by GPART

maxsize

Integer constant; when blockresult=NULL, blocktype="gpart" specify the threshold for maxsize of a block obtained by GPART

LD

Character constant; LD measure to use, "r2" or "Dprime" or "Dp-str". LD measures for LD heatmap (and BigLD execution when BigLDresult=NULL). When LD = "Dp-str", heatmap shows only two cases, "weak LD or not-informative" and "strong LD". When LD= Dprime heatmap shows the estimated D' measures.

MAFcut

Numeric constant; MAF threshold of SNPs to use. Default 0.05

CLQcut

Numeric constant; threshold for the correlation value |r|, between 0 to 1. Default 0.5.

CLQmode

Character constant; the way to give priority among detected cliques. if CLQmode = "density" then the algorithm gives priority to the clique of largest value of (Number of SNPs)/(range of clique), else if CLQmode = "maximal", then the algorithm gives priority to the largest clique. Default "density".

CLQshow

logical; Show the LD bin structures, i.e. CLQ results, in each LD blocks. Notice that if the region to show includes more than 200 SNPs, the function do now show LD bin structures automatically. Default false.

type

Character constant; file format of output image file. set png for PNG format file, or tif for TIFF format file.

filename

Character constant; filename of output image file. Default "heatmap".

res

Numeric constant; resolution of image. Default 300.

onlyHeatmap

logical; show the LD heatmap without the LD block boundaries. Default false.

Value

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)

Author(s)

Sun-Ah Kim <sunny03@snu.ac.kr>, Yun Joo Yoo <yyoo@snu.ac.kr>

See Also

BigLD

Examples

1
2
LDblockHeatmap(geno=geno[,1:100], SNPinfo=SNPinfo[1:100,], geneinfo=geneinfo,
filename="chr21Heatmap")

gpart documentation built on Nov. 8, 2020, 5:16 p.m.