Skip to content

Instantly share code, notes, and snippets.

@monogenea
Created October 7, 2019 18:52
Show Gist options
  • Save monogenea/2c28f1a9915bc02c5abe2a37a1398636 to your computer and use it in GitHub Desktop.
Save monogenea/2c28f1a9915bc02c5abe2a37a1398636 to your computer and use it in GitHub Desktop.
# Manhattan plot
GWASout <- read.table(paste(target, ".txt", sep = ""), header = T, colClasses = c("character", rep("numeric",4)))
GWASout$type <- rep("typed", nrow(GWASout))
GWASout$Neg_logP <- -log10(GWASout$p.value)
GWASout <- merge(GWASout, genData$MAP[,c("SNP", "chr", "position")])
GWASout <- GWASout[order(GWASout$Neg_logP, decreasing = T),]
png(paste(target, ".png", sep = ""), height = 500,width = 1000)
GWAS_Manhattan(GWASout)
dev.off()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment