Skip to contents

GWASUrlTrack creates an IGV manhattan track GWAS data

Usage

GWASUrlTrack(
  trackName,
  url,
  chrom.col,
  pos.col,
  pval.col,
  color = "darkBlue",
  trackHeight = 50,
  visibilityWindow = 1e+05
)

Arguments

trackName

A character string, used as track label by igv, we recommend unique names per track.

url

character

chrom.col

numeric, the column number of the chromosome column

pos.col

numeric, the column number of the position column

pval.col

numeric, the column number of the GWAS pvalue colum

color

A css color name (e.g., "red" or "#FF0000"

trackHeight

track height, typically in range 20 (for annotations) and up to 1000 (for large sample vcf files)

visibilityWindow

Maximum window size in base pairs for which indexed annotations or variants are displayed. Defaults: 1 MB for variants, whole chromosome for other track types.

Value

A GWASUrlTrack object

Examples


    #----------------------------
    #  first, from a local file
    #----------------------------

  file <- system.file(package="igvR", "extdata", "tbl.mef2cGWAS.variants.RData")
  tbl.gwas <- get(load(file))
  dim(tbl.gwas)  #  32 6
#> [1] 178   9
  track <- GWASUrlTrack("GWAS from url",
                        "https://s3.amazonaws.com/igv.org.demo/gwas_sample.tsv.gz",
                         chrom.col=12, pos.col=13, pval.col=28)


    #------------------------------------------
    #  show the relevant portion of the genome
    #------------------------------------------

  shoulder <- 10000
  roi <- with(tbl.gwas, sprintf("%s:%d-%d", CHR[1], min(BP)-shoulder, max(BP) + shoulder))
  # showGenomicRegion(igv, roi)

  # displayTrack(igv, track)