You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From Jasmin Divers via email:
I have a quick question or you. Under section 3.2 of the vignette where you talk about annotations. The example you provided works well for a single SNP, but what if I wanted to annotate all the SNPs that reached a specific significant level. Passing a list of SNPs to your call to the magrittr package returns nothing – not even an error message. In my case, the xc and yc vectors contain 10 elements, instead of tfe x- and y-axis of the SNP with the smallest p-value.
The text was updated successfully, but these errors were encountered:
Thanks for your interest in this packages.
Here is a working example of how to add multiple annotations, although the result is not aesthetically pleasing since there is alot of overlap between the top hits in the data provided by the package:
pacman::p_load(manhattanly)
pacman::p_load(magrittr)
p<- manhattanly(HapMap, snp="SNP", gene="GENE",
annotation1="DISTANCE", annotation2="EFFECTSIZE",
highlight=significantSNP)
# get the x and y coordinates from the pre-processed dataplotData<- manhattanr(HapMap, snp="SNP", gene="GENE")[["data"]]
# annotate the smallest 10 p-valuesannotate<-plotData[order(plotData$P),][1:10,]
# x and y coordinates of SNPs with smallest p-valuesxc<-annotate$posyc<-annotate$logpp %>%
add_annotations(x=xc,
y=yc,
text= paste0(annotate$SNP,"<br>","GENE: ",annotate$GENE),
xref="x",
yref="y",
showarrow=TRUE,
arrowhead=4,
arrowsize=.5,
ax=20,
ay=-40)
From Jasmin Divers via email:
I have a quick question or you. Under section 3.2 of the vignette where you talk about annotations. The example you provided works well for a single SNP, but what if I wanted to annotate all the SNPs that reached a specific significant level. Passing a list of SNPs to your call to the magrittr package returns nothing – not even an error message. In my case, the xc and yc vectors contain 10 elements, instead of tfe x- and y-axis of the SNP with the smallest p-value.
The text was updated successfully, but these errors were encountered: