Closed bridgetrileygillis closed 1 year ago
Hi, yes you can do this by passing your peaks as an additional dataframe to the manhattan function. So for example, this can be done using the inbuilt CD_UKBB dataset as follows:
#start by annotating the variants with their nearest gene
CD_ANNOT <- CD_UKBB %>% annotate_with_nearest_gene()
#extract variants of interest from the dataset based on their nearest gene annotation.
genes <- CD_ANNOT %>% filter(Gene_Symbol %in% c("TTC33", "JAK2", "NOD2", "NKD1")
#Now create the plot with your input dataset and the extracted variants (genes) - display them in red and annotate peaks with p<1e-8
manhattan(list(CD_UKBB, genes), color=c("grey","red"), annotate=c(1e-100, 1e-8), legend_labels=c("Crohn's Disease", "Novel loci"), shades_alpha = 0.35)
This will result in a plot like this:
Is this what you were after?
Yes, thank you for the code and guidance!
Hello, Is it possible to color specified peaks (ex. novel loci) in a different color in topr manhattanplot? For example, I have 8 novel loci detected in a meta-analysis and would like to highlight those peaks, similar to this example (one highlight color is sufficient):
Additionally, can I specify to only label the nearest genes for the 8 novel loci, instead of all peaks p < 5e-08?