R/exportAsGRanges.R

#####GRanges#####
exportAsGRanges <- function (x, y, correction=TRUE)
{
	if (class(x)!="motiv")
	{
		stop("x must be an object of class motiv.")
	}
	vector.pos <- calculatePositionVector(x, y, group=F, correction=correction)
	curr <- which(names(y)%in%names(x))
	
	data <- GRanges()
	
	p=1
	for (i in curr)
	{
		data <- c(data, granges(vector.pos[[p]]@positionVector))	
		p=p+1
	}	
	return(data)
}

Try the MotIV package in your browser

Any scripts or data that you put into this service are public.

MotIV documentation built on April 28, 2020, 6:51 p.m.