IntRegionalPlot: plot association with LD and annotation at a given region

View source: R/IntRegionalPlot.R

IntRegionalPlotR Documentation

plot association with LD and annotation at a given region

Description

This function plot the association with linkage disequiblism and annotation at the level of a region.

Usage

IntRegionalPlot(
  chr,
  left,
  right,
  gtf,
  association,
  hapmap,
  hapmap_ld = NULL,
  slide_length = -1,
  threadN = 1,
  ldstatistics = "rsquare",
  leadsnp = NULL,
  threshold = NULL,
  link2gene = NULL,
  triangleLD = TRUE,
  link2LD = NULL,
  leadsnpLD = TRUE,
  label_gene_name = FALSE,
  colour02 = "gray",
  colour04 = "cyan",
  colour06 = "green",
  colour08 = "yellow",
  colour10 = "red",
  leadsnp_shape = 23,
  leadsnp_colour = "black",
  leadsnp_fill = "purple",
  leadsnp_size = 1.5,
  marker2highlight = NULL,
  marker2label = NULL,
  marker2label_angle = 60,
  marker2label_size = 1
)

Arguments

chr

the chromosome, required.

left

the left border of the region, required.

right

the right border of the region, required.

gtf

the annotation file, required.

association

the association table, required.

hapmap

the genotype file for computing leadsnpLD in the format of hapmap, required.

hapmap_ld

the genotype file for computing trangleLD in the format of hapmap, not required. If hapmap_ld was not provided, hapmap would be used.

slide_length

the sliding window length for computing LD, default -1.

threadN

the number of (CPU) cores used for computing LD, default 1.

ldstatistics

the statistics used for computing LD, default rsquare, and the optional is dprime.

leadsnp

snp name provided by user

threshold

the significant level of the assocition, default NULL.

link2gene

a dataframe speicify markers to be linked from GWAS to genic structure, default NULL. When link2gene is 'NULL', locis that passed the threshold will be linked. Please see help('marker2link').

triangleLD

show LD in the format lile triangle, default TRUE.

link2LD

a dataframe speicify markers to be linked from genic structure to LD matrix, default NULL. When link2gene is 'NULL', locis that passed the threshold will be linked. Please see help('marker2link').

leadsnpLD

show LD of the locis when compared with the most significant loci, default TRUE.

label_gene_name

label the name of gene within the region, default FALSE.

colour02

the colour of LD statistics ranged between 0.0 and 0.2, default gray.

colour04

the colour of LD statistics ranged between 0.2 and 0.4, default cyan.

colour06

the colour of LD statistics ranged between 0.4 and 0.6, default green.

colour08

the colour of LD statistics ranged between 0.6 and 0.8, default yellow.

colour10

the colour of LD statistics ranged between 0.8 and 1.0, default red.

leadsnp_shape

the shape of leadsnp, default 23. For others, please see help('points').

leadsnp_colour

the shape of the point of leadsnp, default black. For others, please see help('points').

leadsnp_fill

the filled colour of the point of leadsnp, default purple. For others, please see help('points').

leadsnp_size

the size of of the point of leadsnp, default 1.5. For others, please see help('points').

marker2highlight

a dataframe speicify markers to be showed by colour,shape,fill,size, default NULL. Please see help('marker2highlight').

marker2label

a dataframe speicify markers to be labeled, default NULL. Please see help('marker2link')

marker2label_angle

angel of labeled text, default 60.

marker2label_size

size of labeled text, default 1.

Value

ggplot2 plot

Author(s)

Hongwei Wang <whweve@163.com>

Examples

data(gtf)
data(association)
data(hapmap_am368)
data(hapmap2)
IntRegionalPlot(chr=9,left=94178074-200000,right=94178074+200000,
gtf=gtf,association=association,hapmap=hapmap_am368,
hapmap_ld=hapmap_am368,threshold=5,leadsnp_size=2)

whweve/IntAssoPlot documentation built on Feb. 19, 2024, 10:14 a.m.