Closed hlnicholls closed 8 months ago
Hi, try putting your manhattan call within the plot() function. This works with the test data:
phenotypes <- c("CD_UKBB", "CD_FINNGEN")
for (phenotype in phenotypes){
png_filename <- paste0( phenotype, "_annotated.png")
png(png_filename, width = 3000, height = 1800, res = 300)
plot(topr::manhattan(get(phenotype), annotate = 5e-9, title=phenotype))
dev.off()
}
This has worked, thank you!
Hi, thank you for developing this package, it's been very helpful and intuitive.
I've got multiple GWAS' that I've tried to make manhattan plots for in a for loop. The for loop runs without error but doesn't actually produce/save any plots. If I take my code out of the for loop and run each phenotype individually that works fine.
Is there something wrong with my for loop for using topr? Here is my code:
The above runs without error but doesn't save any plots. When I try taking the same code out of the for loop my plot saves to a png file as expected: