assign_color: Assign color to each SNP according to LD.

View source: R/locuscompare.R

assign_colorR Documentation

Assign color to each SNP according to LD.

Description

Assign color to each SNP according to LD.

Usage

assign_color(rsid, snp, ld)

Arguments

rsid

(character vector) A vector of rsIDs on which to assign color.

snp

(string) rsID for lead SNP. This SNP will be colored purple. Other SNPs will be assigned color based on their LD with the lead SNP.

ld

(data.frame) The output from 'retrieve_LD()'.

Examples

# the data.frame merged comes from the example for `get_lead_snp()`.
# the data.frame ld comes from the example for `retrieve_LD()`.
color = assign_color(rsid = merged$rsid, snp = 'rs9349379', ld)

boxiangliu/locuscomparer documentation built on Nov. 27, 2022, 7:26 a.m.