qt.plot {CNVtools} | R Documentation

## Makes signal vs trait plots and posterior probabilty distributions

### Description

Makes signal vs trait and formatted density plots from the data frame returned by CNVtest.qt

### Usage

    qt.plot(DataFrame.list, main='', hist.or.dens='histogram')

### Arguments

`DataFrame.list` | The output obtained from the CNVtools fitting algorithm CNVtest.qt
`main` | Potential title for the graph
`hist.or.dens` | Either 'histogram' or 'density' to plot the data as an histogram or using a kernel density estimator

### Author(s)

Vincent Plagnol vincent.plagnol@cimr.cam.ac.uk and Chris Barnes christopher.barnes@imperial.ac.uk

### Examples

    	#Load data for CNV for two control cohorts
    	data(A112)
    	raw.signal <- as.matrix(A112[, -c(1,2)])
    	dimnames(raw.signal)[[1]] <- A112$subject

    	#Extract CNV signal using principal components
    	pca.signal <- apply.pca(raw.signal)

    	#Extract batch, sample
    	sample <- factor(A112$subject)
    	batches <- rep("ALL",length(sample))

    	#Create a fake quantitative trait
    	trait <- rnorm(length(sample),mean=9.0,sd=1.0)

    	#Fit the CNV with a three component model
    	fit.pca <- CNVtest.qt(signal = pca.signal, sample = sample, batch = batches,
    		   	      qt = trait, ncomp = 3, n.H0=3, n.H1=3,
    			      model.qt = "~ cn")

    	qt.plot(fit.pca)

[Package CNVtools version 1.76.0 Index]