Deconvolution Analysis using AutoGeneS. One-step function that performs signature building and deconvolution in one step without saving the signature in between. A signature that has been created with @seealso build_model_autogenes() can be supplied as input to this function with the signature parameter, although it is not mandatory.

deconvolute_autogenes(
  single_cell_object,
  bulk_gene_expression,
  cell_type_annotations,
  signature = NULL,
  ngen = 5000,
  mode = c("fixed", "standard"),
  nfeatures = 500,
  weights_signature = list(-1, 1),
  objectives = list("correlation", "distance"),
  seed = 0,
  population_size = 100,
  offspring_size = 100,
  crossover_pb = 0.7,
  mutation_pb = 0.3,
  mutate_flip_pb = 0.001,
  crossover_thres = 1000,
  ind_standard_pb = 0.1,
  plot_weights = NULL,
  plot_objectives = c(0, 1),
  plot = FALSE,
  output_dir = tempdir(),
  model = c("nusvr", "nnls", "linear"),
  nu = 0.5,
  C = 0.5,
  normalize_results = TRUE,
  kernel = "linear",
  degree = 3,
  gamma = "scale",
  coef0 = 0,
  shrinking = TRUE,
  tol = 0.001,
  cache_size = 200,
  max_iter = -1,
  weights_deconvolution = list(1, 0),
  index = NULL,
  close_to = NULL,
  verbose = FALSE
)

Arguments

single_cell_object

A matrix with the single-cell data. Rows are genes, columns are samples. Row and column names need to be set.

bulk_gene_expression

A matrix of bulk data. Rows are genes, columns are samples. Row and column names need to be set.

cell_type_annotations

A vector of the cell type annotations. Has to be in the same order as the samples in single_cell_object.

signature

OPTIONAL: Path to a .pickle file, created with the build_model method of AutoGeneS.

ngen

(SIGNATURE) Number of generations. The higher, the longer it takes.

mode

(SIGNATURE) In standard mode, the number of genes of a selection is allowed to vary arbitrarily. In fixed mode, the number of selected genes is fixed (using nfeatures).

nfeatures

(SIGNATURE) Number of genes to be selected in fixed mode.

weights_signature

(SIGNATURE) Weights applied to the objectives. For the optimization, only the sign is relevant: 1 means to maximize the respective objective, -1 to minimize it and 0 means to ignore it. The weight supplied here will be the default weight for selection. There must be as many weights as there are objectives.

objectives

(SIGNATURE) The objectives to maximize or minimize. Must have the same length as weights. The default objectives (correlation, distance) can be referred to using strings. For custom objectives, a function has to be passed.

seed

(SIGNATURE) Seed for random number generators.

population_size

(SIGNATURE) Size of every generation (mu parameter).

offspring_size

(SIGNATURE) Number of individuals created in every generation (lambda parameter).

crossover_pb

(SIGNATURE) Crossover probability.

mutation_pb

(SIGNATURE) Mutation probability.

mutate_flip_pb

(SIGNATURE) Mutation flipping probability (fixed mode).

crossover_thres

(SIGNATURE) Crossover threshold (standard mode).

ind_standard_pb

(SIGNATURE) Probability used to generate initial population in standard mode.

plot_weights

(SIGNATURE) Plotting: Weights with which to weight the objective values. For example, (-1,2) will minimize the first objective and maximize the the second (with higher weight).

plot_objectives

(SIGNATURE) Plotting: The objectives to be plotted. Contains indices of objectives. The first index refers to the objective that is plotted on the x-axis. For example, (2,1) will plot the third objective on the x-axis and the second on the y-axis.

plot

(SIGNATURE) Whether to produce a plot at all. This just hands over the reticulate plot and has some visualization problems. To get a normal plot, use the pickle file, open it in python and use the plot method there.

output_dir

(SIGNATURE) path to directory where the picke output file will be saved. Default is tempdir().

model

(DECONVOLUTION) Regression model. Available options: NuSVR ("nusvr"), non-negative least squares("nnls") and linear model ("linear").

nu

(DECONVOLUTION) Nu parameter for NuSVR.

C

(DECONVOLUTION) C parameter for NuSVR.

normalize_results

(DECONVOLUTION) wether to normalize results according to the regression model used. Default is TRUE

kernel

(DECONVOLUTION) Kernel parameter for NuSVR.

degree

(DECONVOLUTION) Degree parameter for NuSVR.

gamma

(DECONVOLUTION) Gamma parameter for NuSVR.

coef0

(DECONVOLUTION) Coef0 parameter for NuSVR.

shrinking

(DECONVOLUTION) Shrinking parameter for NuSVR.

tol

(DECONVOLUTION) Tol parameter for NuSVR.

cache_size

(DECONVOLUTION) Cache_size parameter for NuSVR.

max_iter

(DECONVOLUTION) Max_iter parameter for NuSVR.

weights_deconvolution

(DECONVOLUTION) Select Solution: Weights with which to weight the objective values. For example, (-1,1) will minimize the first objective and maximize the the second (with more weight).

index

Select Solution: If one int is passed, return pareto[index] If two ints are passed, the first is an objective (0 for the first). The second is the nth element if the solutions have been sorted by the objective in ascending order. For example, (0,1) will return the solution that has the second-lowest value in the first objective. (1,-1) will return the solution with the highest value in the second objective.

close_to

Select Solution: Select the solution whose objective value is close to a certain value. Assumes (objective,value). For example, (0,100) will select the solution whose value for the first objective is closest to 100.

verbose

Whether to produce an output on the console.

Value

A list with two elements: 'proportions' is the matrix of cell proportions and 'genes_used' is a vector containing the names of the genes used for the deconvolution, what is called "solution" by AutoGeneS.