Learn R Programming

SCENIC (version 1.1.2-01)

ScenicOptions-class: Object to store SCENIC settings

Description

This class contains the options/settings for a run of SCENIC. Most SCENIC functions use this object as input instead of traditional arguments that need to be set individually.

The object has three main slots:

  • @inputDatasetInfo: Contains the information about the dataset to analyze: dataset name ("datasetTitle", only for user information), organism ("org", determines the motif databases to use), and the files containing cell phenotype information ("cellInfo", "colVars", for plots. optional).

    An overview of this slot can be obtained with getDatasetInfo(scenicOptions).

  • @fileNames: Contains the file names where the results are saved ($output: most relevant results, $int: intermediate files).

    Output file names can be obtained with getOutName(scenicOptions). To load an intermediate file: getIntName(scenicOptions) and regulons <- loadInt(scenicOptions, "aucell_regulons").

  • @settings: Arguments for specific functions/steps:

    - General arguments ("verbose", "nCores"), and "seed" for AUCell rankings and t-SNEs.

    - runSCENIC_1_coexNetwork2modules(): "modules/weightThreshold" for the co-expression modules.

    - runSCENIC_2_createRegulons(): RcisTarget databases ("dbs", "db" , "dbDir"). These are used in runSCENIC_2_createRegulons(), but the input expression matrix and GENIE3/GRNBoost regulators should be consistent.

    - runSCENIC_3_scoreCells(): "aucell/smallestPopPercent" for AUCell automatic thresholds.

    - t-SNEs: "defaultTsne/perpl", "defaultTsne/dims", "defaultTsne/aucType", "tSNE_filePrefix" (and "seed").

    The overview of this slot can be obtained with getSettings(scenicOptions).

In the current version there are not specific functions for setting a value. Follow the guidelines in the specific function if you need to modify a specific parameter.

Usage

# S4 method for ScenicOptions
show(object)

getDatasetInfo(object, ...)

# S4 method for ScenicOptions getDatasetInfo(object, slotName = NULL)

getDatabases(object, ...)

# S4 method for ScenicOptions getDatabases(object)

getSettings(object, ...)

# S4 method for ScenicOptions getSettings(object, slotName = NULL)

getOutName(object, ...)

# S4 method for ScenicOptions getOutName(object, out_type = NULL)

getIntName(object, ...)

# S4 method for ScenicOptions getIntName(object, int_type = NULL)

loadFile(object, ...)

# S4 method for ScenicOptions loadFile(object, fileName, verbose = FALSE, ifNotExists = c("error", "null"), ...)

loadInt(object, ...)

# S4 method for ScenicOptions loadInt(object, int_type = NULL, ...)

initializeScenic(org = NULL, dbDir = "databases", dbs = NULL, datasetTitle = "", nCores = 4)

dbVersion(dbs)

dbLoadingAttempt(dbFilePath)

Arguments

Value

  • initializeScenic(): Creates the object. It also creates the folders where the results will be saved: 'int' and 'output'.

  • show(): Prints a summary of the object

  • loadInt(): Loads the selected "intermediate" file (normally from folder 'int/'). getIntName(scenicOptions) lists all possibilities (rownames: object name, fileName: file that will be loaded).

  • getDatasetInfo(), getOutName(): Shows the content of the corresponding slots.

Examples

Run this code
# NOT RUN {
# Create object:
data(defaultDbNames)
scenicOptions <- initializeScenic(org="hgnc", datasetTitle="My dataset", 
dbDir="databases", dbs=defaultDbNames[["hgnc"]], nCores=4)

### Accessor functions
# Get output file names:
getOutName(scenicOptions)  # Shows all
getOutName(scenicOptions, "s2_motifEnrichmentHtml") 

# Load intermediate files: 
getIntName(scenicOptions) # Shows all (use the rowname to subset)
regulons <- loadInt(scenicOptions, "aucell_regulons") # load the file

# other:
getDatasetInfo(scenicOptions)
getDatasetInfo(scenicOptions, "datasetTitle")
scenicOptions@inputDatasetInfo$datasetTitle <- "new title" # to assign new value
getSettings(scenicOptions, "defaultTsne/dims")  

tsneFileName(scenicOptions)
getDatabases(scenicOptions) 
dbVersion(getDatabases(scenicOptions))
# }

Run the code above in your browser using DataLab