dvitale199 / GenoTools

GenoTools: Advanced Genotype Data Analysis A robust suite for processing genotype data, offering genotype calling (.idat to PLINK), comprehensive sample/variant QC, and ancestry estimation. Ideal for computational biology and genetics research.
Apache License 2.0
21 stars 7 forks source link

Manhattan Plot #7

Open dvitale199 opened 2 years ago

dvitale199 commented 2 years ago

Is your feature request related to a problem? Please describe. Need plotting method for summary statistics

Describe the solution you'd like A clean, interactive manhattan plot implemented in plotly. zooming, snp selection would be great!

Describe alternatives you've considered None

Additional context None

dvitale199 commented 8 months ago

create function from the following:

import gwaslab as gl

# read sumstat (you may need to read the gwas data in to a pandas dataframe first!)
EUR_sumstat = gl.Sumstats(
    "gwas_results/logistic.hybrid",
    snpid="ID",
    chrom="#CHROM",
    pos="POS",
    p="P",
    build="38"
)

#get lead variants
EUR_sumstat.get_lead(anno=True, build = "38", windowsizekb=500, sig_level=5e-8)

# annotate the lead variants
annot = ['chr1:5670117', 'chr2:97393816', 'chr16:46387290', 'chr19:44918903']

# manhattan plot
EUR_sumstat.plot_mqq(
    sig_level=5e-8,
    cut=15,
    anno="GENENAME",
    anno_set=annot,
    highlight=annot,
    highlight_windowkb=250,
    title="EUR CC",
    build="38",
    save="EUR_sumstat_gwaslab.manhattan.png"
)