SaveWithinSubjCovMatrices: Save the ilr-transformed within subject covariance matricies...

View source: R/utility_functions.R

SaveWithinSubjCovMatricesR Documentation

Save the ilr-transformed within subject covariance matricies needed for a CompDTUme analysis

Description

Save the ilr-transformed within subject covariance matricies needed for a CompDTUme analysis

Usage

SaveWithinSubjCovMatrices(
  directory,
  save_dir,
  GibbsSamps,
  curr_part_num,
  nsamp,
  CLE = TRUE,
  CLEParam = 0.05
)

Arguments

directory

is the directory where previous datasets are saved by sumToGene and DRIMSeqFilter

save_dir

is the outer directory to save the full inferential replicate datasets in. Datasets can get quite large with a large number of samples or small number of parts so choose a directory with plenty of free space. Specified directory should be the same in SaveFullinfRepDat, SaveWithinSubjCovMatrices, and SaveGeneLevelFiles.

GibbsSamps

is TRUE if the inferential replicates are Gibbs samples and FALSE if the replicates are bootstrap samples

curr_part_num

is the current part number that is being run. The genelist specified in filteredgenenames is split into nparts equally sized chunks. See the example in (3)SaveNecessaryDatasetsForCompDTUReg.R within the package's SampleCode folder

nsamp

is the number of biological samples/replicates used in the analysis

CLE

is TRUE if the CorrectLowExpression procedure is to be used to correct low expression and FALSE if not. Should be the same value in both SaveWithinSubjCovMatrices and SaveGeneLevelFiles.

CLEParam

is the parameter (betwen 0 and 1) that controls the correction threshold (see details of CorrectLowExpression for more information)

Details

This function is used to save the necessary within subject covariance matrices. See the file (3)SaveNecessaryDatasetsForCompDTUReg.R in the package's SampleCode folder for example code.

Value

This function will save the sample-specific mean and covariance values across all inferential replicates on the ilr scale for all genes within the current part number curr_part_num. These files will be saved within the subdirectory "ilrMeansCovs/" in the save_dir folder and will be used by SaveGeneLevelFiles if present.


skvanburen/CompDTUReg documentation built on Jan. 23, 2025, 9:01 a.m.