computeGC-methods {ArrayTV} | R Documentation

## Compute the GC composition for selected windows

### 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

        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)
    }

[Package ArrayTV version 1.25.0 Index]