A function to generate code that can be run to perform differential expression analysis of RNAseq data (comparing two conditions) using the TCC package. The code is written to a .Rmd file. This function is generally not called by the user, the main interface for performing differential expression analysis is the runDiffExp function.

TCC.createRmd(
  data.path,
  result.path,
  codefile,
  norm.method,
  test.method,
  iteration = 3,
  normFDR = 0.1,
  floorPDEG = 0.05
)

Arguments

data.path

The path to a .rds file containing the compData object that will be used for the differential expression analysis.

result.path

The path to the file where the result object will be saved.

codefile

The path to the file where the code will be written.

norm.method

The between-sample normalization method used to compensate for varying library sizes and composition in the differential expression analysis. Possible values are "tmm", and "deseq".

test.method

The method used in TCC to find differentially expressed genes. Possible values are "edger", "deseq" and "bayseq".

iteration

The number of iterations used to find the normalization factors. Default value is 3.

normFDR

The FDR cutoff for calling differentially expressed genes in the computation of the normalization factors. Default value is 0.1.

floorPDEG

The minimum value to be eliminated as potential differentially expressed genes before performing step 3 in the TCC algorithm. Default value is 0.05.

Details

For more information about the methods and the interpretation of the parameters, see the TCC package and the corresponding publications.

References

Kadota K, Nishiyama T, and Shimizu K. A normalization strategy for comparing tag count data. Algorithms Mol Biol. 7:5, 2012.

Sun J, Nishiyama T, Shimizu K, and Kadota K. TCC: an R package for comparing tag count data with robust normalization strategies. BMC Bioinformatics 14:219, 2013.

Author

Charlotte Soneson

Examples

try(
if (require(TCC)) {
tmpdir <- normalizePath(tempdir(), winslash = "/")
mydata.obj <- generateSyntheticData(dataset = "mydata", n.vars = 1000,
                                    samples.per.cond = 5, n.diffexp = 100,
                                    output.file = file.path(tmpdir, "mydata.rds"))
runDiffExp(data.file = file.path(tmpdir, "mydata.rds"), result.extent = "TCC",
           Rmdfunction = "TCC.createRmd",
           output.directory = tmpdir, norm.method = "tmm",
           test.method = "edger")
})
#> Loading required package: TCC
#> Loading required package: ROC
#> 
#> Attaching package: ‘TCC’
#> The following object is masked from ‘package:edgeR’:
#> 
#>     calcNormFactors
#> 
#> 
#> processing file: /private/var/folders/xz/lz5thm6s3vb1vdkk77vmkgbr0000gn/T/RtmpDwlx4a/tempcode21d0205b699f.Rmd
#> 1/2                  
#> 2/2 [unnamed-chunk-1]
#> output file: /private/var/folders/xz/lz5thm6s3vb1vdkk77vmkgbr0000gn/T/RtmpDwlx4a/tempcode21d0205b699f.md
#> [1] TRUE