Hi Dr. Yunye,
The new updates for gwaslab are awesome!
However, I'm currently experiencing an issue highlighting and pinpointing specific variants when plotting the miami plots.
In the logs, it seems that the command is recognized, however, they are not showed in the final plot.
I would really appreciate some of your guidance.
import gwaslab as gl
random ="../gwama_random_firstPass.gwaslab.tsv.gz"
fixed = "../gwama_fixed_firstPass.gwaslab.tsv.gz"
outPlot = "gwama_miami.png"
gl1 = gl.Sumstats(random, build="38", fmt="gwaslab")
gl2 = gl.Sumstats(fixed, build="38", fmt="gwaslab")
gl.plot_miami2(
cut=10,
path1=gl1,
path2=gl2,
build="38",
mode="m",
sig_level=1e-6,
anno_sig_level=1e-6,
same_ylim=True,
anno="GENENAME",
sig_line=True,
additional_line=[5e-8],
additional_line_color=['gray'],
fontsize=11,
pinpoint1=["1:226737538:G:A"],
pinpoint2=["4:89704960:G:A"],
highlight1=["12:40340400:G:A"],
highlight2=["12:122842051:G:T"],
anno_fontsize=12,
colors=["#000000","#ABABAB"],
save=outPlot, save_kwargs={"dpi":300, "facecolor":"white"}
)
2026/02/07 19:11:59 GWASLab v4.0.9 https://cloufield.github.io/gwaslab/
2026/02/07 19:11:59 (C) 2022-2026, Yunye He, Kamatani Lab, GPL-3.0 license, gwaslab@gmail.com
2026/02/07 19:11:59 Python version: 3.12.12 | packaged by conda-forge | (main, Oct 22 2025, 23:25:55) [GCC 14.3.0]
2026/02/07 19:11:59 Start to load format from formatbook....
2026/02/07 19:11:59 -gwaslab format meta info:
2026/02/07 19:11:59 - format_name : gwaslab
2026/02/07 19:11:59 - format_source : https://cloufield.github.io/gwaslab/
2026/02/07 19:11:59 - format_version : 20231220_v4
2026/02/07 19:11:59 -Top 3 inferred source formats:
2026/02/07 19:11:59 1. gwaslab [SPECIFIED] [DETECTED] (score: 50.301) | 2. ldsc (score: 16.744) | 3. mrmega (score: 14.408)
2026/02/07 19:11:59 Start to initialize gl.Sumstats from file :../gwama_random_firstPass.gwaslab.tsv.gz
2026/02/07 19:12:25 -Reading columns : Z,CHR,EA,NEA,POS,N,SNPID,OR,I2,OR_95U,P,STATUS,OR_95L,EAF,DIRECTION
2026/02/07 19:12:25 -Renaming columns to : Z,CHR,EA,NEA,POS,N,SNPID,OR,I2,OR_95U,P,STATUS,OR_95L,EAF,DIRECTION
2026/02/07 19:12:25 -Current Dataframe shape : 14827794 x 15
2026/02/07 19:12:26 -Initiating a status column: STATUS ...
2026/02/07 19:12:26 -Genomic coordinates are based on GRCh38/hg38...
2026/02/07 19:12:26 Start to reorder the columns ...(v4.0.9)
2026/02/07 19:12:26 -Reordering columns to : SNPID,CHR,POS,EA,NEA,STATUS,EAF,OR,OR_95U,OR_95L,Z,P,I2,DIRECTION,N
2026/02/07 19:12:26 -Time taken: 0.651s
2026/02/07 19:12:26 Finished reordering the columns.
2026/02/07 19:12:26 -Trying to convert datatype for CHR: string -> Int64...Success
2026/02/07 19:12:28 -Column : SNPID CHR POS EA NEA STATUS EAF OR OR_95U OR_95L Z P I2 DIRECTION N
2026/02/07 19:12:28 -DType : object Int64 int64 category category int64 float64 float64 float64 float64 float64 float64 float64 object int64
2026/02/07 19:12:28 -Verified: T T T T T T T T T T T T T T T
2026/02/07 19:12:28 -Current Dataframe memory usage: 1513.08 MB
2026/02/07 19:12:28 Finished loading data successfully!
2026/02/07 19:12:28 GWASLab v4.0.9 https://cloufield.github.io/gwaslab/
2026/02/07 19:12:28 (C) 2022-2026, Yunye He, Kamatani Lab, GPL-3.0 license, gwaslab@gmail.com
2026/02/07 19:12:28 Python version: 3.12.12 | packaged by conda-forge | (main, Oct 22 2025, 23:25:55) [GCC 14.3.0]
2026/02/07 19:12:28 Start to load format from formatbook....
2026/02/07 19:12:28 -gwaslab format meta info:
2026/02/07 19:12:28 - format_name : gwaslab
2026/02/07 19:12:28 - format_source : https://cloufield.github.io/gwaslab/
2026/02/07 19:12:28 - format_version : 20231220_v4
2026/02/07 19:12:28 -Top 3 inferred source formats:
2026/02/07 19:12:28 1. gwaslab [SPECIFIED] [DETECTED] (score: 50.301) | 2. ldsc (score: 16.744) | 3. mrmega (score: 14.408)
2026/02/07 19:12:28 Start to initialize gl.Sumstats from file :../gwama_fixed_firstPass.gwaslab.tsv.gz
2026/02/07 19:12:53 -Reading columns : Z,CHR,EA,NEA,POS,N,SNPID,OR,I2,OR_95U,P,STATUS,OR_95L,EAF,DIRECTION
2026/02/07 19:12:53 -Renaming columns to : Z,CHR,EA,NEA,POS,N,SNPID,OR,I2,OR_95U,P,STATUS,OR_95L,EAF,DIRECTION
2026/02/07 19:12:53 -Current Dataframe shape : 14828148 x 15
2026/02/07 19:12:53 -Initiating a status column: STATUS ...
2026/02/07 19:12:53 -Genomic coordinates are based on GRCh38/hg38...
2026/02/07 19:12:54 Start to reorder the columns ...(v4.0.9)
2026/02/07 19:12:54 -Reordering columns to : SNPID,CHR,POS,EA,NEA,STATUS,EAF,OR,OR_95U,OR_95L,Z,P,I2,DIRECTION,N
2026/02/07 19:12:54 -Time taken: 0.650s
2026/02/07 19:12:54 Finished reordering the columns.
2026/02/07 19:12:54 -Trying to convert datatype for CHR: string -> Int64...Success
2026/02/07 19:12:56 -Column : SNPID CHR POS EA NEA STATUS EAF OR OR_95U OR_95L Z P I2 DIRECTION N
2026/02/07 19:12:56 -DType : object Int64 int64 category category int64 float64 float64 float64 float64 float64 float64 float64 object int64
2026/02/07 19:12:56 -Verified: T T T T T T T T T T T T T T T
2026/02/07 19:12:56 -Current Dataframe memory usage: 1513.11 MB
2026/02/07 19:12:56 Finished loading data successfully!
2026/02/07 19:12:56 Start to create miami plot v4.0.9:
2026/02/07 19:12:56 Configured plot style for plot_miami:m
2026/02/07 19:12:56 -Obtaining Sumstats1 CHR, POS, P and annotation from: ['CHR', 'POS', 'P']
2026/02/07 19:12:56 -Loading Sumstats1 from gwaslab.Sumstats Object
2026/02/07 19:12:56 -Obtaining Sumstats2 CHR, POS, P and annotation from: ['CHR', 'POS', 'P']
2026/02/07 19:12:56 -Loading Sumstats2 from gwaslab.Sumstats Object
2026/02/07 19:12:59 -Sumstats P values are being converted to -log10(P)...
2026/02/07 19:13:02 -Sumstats P values are being converted to -log10(P)...
2026/02/07 19:13:04 -Merging sumstats using chr and pos...
2026/02/07 19:13:26 -Columns in merged sumstats: P_1,scaled_P_1,TCHR+POS,P_2,scaled_P_2,CHR,POS,_ADD,i
2026/02/07 19:13:26 Start to create Manhattan plot for sumstats1...
2026/02/07 19:13:26 Configured plot style for plot_mqq:m
2026/02/07 19:13:26 Starting Manhattan plot creation (Version v4.0.9)
2026/02/07 19:13:26 -Genomic coordinates are based on GRCh38/hg38...
2026/02/07 19:13:26 - Genomic coordinates version: 38 ...
2026/02/07 19:13:26 - Genome-wide significance level to plot is set to 1e-06 ...
2026/02/07 19:13:26 - Input sumstats contains 14838478 variants...
2026/02/07 19:13:26 - Manhattan plot layout mode selected: m
2026/02/07 19:13:26 -Highlight locis (#CB132D): 12:40340400:G:A
2026/02/07 19:13:26 -highlight_windowkb is set to: 500 kb
2026/02/07 19:13:26 -Pinpoint variants (red): 1:226737538:G:A
2026/02/07 19:13:29 Finished loading specified columns from the statistics
2026/02/07 19:13:29 Start data conversion and sanity check:
2026/02/07 19:13:29 -Sanity check will be skipped.
2026/02/07 19:13:30 -Sanity check after conversion: 354 variants with P value outside of (0,1] will be removed...
2026/02/07 19:13:30 -Sumstats P values are being converted to -log10(P)...
/home/duartej3/beegfs/JF/programs/miniconda3/envs/gwaslab/lib/python3.12/site-packages/gwaslab/viz/viz_aux_quickfix.py:59: SettingWithCopyWarning:
A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead
See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
insumstats["scaled_P"] = -np.log10(p_values)
2026/02/07 19:13:32 -Converting data above cut line...
2026/02/07 19:13:32 -Maximum -log10(P) value is 24.078833949362263 .
2026/02/07 19:13:32 -Minus log10(P) values above 10 will be shrunk with a shrinkage factor of 10...
2026/02/07 19:13:33 Finished data conversion and sanity check.
2026/02/07 19:13:33 Start to create Manhattan plot with 14838124 variants...
2026/02/07 19:13:35 -Creating background plot...
2026/02/07 19:14:05 -Highlighting target loci...
/home/duartej3/beegfs/JF/programs/miniconda3/envs/gwaslab/lib/python3.12/site-packages/gwaslab/viz/viz_plot_manhattan_mode.py:86: UserWarning: Ignoring `palette` because no `hue` variable has been assigned.
sns.scatterplot(
2026/02/07 19:14:07 Finished creating Manhattan plot successfully
2026/02/07 19:14:07 Start to extract variants for annotation...
2026/02/07 19:14:07 -Found 5 lead variants with a sliding window size of 500 kb (scaled threshold: 6.0)...
2026/02/07 19:14:07 -Genomic coordinates are based on GRCh38/hg38...
2026/02/07 19:14:07 Start to annotate variants with nearest gene name(s) ...(v4.0.9)
2026/02/07 19:14:07 -Genomic coordinates are based on GRCh38/hg38...
2026/02/07 19:14:07 -Assigning Gene name using ensembl_hg38_gtf for protein coding genes
2026/02/07 19:14:07 -Loading and indexing GTF file...
2026/02/07 19:14:18 -Processing variants by chromosome...
2026/02/07 19:14:18 -Processed 2 variants on chromosome 1
2026/02/07 19:14:18 -Processed 1 variants on chromosome 4
2026/02/07 19:14:18 -Processed 1 variants on chromosome 6
2026/02/07 19:14:18 -Processed 1 variants on chromosome 12
2026/02/07 19:14:18 -Time taken: 10.244s
2026/02/07 19:14:18 Finished annotating variants with nearest gene name(s) successfully!.
2026/02/07 19:14:18 Finished extracting variants for annotation...
2026/02/07 19:14:18 -Annotating using column GENENAME...
2026/02/07 19:14:18 -Adjusting text positions with repel_force=0.03...
2026/02/07 19:14:18 Finished creating plot successfully
2026/02/07 19:14:18 Finished creating Manhattan plot for sumstats1
2026/02/07 19:14:18 Start to create Manhattan plot for sumstats2...
2026/02/07 19:14:18 Configured plot style for plot_mqq:m
2026/02/07 19:14:18 Starting Manhattan plot creation (Version v4.0.9)
2026/02/07 19:14:18 -Genomic coordinates are based on GRCh38/hg38...
2026/02/07 19:14:18 - Genomic coordinates version: 38 ...
2026/02/07 19:14:18 - Genome-wide significance level to plot is set to 1e-06 ...
2026/02/07 19:14:18 - Input sumstats contains 14838478 variants...
2026/02/07 19:14:18 - Manhattan plot layout mode selected: m
2026/02/07 19:14:18 -Highlight locis (#CB132D): 12:122842051:G:T
2026/02/07 19:14:18 -highlight_windowkb is set to: 500 kb
2026/02/07 19:14:18 -Pinpoint variants (red): 4:89704960:G:A
2026/02/07 19:14:21 Finished loading specified columns from the statistics
2026/02/07 19:14:21 Start data conversion and sanity check:
2026/02/07 19:14:21 -Sanity check will be skipped.
2026/02/07 19:14:23 -Sumstats P values are being converted to -log10(P)...
2026/02/07 19:14:24 -Converting data above cut line...
2026/02/07 19:14:25 -Maximum -log10(P) value is 24.078833949362263 .
2026/02/07 19:14:25 -Minus log10(P) values above 10 will be shrunk with a shrinkage factor of 10...
2026/02/07 19:14:25 Finished data conversion and sanity check.
2026/02/07 19:14:25 Start to create Manhattan plot with 14838478 variants...
2026/02/07 19:14:27 -Creating background plot...
2026/02/07 19:14:58 -Highlighting target loci...
/home/duartej3/beegfs/JF/programs/miniconda3/envs/gwaslab/lib/python3.12/site-packages/gwaslab/viz/viz_plot_manhattan_mode.py:86: UserWarning: Ignoring `palette` because no `hue` variable has been assigned.
sns.scatterplot(
2026/02/07 19:15:00 Finished creating Manhattan plot successfully
2026/02/07 19:15:00 Start to extract variants for annotation...
2026/02/07 19:15:00 -Found 7 lead variants with a sliding window size of 500 kb (scaled threshold: 6.0)...
2026/02/07 19:15:00 -Genomic coordinates are based on GRCh38/hg38...
2026/02/07 19:15:00 Start to annotate variants with nearest gene name(s) ...(v4.0.9)
2026/02/07 19:15:00 -Genomic coordinates are based on GRCh38/hg38...
2026/02/07 19:15:00 -Assigning Gene name using ensembl_hg38_gtf for protein coding genes
2026/02/07 19:15:00 -Loading and indexing GTF file...
2026/02/07 19:15:09 -Processing variants by chromosome...
2026/02/07 19:15:09 -Processed 2 variants on chromosome 1
2026/02/07 19:15:09 -Processed 1 variants on chromosome 4
2026/02/07 19:15:09 -Processed 1 variants on chromosome 6
2026/02/07 19:15:09 -Processed 1 variants on chromosome 8
2026/02/07 19:15:09 -Processed 2 variants on chromosome 12
2026/02/07 19:15:09 -Time taken: 9.139s
2026/02/07 19:15:09 Finished annotating variants with nearest gene name(s) successfully!.
2026/02/07 19:15:09 Finished extracting variants for annotation...
2026/02/07 19:15:09 -Annotating using column GENENAME...
2026/02/07 19:15:09 -Adjusting text positions with repel_force=0.03...
2026/02/07 19:15:10 Finished creating plot successfully
2026/02/07 19:15:10 Finished creating Manhattan plot for sumstats2
2026/02/07 19:15:10 Start to save figure...
2026/02/07 19:16:54 -Saved to gwama_miami.png successfully! (png) (overwrite)
2026/02/07 19:16:54 Finished saving figure...
2026/02/07 19:16:54 Finished creating miami plot successfully
Hi Dr. Yunye,
The new updates for gwaslab are awesome!
However, I'm currently experiencing an issue highlighting and pinpointing specific variants when plotting the miami plots.
In the logs, it seems that the command is recognized, however, they are not showed in the final plot.
I would really appreciate some of your guidance.
Here is the script i'm using:
and here you can find the logs: