This function will plot the p-values associated with variants in a given region of the genome (genome position: x-axis; -log10(p): y-axis).
Usage
GWASTrack(
gwas,
region,
ld.file = NULL,
ld.lead.snp = NULL,
credset.file = NULL,
credset.threshold = 0.01,
p.threshold = 5e-08,
ymax = NULL,
point.size = 1,
point.color = "steelblue",
show.axis = TRUE
)Arguments
- gwas
Path to GWAS summary statistics file, or a dataframe containing the gwas data in the GWAS-SSF format
- region
Genomic region (GenomicRanges::GRanges or a string that can be converted to
GRangeslike "chr10:112900000-113100000")- ld.file
Path to LD file. Optional.
- ld.lead.snp
Lead SNP for LD (required if ld.file provided)
- credset.file
Path to credible set file. Optional.
- credset.threshold
PIP threshold for credible sets (default: 0.01)
- p.threshold
Genome-wide significance threshold (default: 5e-8)
- ymax
Maximum y-axis value (default: auto)
- point.size
Point size (default: 1)
- point.color
Point color when no LD (default: "steelblue")
- show.axis
Show x-axis (default: TRUE)
Details
If an LD file is provided using the ld.file parameter, or a column
named r2 is present in the input GWAS data, the variants will be
colored according to their LD value.
If a fine mapping file is provided using the credset.file parameter,
or a column named in_credset is present in the input GWAS data,
variants in the credible set will be denoted by shape. If LD information is
not provided, credible variants will also be denoted by color.