COTANObjectCreation: 'COTAN' shortcuts

COTANObjectCreationR Documentation

COTAN shortcuts

Description

These functions create a COTAN object and/or also run all the necessary steps until the genes' COEX matrix is calculated.

Usage

COTAN(raw = "ANY")

## S4 method for signature 'COTAN'
proceedToCoex(
  objCOTAN,
  calcCoex = TRUE,
  optimizeForSpeed = TRUE,
  deviceStr = "cuda",
  cores = 1L,
  saveObj = TRUE,
  outDir = "."
)

automaticCOTANObjectCreation(
  raw,
  GEO,
  sequencingMethod,
  sampleCondition,
  calcCoex = TRUE,
  optimizeForSpeed = TRUE,
  deviceStr = "cuda",
  cores = 1L,
  saveObj = TRUE,
  outDir = "."
)

Arguments

raw

a matrix or dataframe with the raw counts

objCOTAN

a newly created COTAN object

calcCoex

a Boolean to determine whether to calculate the genes' COEX or stop just before at the estimateDispersionBisection() step

optimizeForSpeed

Boolean; when TRUE COTAN tries to use the torch library to run the matrix calculations. Otherwise, or when the library is not available will run the slower legacy code

deviceStr

On the torch library enforces which device to use to run the calculations. Possible values are "cpu" to us the system CPU, "cuda" to use the system GPUs or something like "cuda:0" to restrict to a specific device

cores

number of cores to use. Default is 1.

saveObj

Boolean flag; when TRUE saves intermediate analyses and plots to file

outDir

an existing directory for the analysis output.

GEO

a code reporting the GEO identification or other specific dataset code

sequencingMethod

a string reporting the method used for the sequencing

sampleCondition

a string reporting the specific sample condition or time point.

Details

Constructor of the class COTAN

proceedToCoex() takes a newly created COTAN object (or the result of a call to dropGenesCells()) and runs calculateCoex()

automaticCOTANObjectCreation() takes a raw dataset, creates and initializes a COTAN object and runs proceedToCoex()

Value

a COTAN object

proceedToCoex() returns the updated COTAN object with genes' COEX calculated. If asked to, it will also store the object, along all relevant clean-plots, in the output directory.

automaticCOTANObjectCreation() returns the new COTAN object with genes' COEX calculated. When asked, it will also store the object, along all relevant clean-plots, in the output directory.

Examples

data("test.dataset")
obj <- COTAN(raw = test.dataset)


## In case one needs to run more steps to clean the datatset the following
## might apply
##
## objCOTAN <- initializeMetaDataset(objCOTAN,
##                                   GEO = "test",
##                                   sequencingMethod = "artificial",
##                                   sampleCondition = "test dataset")
## # in case the genes' `COEX` is not needed it can be skipped
## # (e.g. for [cellsUniformClustering()])
## objCOTAN <- proceedToCoex(objCOTAN, calcCoex = FALSE,
##                           cores = 6L, optimizeForSpeed = TRUE,
##                           deviceStr = "cuda", saveObj = FALSE)


## Otherwise it is possible to run all at once.
objCOTAN <- automaticCOTANObjectCreation(
  raw = test.dataset,
  GEO = "code",
  sequencingMethod = "10X",
  sampleCondition = "mouse_dataset",
  calcCoex = TRUE,
  saveObj = FALSE,
  outDir = tempdir(),
  cores = 6L)


seriph78/COTAN documentation built on May 2, 2024, 11:17 a.m.