qtl2dplot: 2D QTL plot

View source: R/qtl2dplot.R

qtl2dplotR Documentation

2D QTL plot

Description

2D QTL plot

Usage

qtl2dplot(
  d,
  chrlen = gap::hg19,
  snp_name = "SNP",
  snp_chr = "Chr",
  snp_pos = "bp",
  gene_chr = "p.chr",
  gene_start = "p.start",
  gene_end = "p.end",
  trait = "p.target.short",
  gene = "p.gene",
  TSS = FALSE,
  cis = "cis",
  value = "log10p",
  plot = TRUE,
  cex.labels = 0.6,
  cex.points = 0.6,
  xlab = "QTL position",
  ylab = "Gene position"
)

Arguments

d

Data to be used.

chrlen

lengths of chromosomes for specific build: hg18, hg19, hg38.

snp_name

variant name.

snp_chr

variant chromosome.

snp_pos

variant position.

gene_chr

gene chromosome.

gene_start

gene start position.

gene_end

gene end position.

trait

trait name.

gene

gene name.

TSS

to use TSS when TRUE.

cis

cis variant when TRUE.

value

A specific value to show.

plot

to plot when TRUE.

cex.labels

Axis label extension factor.

cex.points

Data point extension factor.

xlab

X-axis title.

ylab

Y-axis title.

Details

This function is both used as its own for a 2d plot and/or generate data for a plotly counterpart.

Value

positional information.

Examples

## Not run: 
# SCALLOP/INF
d <- read.csv("~/INF/work/INF1.merge.cis.vs.trans",as.is=TRUE)
inf <- qtl2dplot(d,cex.points=-d[["log10p"]]/50)
# A qtlClaaifier/qtl2dplot coupling example:
cis.vs.trans <- read.csv("~/Caprion/analysis/work/caprion_dr.cis.vs.trans",as.is=TRUE)
caprion <- qtl2dplot(cis.vs.trans,chrlen=gap::hg19,
           snp_name="SNP",snp_chr="SNPChrom",snp_pos="SNPPos",
           gene_chr="geneChrom",gene_start="geneStart",gene_end="geneEnd",
           trait="prot",gene="Gene",
           TSS=TRUE,cis="cis",plot=TRUE,
           cex.labels=0.6,cex.points=cis.vs.trans[["log10p"]]/40,
           xlab="pQTL position",ylab="Gene position")
head(cis.vs.trans)
    Gene             SNP  prot log10p geneChrom geneStart  geneEnd SNPChrom    SNPPos  cis
   YWHAB 8:111907280_A_T 1433B   7.38        20  43530174 43535076        8 111907280 FALSE
     A2M 14:34808001_A_T  A2MG   7.51        12   9220421  9268445       14  34808001 FALSE
    APEH  1:12881809_A_G  ACPH   7.83         3  49711834 49720772        1  12881809 FALSE
     PGD 2:121896327_A_G  6PGD   7.79         1  10459174 10479803        2 121896327 FALSE
SERPINF2  17:1618262_C_T  A2AP  12.59        17   1648289  1657825       17   1618262  TRUE
    PGLS 19:54327869_G_T  6PGL   9.87        19  17622481 17631887       19  54327869 FALSE

## End(Not run)


gap documentation built on Oct. 27, 2026, 1:07 a.m.