xyplot {crlmm} | R Documentation

## Plot prediction regions and normalized intensities.

### Description

Plot prediction regions for integer copy number and normalized intensities.

### Usage

    xyplot(x, data, ...)

### Arguments

`x` | A `formula`.
`data` | A `CNSet` object.
`...` | Additional arguments passed to `xyplot` function in lattice.

### Value

A `trellis` object.

### Author(s)

R. Scharpf

### See Also

`xyplot`, `ABpanel`

### Examples

    library(oligoClasses)
    data(cnSetExample2)
    table(batch(cnSetExample2))
    sample.index <- which(batch(cnSetExample2) == "CUPID")
    ## A single SNP
    pr <- predictionRegion(cnSetExample2[1:4, sample.index], copyNumber=0:4)
    gt <- calls(cnSetExample2[1:4, sample.index])
    lim <- c(6,13)
    xyplot(B~A|snpid, data=cnSetExample2[1:4, sample.index],
           predictRegion=pr,
           panel=ABpanel,
           pch=21,
           fill=c("red", "blue", "green3")[gt],
           xlim=lim, ylim=lim)

    ## multiple SNPs, prediction regions for 3 batches
    ## Not run:
    	tab <- table(batch(cnSetExample2))
    	bns <- names(tab)[tab > 50]
    	sample.index <- which(batch(cnSetExample2)
    	pr <- predictionRegion(cnSetExample2[1:10, sample.index], copyNumber=0:4)
    	gt <- as.integer(calls(cnSetExample2[1:10, sample.index]))
    	xyplot(B~A|snpid, data=cnSetExample2[1:10, sample.index],
    	       predictRegion=pr,
    	       panel=ABpanel,
    	       pch=21,
    	       fill=c("red", "blue", "green3")[gt],
    	       xlim=c(6,12), ylim=c(6,12))

    	## nonpolymorphic markers
    	data(cnSetExample2)
    	tab <- table(batch(cnSetExample2))
    	bns <- names(tab)[tab > 50]
    	sample.index <- which(batch(cnSetExample2)
    	np.index <- which(!isSnp(cnSetExample2))[1:10]
    	taus <- tau2(cnSetExample)[np.index, , , ]
    	pr <- predictionRegion(cnSetExample2[np.index, sample.index],
    			       copyNumber=0:4)
    	pp <- posteriorProbability(cnSetExample2[np.index, sample.index],
    				   predictRegion=pr,
    				   copyNumber=0:4)

    ## End(Not run)

[Package crlmm version 1.40.0 Index]