calc_new_pos | R Documentation |
Calculate the actual x-positions of each point used for
the manhattan plot. MPdata
object contains the unscaled positions
that has not been positioned according to the relative position and width
of each chromosome.
calc_new_pos(mpdata)
mpdata |
an |
This is used calculate the actual positions used for the
inside manhattan_plot
function. It was designed this way should the
scaling and relative positioning of each chromosome be changed (e.g. gap
between the )
a numeric
vector containing the scaled x-positions.
gwasdat <- data.frame(
"chromosome" = rep(1:5, each = 30),
"position" = c(replicate(5, sample(1:300, 30))),
"pvalue" = rbeta(150, 1, 1)^5
)
mpdata <- manhattan_data_preprocess(
gwasdat, pval.colname = "pvalue", chr.colname = "chromosome", pos.colname = "position",
chr.order = as.character(1:5)
)
calc_new_pos(mpdata)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.