Skip to content

Conversation

@igumnov-daniel
Copy link

Hi!
Here I've added an option to also annotate SNVs provided with "highlight_other_SNPs_indcs" argument.

So if one wants to compare to GWAS results via Manhattanplot or just they just have genes of interest they want to highlight then there is an example below:

# let's consider that processing and creation of a list with SNVs indices is above
# so we have 2 different GWAS experiments and a set of target SNVs

fig, axs = plt.subplots(2, 1, figsize=(10, 8))

manhattanplot(
    data = GWAS_1,
    chrom = 'CHROM',
    pos = 'GENPOS',
    pv = 'pval',
    snp = 'Gene',
    suggestiveline=1e-6,
    genomewideline=1e-8,
    highlight_other_SNPs_indcs=SNVs_to_annotate,
    highlight_other_SNPs_color='magenta',
    ax=axs[0],
    annotate_highlighted_SNPs=True # NEW ARGUMENT
)

manhattanplot(
    data = GWAS_2,
    chrom = 'CHROM',
    pos = 'GENPOS',
    pv = 'pval',
    snp = 'Gene',
    suggestiveline=1e-6,
    genomewideline=1e-8,
    highlight_other_SNPs_indcs=SNVs_to_annotate,
    highlight_other_SNPs_color='magenta',
    annotate_highlighted_SNPs=True, # NEW ARGUMENT
    ax=axs[1]
)

plt.show()

Resultant picture:

изображение

@YuandanZhang
Copy link

just check if the additional annotation options has updated in the current release of qmp.lot?

@igumnov-daniel
Copy link
Author

@YuandanZhang
Dunno, I've switched to https://github.com/Cloufield/gwaslab last winter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants