SignatureAnalyzerOneRun: Source SignatureAnalyzer and run it once on a single data set...

View source: R/SignatureAnalyzerInteraction.R

SignatureAnalyzerOneRunR Documentation

Source SignatureAnalyzer and run it once on a single data set and put results in specified location.

Description

Source SignatureAnalyzer and run it once on a single data set and put results in specified location.

Usage

SignatureAnalyzerOneRun(
  signatureanalyzer.code.dir,
  input.catalog,
  out.dir,
  seedNumber = NULL,
  input.exposures = NULL,
  maxK = 30,
  tol = 1e-07,
  test.only = FALSE,
  delete.tmp.files = TRUE,
  verbose = 0,
  overwrite = FALSE
)

Arguments

signatureanalyzer.code.dir

The directory holding the SignatureAnalyzer code.

input.catalog

File containing input catalog. Columns are samples (tumors), rows are signatures. SignatureAnalyzer does not care about the row names (I think) TODO(Steve): check this.

out.dir

Directory that will be created for the output; abort if it already exits. Log files will be in paste0(out.dir, "/tmp").

seedNumber

Specify the pseudo-random seed number used to run SignatureAnalyzer. Setting seed can make the attribution of SignatureAnalyzer repeatable. If NULL, this function will not specify seed number. Default: NULL.

input.exposures

A file with the synthetic exposures used to generate input.catalog; if provided here, this is copied over to the output directory for downstream analysis.

maxK

The maximum number of signatures to consider extracting.

tol

Controls when SignatureAnalyzer will terminate its search; tol was 1.e-05 for the PCAWG7 analysis.

test.only

If TRUE, only analyze the first 10 columns read in from input.catalog.

delete.tmp.files

If TRUE delete the many temporary files generated by SignatureAnalyzer.

verbose

If TRUE, then print various messages.

overwrite

If TRUE, overwrite existing output

Details

Creates several files in out.dir:

  1. sa.output.sigs.csv Normalized signatures (no all-0 signatures, column sums all 0)

  2. sa.output.raw.exp.csv Raw exposures (attributions)

  3. sa.output.exp.csv Same as sa.output.raw.exp.csv

  4. sa.output.other.data.csv, contains a summary of important information, including the number of signatures extracted.

  5. input.syn.exp.csv Optional, a copy of input.exposures, if it was provided.

Value

A list with the following elements:

  1. signatures.W The raw signature matrix, *including* columns of all zeros.

  2. exposures.H The raw exposure matrix, *excluding* rows of all zeros. The matrix product of the non-zero columns of signatures.w and exposures.H approximates the input spectrum matrix.

  3. likelihood The likelihood as returned by SignatureAnalyzer.

  4. evidence -1 * the posterior probability as returned by SignatureAnalyzer.

  5. relevance One for each column of the signatures.W, as returned by SignatureAnalyzer.

  6. error A measure of reconstruction error (?) as returned by SignatureAnalyzer

  7. normalized.sigs The non-0 columns of signatures.W normalized so that each column sum is 1.


WuyangFF95/SynSigRun documentation built on Oct. 7, 2022, 1:16 p.m.