Closed swvanderlaan closed 1 year ago
Hi,
Sorry for the error. It seems that header for snpid is mistakenly hard coded. This will be fixed in 3.4.20.
For now, an alternative way here is to just load the sumstats using rsID as SNPID like:
sumstats = gl.Sumstats(data, snpid="rsID",...)
Example:
mysumstats = gl.Sumstats("t2d_bbj.txt.gz",
snpid="rsID",
chrom="CHR",
pos="POS",
p="P")
# plot the density using variants with p<1e-5 with a windowsize of 100kb.
mysumstats.filter_value('P < 1e-5').plot_mqq(
sig_level=1e-5, # used for selecting variants for annotation
sig_line=False,
anno="GENENAME",
anno_style="right",
bwindowsizekb=100, #bwindowsizekb for setting the windowsize for calculating density
arm_offset=2,
repel_force=0.01, # default 0.01
use_rank=True,
build="19",
mode="b",
figargs={"figsize": (25, 15), "dpi": 100},
title="cis-eQTLs in carotid plaque",
save="my_plot.pdf",
saveargs={"dpi": 300},
verbose=True,
)
By the way, brisbane plot is used to show the density of independent signals according to Yengo. et al Nature 2022 .
Please note that if loading the entire dataset, gwaslab will just calculate the density and make a density plot for all variants you included in the Sumstats like the example. (not sure if this is what you expected).
You may need to determine the independent signals (or the set of variants you want to include) first using other methods like conditional analysis and then load the results for plotting.
Hi, the error is fixed in v3.4.20. Thanks.
I am running your script using the following data (with ±77 million rows):
This is my command:
This is the log:
This is the error: