ldByGene: Obtain LD statistics in region specified by a gene model.

Description Usage Arguments Value Note Examples

View source: R/ldByGene.R

Description

Obtain LD statistics in region specified by a gene model.

Usage

1
2
3
4
5
6
7
8
9
ldByGene(
  sym = "MMP24",
  vcf = system.file("vcf/c20exch.vcf.gz", package = "ldblock"),
  flank = 1000,
  vcfSLS = "NCBI",
  genomeSLS = "hg19",
  stats = "D.prime",
  depth = 10
)

Arguments

sym

A standard gene symbol for use with genemodel

vcf

Path to a tabix-indexed VCF file

flank

number of basepairs to flank gene model for search

vcfSLS

seqlevelsStyle (SLS) token for VCF; will be imposed on gene model

genomeSLS

character tag for genome, to be used with readVcf

stats

passed to ld

depth

passed to ld

Value

sparse matrix representation of selected LD statistic, as returned by ld

Note

Uses an internal function genemod4ldblock, that relies on EnsDb.Hsapiens.v75 to get gene model.

Examples

1
2
3
4
5
if (interactive()) {  # there is a warning owing to non-SNV present
ld1 = ldByGene(depth=150)
image(ld1[1:200,1:200], col.reg=heat.colors(120), colorkey=TRUE,
 main="SNPs in MMP24 (chr20)") 
}

ldblock documentation built on Nov. 8, 2020, 5:33 p.m.