methods-computeGC: Compute the GC composition for selected windows

Description Methods See Also Examples

Description

Compute the GC composition for selected windows around a vector of genomic positions (e.g., locations of markers on an array)

Methods

computeGC(x, maxwins, increms, chr, build, ...):

x can be numeric, in which case x should be a vector of physical position along the genome. Alternatively, x can be an instance of the BafLrrSetList class. When x is numeric, arguments chr and build are required. Arguments chr and build are ignored for BafLrrSetList objects.

Arguments maxwins, increms, build, and chr are as described in the documentation for gcCorrectMain

See Also

BafLrrSetList, gcCorrectMain

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
    if(require(crlmm) && require(ff) && require(doParallel)){
	## nodes may be set to the number of cpus available
        nodes<-3
        cl <- makeCluster(nodes)
        registerDoParallel(cl)

	data(cnSetExample, package="crlmm")
	brList <- BafLrrSetList(cnSetExample)
	pos <- unlist(position(brList))
	chr <- paste("chr",
		     rep(chromosome(brList), elementNROWS(brList)),
		     sep="")
	gc.matrix1 <- ArrayTV:::computeGC(x=pos, maxwins=c(12,10e3),
           				  increms=c(12,10e3),
		         		  chr=chr,
				          build="hg19")
	gc.matrix2 <- ArrayTV:::computeGC(brList, c(12, 10e3),
         			          c(12, 10e3))
        identical(gc.matrix1, gc.matrix2)
        stopCluster(cl)
}

ArrayTV documentation built on April 28, 2020, 9:02 p.m.