Description Usage Arguments Examples
Enter a pair of genomic locations representing a range for a given chromosome and this function will ensure that no position is less than 1 or greater than the relevant chromosome lengths. Anything below will be coerced to 1, and anything above to the chromosome length.
1 |
Pos |
must be numeric, length 2, e.g, c(20321,30123) |
Chr |
chromosome label |
snp.info |
optional object to take boundaries from, the maxima and minima for each chromosome within this object will take the place of the chromsome lengths / 1. |
build |
ucsc build, only need to enter if this differs from getOption("ucsc") |
dir |
directory to use for download of chromosome lengths (only if you wish to keep the chromosome length file) |
1 2 3 4 5 6 7 8 | pss <- ps <- c(345035,345035); ch <- 1
force.chr.pos(ps,ch)
pss[1] <- 0
force.chr.pos(pss,ch) # won't allow zero
pss[1] <- -1
force.chr.pos(pss,ch) # won't allow negative
pss[1] <- 645035012
force.chr.pos(pss,ch) # won't allow pos > chromosome length
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.