Description Usage Arguments Value Author(s) Examples
View source: R/graphical_representations.R
Manhattan plot for p-values of a CNV-GWAS
1 | plotManhattan(all.paths, regions, chr.size.order, plot.pdf = FALSE)
|
all.paths |
Object returned from |
regions |
|
chr.size.order |
|
plot.pdf |
Logical plot a to pdf file |
Plots to graphics device.
Vinicius Henrique da Silva <vinicius.dasilva@wur.nl>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Load phenotype-CNV information
data.dir <- system.file("extdata", package="CNVRanger")
phen.loc <- file.path(data.dir, "Pheno.txt")
cnv.out.loc <- file.path(data.dir, "CNVOut.txt")
map.loc <- file.path(data.dir, "MapPenn.txt")
phen.info <- setupCnvGWAS('Example', phen.loc, cnv.out.loc, map.loc)
all.paths <- phen.info$all.paths
segs.pvalue.gr <- cnvGWAS(phen.info)
# Define the chromosome order in the plot
order.chrs <- c(1:24, "25LG1", "25LG2", 27:28, "LGE22", "1A", "4A")
# Chromosome sizes
chr.size.file <- file.path(data.dir, "Parus_major_chr_sizes.txt")
chr.sizes <- scan(chr.size.file)
chr.size.order <- data.frame(chr=order.chrs, sizes=chr.sizes, stringsAsFactors=FALSE)
# Plot Manhatthan to a pdf within the 'Results' workfolder
plotManhattan(all.paths, segs.pvalue.gr, chr.size.order)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.