Ridges {SigWinR}R Documentation

Calculate Ridges

Description

Use SigWin to calculate rigdges given a certain set of window sizes.

Usage

Ridges(s, window.size, pos=NULL,pval = 0.05, antiRidge = FALSE, adjust.method = "BH", min.sup = length(window.size),resolution=400)

Arguments

s input sequence
window.size vector of window sizes (only odd windowsizes are considered)
pos position of samples in input sequence
pval p-value
antiRidge Look for anti ridges
adjust.method Multiple testing adjustment
min.sup The minimum number of window.sizes which have to find a ridge for a certain point to consider it a ridge
resolution Resolution of the ridge calculation (for localized SigWin only)

Value

A data frame is returned containing a row for each found ridge and the start and end positions in the columns

Author(s)

w.c.deLeeuw@uva.nl

See Also

SigWin,Ridgeogram

Examples

        lseq <- c(rnorm(200),rnorm(100,-1),rnorm(50),rnorm(50,4.0),rnorm(100))
        ridgelist <- list(Ridges(lseq,seq(45,65,by=2)),Ridges(lseq,seq(45,65,by=2),antiRidge=TRUE))
        RidgePlot(ridgelist,lseq,labels=c("ridges","anti-ridges"),col=c("#88FF88","#FF8888"))

        lseq <- c(rnorm(100),rnorm(100,3),rnorm(300),rnorm(100,-3),rnorm(200),rnorm(50,4.0),rnorm(100))
        rg <- Ridgeogram(lseq)
        #find 5 window sizes in which lowest p-value occur
        win.neg <- 1+2*order(apply(log(rg$low),2,min))[1:5]
        win.pos <- 1+2*order(apply(log(rg$high),2,min))[1:5]
        rp <- Ridges(lseq,win.pos,pval=0.01)
        rn <- Ridges(lseq,win.neg,antiRidge=TRUE,pval=0.01);
        RidgePlot(list(rp,rn),lseq,ptitle="Most significant ridges",
                labels=c("ridges","anti-ridges"),col=c("#CCFFCC","#FFCCCC"))


[Package SigWinR version 1.0 Index]