Skip to content

Issue: Incorrect behavior about build version in log message even when specified that build is "38" #204

@jtb324

Description

@jtb324

Issue:

When I run the following code for sumstats in build 38, I get the following log message that says the data is based on hg19.

python code

afr_sumstats = gl.Sumstats("afr_input_file.txt", snpid="ID", chrom="CHR", pos="POS", ref="REF", alt="ALT", beta="BETA", maf="AF", p="PVAL", sep="\t", build="38", verbose=True)

eur_sumstats = gl.Sumstats("eur_input_file.txt", snpid="ID", chrom="CHR", pos="POS", ref="REF", alt="ALT", beta="BETA", maf="AF", p="PVAL", sep="\t", build="38", verbose=False)

gl.plot_miami2(path1=afr_sumstats, path2=eur_sumstats, mode="m", verbose=True, dpi=400, save="miami_plot.png")

log message

2026/02/03 09:55:42 Start to create Manhattan plot for sumstats1...
2026/02/03 09:55:42 Configured plot style for plot_mqq:m
2026/02/03 09:55:42 Starting Manhattan plot creation (Version v4.0.7)
2026/02/03 09:55:42  -Genomic coordinates are based on GRCh37/hg19...
2026/02/03 09:55:42  - Genomic coordinates version: 19 ...

I'm running a very simple miami plot call just to explore this package so I don't think this build inconsistency actually affects the results but this still seems like a bug. It seems from walking through the codebase that build gets sets automatically to "19" on line 81 of the viz_plot_mqqplot.py script leading to this issue. I don't know if this is intended behavior or not

What I think is happening:

From what I can tell in the function calls, the code seems to proceed through this path.

plot_miami2() -> _mqqplot()->_setup_and_log_mqq_info()->_process_build

The build variable is set to none in the mqqplot() by default since the plot_miami2 function doesn't provide any value for this. In the _setup_and_log_mqq_info function this None value gets converted to "19". This value is then passed to _process_build which returns the wrong build identifier

Discussion about a solution(?):

I don't know enough about the overall program design, but since the sumstats have a value for the build, could you not just detect the build from those objects and then use the value in subsequent function calls? This seems like it would solve this issue but like I said there may be a design decision that I am not aware of.

Additional Info:

I ran this on a ubuntu 24.04.3 LTS server using python 3.12.9 with a virutalenv. Everything was installed using Pip and functions were run inside a jupyter notebook in vscode with ipkernel v7.1.0.

I can't provide the data to reproduce for data access reasons but I think you could just take 2 sumstats that are in build 38, read them into the Sumstats object and then try to make the miami plot and that should recreate the behavior

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions