knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Using quasispectral

To download the library, first install the "devtools" package, which will allow you to install packages from github; this only needs to be done once:

install.packages("devtools")

Next, install the edgeR package. To to this, you will need to first install the "BiocManager" package, which allows you to access code from bioconductor:

if (!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install(version = "3.12")

Now you can get edgeR as follows:

BiocManager::install("edgeR")

When asked, allow R to compile and install the package. This will take a few minutes.

Next, install the fdrtools package, which computes qvalues:

`install.packages("fdrtool")'

Then install the quasispectral package from github:

devtools::install_github("mooredf22/quasispectral")

This will make the functions and data in the package available to you in R.

Next, load the libraries; the libraries QuasiSeq and fdrtool must have been previously installed from CRAN.

library(QuasiSeq)
library(fdrtool)
library(quasispectral)

The first few lines of the data may be examined:

head(spectralData_CLN1_late)

The first column is the gene name, the next 6 columns are spectral counts for mutant animals, and the final 6 columns are counts for wildtype animals.

Finally, call the package as follows, and look at the first few lines of output:

result.QLfit <- quasiSpectral(spectralDataAll=spectralData_CLN1_late, n.mut=6, n.wt=6)
QLfit.out <- result.QLfit$QLfit
head(QLfit.out)

The first columns give the gene names and spectral count data that were input into the quasispectral function. The column "coef.main" is the log2 ratio of the estimated mean for wild type animals compared to the estimated mean for mutant animals.

To see the estimated proportion of null samples in the population, from fdrtool, look at eta0:

result.QLfit$eta0     # estimated proportion of null samples in population


mooredf22/quasispectral documentation built on May 17, 2021, 1:20 a.m.