This function calculates normalization factors using a specified multistep normalization method from a TCCclass object. The procedure can generally be described as the STEP1(STEP2STEP3)n pipeline.
1 2 3 4 
tcc 
TCCclass object. 
norm.method 
character specifying a normalization method used in
both the STEP1 and STEP3. Possible values are

test.method 
character specifying a method for identifying
differentially expressed genes (DEGs) used in STEP2:
one of 
iteration 
logical or numeric value specifying the number of
iteration (n) in the proposed normalization pipeline: the
STEP1(STEP2STEP3)n pipeline.
If 
FDR 
numeric value (between 0 and 1) specifying the threshold for determining potential DEGs after STEP2. 
floorPDEG 
numeric value (between 0 and 1) specifying the minimum value to be eliminated as potential DEGs before performing STEP3. 
increment 
logical value. if 
... 
arguments to identify potential DEGs at STEP2. See the
"Arguments" field in 
The calcNormFactors
function is the main function in the
TCC package.
Since this pipeline employs the DEG identification method at STEP2,
our multistep strategy can eliminate the negative effect of potential DEGs
before the second normalization at STEP3.
To fully utilize the DEG elimination strategy (DEGES), we strongly recommend
not to use iteration = 0
or iteration = FALSE
.
This function internally calls functions implemented in other R packages
according to the specified value.
norm.method = "tmm"
The calcNormFactors
function implemented
in edgeR is used for obtaining the TMM normalization factors
at both STEP1 and STEP3.
norm.method = "deseq2"
The estimateSizeFactors
function
implemented in DESeq2 is used for obetaining the size factors
at both STEP1 and STEP3.
The size factors are internally converted to normalization factors
that are comparable to the TMM normalization factors.
norm.method = "deseq"
The estimateSizeFactors
function
implemented in DESeq is used for obetaining the size factors
at both STEP1 and STEP3.
The size factors are internally converted to normalization factors
that are comparable to the TMM normalization factors.
After performing the calcNormFactors
function,
the calculated normalization factors are populated in the
norm.factors
field (i.e., tcc$norm.factors
).
Parameters used for DEGES normalization (e.g., potential DEGs
identified in STEP2, execution times for the identification, etc.)
are stored in the DEGES field (i.e., tcc$DEGES
) as follows:
iteration 
the iteration number n for the STEP1  (STEP2  STEP3)_{n} pipeline. 
pipeline 
the DEGES normalization pipeline. 
threshold 
it stores
(i) the type of threshold ( 
potDEG 
numeric binary vector (0 for nonDEG or 1 for DEG)
after the evaluation of the percentage of DEGs identified in
STEP2 with the predefined 
prePotDEG 
numeric binary vector
(0 for nonDEG or 1 for DEG) before the evaluation of the percentage
of DEGs identified in STEP2 with the predefined

execution.time 
computation time required for normalization. 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22  data(hypoData)
group < c(1, 1, 1, 2, 2, 2)
# Calculating normalization factors using the DEGES/edgeR method
# (the TMMedgeRTMM pipeline).
tcc < new("TCC", hypoData, group)
tcc < calcNormFactors(tcc, norm.method = "tmm", test.method = "edger",
iteration = 1, FDR = 0.1, floorPDEG = 0.05)
tcc$norm.factors
# Calculating normalization factors using the iterative DEGES/edgeR method
# (iDEGES/edgeR) with n = 3.
tcc < new("TCC", hypoData, group)
tcc < calcNormFactors(tcc, norm.method = "tmm", test.method = "edger",
iteration = 3, FDR = 0.1, floorPDEG = 0.05)
tcc$norm.factors
# Calculating normalization factors for simulation data without replicates.
tcc < simulateReadCounts(replicates = c(1, 1))
tcc < calcNormFactors(tcc, norm.method = "deseq", test.method = "deseq",
iteration = 1, FDR = 0.1, floorPDEG = 0.05)
tcc$norm.factors

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.