Description Usage Arguments Details Value Author(s) References See Also Examples
Creates a GFF formatted file with information about enriched regions.
1 2 3 |
regions |
A matrix indicating enriched regions (see |
post |
A vector with posterior probabilities for each probe. |
probe.pos |
A |
file |
Name of GFF file to create. |
score.fun |
Function used to calculate score of enriched regions. |
source |
Entry for ‘source’ field of GFF file. |
feature.type |
Entry for ‘feature’ field of GFF file. |
class |
Class of documented feature. This is used in the ‘attribute’ field together with |
name |
Name of documented feature. This is used in the ‘attribute’ field together with |
post
should provide scores for each probe. These scores are then summarised for each region by applying
score.fun
to the probe scores in each region. The default for score.fun
is mean
but
any function that accapts a single numeric vector as its argument and returns a scalar can be used.
A GFF formated data.frame
is returned invisibly. Usually this function is called for
its side effect.
Peter Humburg
GFF specification: http://www.sanger.ac.uk/Software/formats/GFF/GFF_Spec.shtml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ## create two state HMM with t distributions
state.names <- c("one","two")
transition <- c(0.1, 0.2)
location <- c(1, 2)
scale <- c(1, 1)
df <- c(4, 6)
model <- getHMM(list(a=transition, mu=location, sigma=scale, nu=df),
state.names)
## obtain observation sequence from model
obs <- sampleSeq(model, 100)
## make up some genomic probe coordinates
pos <- data.frame(chromosome = rep("chr1", times = 100),
position = seq(1, 4000, length = 100))
## compute most likely state sequence for obs
vit.res <- viterbi(model, obs)
## find regions attributed to state "one"
reg.pos <- region.position(vit.res$stateSeq, region="one")
## calculate posterior probability for state "one"
post <- posterior(obs, model, log=FALSE)[1,]
## create gff annotations
gff <- reg2gff(reg.pos, post, pos)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.