Learn R Programming

GCAI.bias (version 1.0)

correct.guided: Guided Correction

Description

Guided by the coefficients estimated from lm.estimate, the bias correction could be performed.

Usage

correct.guided(coe.train, obj.test)

Arguments

coe.train
a 1-column matrix of coefficients estimated from training data by lm.estimate
obj.test
an object of testing dataset generated from counts.preprocess and index.preprocess

Value

a matrix will be returned containing reads counts before and after correction and $\beta\mathit{x}$ as well.

Details

Besides of corrected reads, $\beta\mathit{x}$ will be also calculated.

References

Cai G, RNA-SEQUENCING APPLICATIONS: GENE EXPRESSION QUANTIFICATION AND METHYLATOR PHENOTYPE IDENTIFICATION, Ph.D. Thesis, 2013

See Also

lm.estimate, counts.preprocess, index.preprocess

Examples

Run this code
word<-81

data(obj.index)
data(train.dat.seq)
data(train.dat.counts)
data(test.dat.seq)
data(test.dat.counts)

#train

train.index<-index.preprocess(train.dat.seq,word)
obj.train<-counts.preprocess(train.dat.counts)
obj.train[["index"]]<-train.index

coe.lm<-lm.estimate(obj.train,fit.cut.train=5)

#test

test.index<-index.preprocess(test.dat.seq,word)
obj.test<-counts.preprocess(test.dat.counts)
obj.test[["index"]]<-test.index

test.corrected<-correct.guided(coe.lm,obj.test)

Run the code above in your browser using DataLab