Package 'SecAct'

Title: Secreted Signaling Activity Inference
Description: Inferring secreted protein activities at bulk, single-cell, and spatial levels. SecAct uses ridge regression with permutation-based significance testing to infer the activity of over 1000 secreted proteins from gene expression profiles.
Authors: Beibei Ru [aut], Zaoqu Liu [cre, ctb]
Maintainer: Zaoqu Liu <[email protected]>
License: GPL-3 + file LICENSE
Version: 1.0.1
Built: 2026-05-23 08:34:41 UTC
Source: https://github.com/Zaoqu-Liu/SecAct

Help Index


Secreted protein activity inference

Description

Infer the signaling activity of 1248 secreted proteins from gene expression profiles.

Usage

SecAct.activity.inference(
  inputProfile,
  inputProfile_control = NULL,
  is.differential = FALSE,
  is.paired = FALSE,
  is.singleSampleLevel = FALSE,
  sigMatrix = "SecAct",
  is.group.sig = TRUE,
  is.group.cor = 0.9,
  lambda = 5e+05,
  nrand = 1000,
  sigFilter = FALSE
)

Arguments

inputProfile

Gene expression matrix with gene symbol (row) x sample (column).

inputProfile_control

Gene expression matrix with gene symbol (row) x sample (column).

is.differential

A logical indicating whether inputProfile has been differential profiles against to control.

is.paired

A logical indicating whether you want a paired operation of differential profiles between inputProfile and inputProfile_control if samples in inputProfile and inputProfile_control are paired.

is.singleSampleLevel

A logical indicating whether to calculate activity change for each single sample between inputProfile and inputProfile_control. If FALSE, calculate the overall activity change between two phenotypes.

sigMatrix

Secreted protein signature matrix.

is.group.sig

A logical indicating whether group similar signatures.

is.group.cor

Correlation cutoff of similar signatures.

lambda

Penalty factor in the ridge regression.

nrand

Number of randomization in the permutation test, with a default value 1000.

sigFilter

A logical indicating whether filter the secreted protein signatures with the genes from inputProfile.

Value

A list with four items, each is a matrix. beta: regression coefficients se: standard errors of coefficients zscore: beta/se pvalue: statistical significance


Cell state activity inference from single cell data

Description

Calculate secreted protein signaling activity of cell states from single cell RNA-Sequencing data.

Usage

SecAct.activity.inference.scRNAseq(
  inputProfile,
  cellType_meta,
  sigMatrix = "SecAct",
  is.singleCellLevel = FALSE,
  is.group.sig = TRUE,
  is.group.cor = 0.9,
  lambda = 5e+05,
  nrand = 1000,
  sigFilter = FALSE
)

Arguments

inputProfile

A Seurat object.

cellType_meta

Column name in meta data that includes cell-type annotations.

sigMatrix

Secreted protein signature matrix.

is.singleCellLevel

A logical indicating whether to calculate for each single cell.

is.group.sig

A logical indicating whether to group similar signatures.

is.group.cor

Correlation cutoff of similar signatures.

lambda

Penalty factor in the ridge regression.

nrand

Number of randomization in the permutation test, with a default value 1000.

sigFilter

A logical indicating whether filter the secreted protein signatures with the genes from inputProfile.

Value

A Seurat object.


Spot activity inference from spatial data

Description

Calculate secreted protein signaling activity of spots from spatial transcriptomocs data.

Usage

SecAct.activity.inference.ST(
  inputProfile,
  inputProfile_control = NULL,
  scale.factor = 1e+05,
  sigMatrix = "SecAct",
  is.group.sig = TRUE,
  is.group.cor = 0.9,
  lambda = 5e+05,
  nrand = 1000,
  sigFilter = FALSE
)

Arguments

inputProfile

A SpaCET object.

inputProfile_control

A SpaCET object.

scale.factor

Sets the scale factor for spot-level normalization.

sigMatrix

Secreted protein signature matrix.

is.group.sig

A logical indicating whether to group similar signatures.

is.group.cor

Correlation cutoff of similar signatures.

lambda

Penalty factor in the ridge regression.

nrand

Number of randomization in the permutation test, with a default value 1000.

sigFilter

A logical indicating whether filter the secreted protein signatures with the genes from inputProfile.

Value

A SpaCET object.


Draw a bar plot

Description

Draw a bar plot of secreted proteins.

Usage

SecAct.bar.plot(fg.vec, title = NULL, colors = c("#91bfdb", "#fc8d59"))

Arguments

fg.vec

A vector of values.

title

The title for plot.

colors

Colors.

Value

A ggplot2 object.


Cell-cell communication circle plot

Description

Draw a circle plot of cell-cell communication mediated by secreted proteins.

Usage

SecAct.CCC.circle(data, colors_cellType, sender = NULL, receiver = NULL)

Arguments

data

A SpaCET object or a Seurat object.

colors_cellType

Colors for cell types.

sender

Sender cell types to highlight.

receiver

Receiver cell types to highlight.

Value

A circlize object.


Cell-cell communication dot plot

Description

Draw a dot plot of cell-cell communication mediated by secreted proteins.

Usage

SecAct.CCC.dot(data, sender = NULL, secretedProtein = NULL, receiver = NULL)

Arguments

data

A SpaCET object or a Seurat object.

sender

Sender cell types.

secretedProtein

Secreted proteins.

receiver

Receiver cell types.

Value

A ggplot2 object.


Cell-cell communication heatmap

Description

Draw a heatmap of cell-cell communication mediated by secreted proteins.

Usage

SecAct.CCC.heatmap(
  data,
  row.sorted = FALSE,
  column.sorted = FALSE,
  colors_cellType
)

Arguments

data

A SpaCET object or a Seurat object.

row.sorted

Whether to sort rows.

column.sorted

Whether to sort columns.

colors_cellType

Colors for cell types.

Value

A Heatmap-class object.


Cell-cell communication sankey plot

Description

Draw a sankey plot of cell-cell communication mediated by secreted proteins.

Usage

SecAct.CCC.sankey(
  data,
  colors_cellType,
  sender = NULL,
  secretedProtein = NULL,
  receiver = NULL
)

Arguments

data

A SpaCET object or a Seurat object.

colors_cellType

Colors for cell types.

sender

Sender cell types.

secretedProtein

Secreted proteins.

receiver

Receiver cell types.

Value

A ggplot2 object.


Cell-cell communication from single cell data

Description

Calculate condition-specific cell-cell communication mediated by secreted proteins from scRNA-Seq data.

Usage

SecAct.CCC.scRNAseq(
  Seurat_obj,
  cellType_meta,
  condition_meta,
  conditionCase,
  conditionControl,
  scale.factor = 1e+05,
  act_diff_cutoff = 2,
  exp_logFC_cutoff = 0.2,
  exp_mean_all_cutoff = 2,
  exp_fraction_case_cutoff = 0.1,
  padj_cutoff = 0.01,
  sigMatrix = "SecAct",
  is.group.sig = TRUE,
  is.group.cor = 0.9,
  lambda = 5e+05,
  nrand = 1000
)

Arguments

Seurat_obj

A Seurat object.

cellType_meta

Column name in meta data that includes cell-type annotations.

condition_meta

Column name in meta data that includes condition information.

conditionCase

Case condition.

conditionControl

Control condition.

scale.factor

Sets the scale factor for cell-level normalization in step2.

act_diff_cutoff

Cut off for activity change (i.e., z score) in step 1.

exp_logFC_cutoff

Cut off for log fold change in step 2.

exp_mean_all_cutoff

Cut off for mean expression across all cells.

exp_fraction_case_cutoff

Cut off for the fraction of cells expressing secreted protein-coding genes in step 2.

padj_cutoff

Adjusted p value cut off.

sigMatrix

Secreted protein signature matrix.

is.group.sig

A logical indicating whether to group similar signatures.

is.group.cor

Correlation cutoff of similar signatures.

lambda

Penalty factor in the ridge regression.

nrand

Number of randomization in the permutation test, with a default value 1000.

Value

A Seurat object.


Cell-cell communication from spatial data

Description

Calculate cell-cell communication mediated by secreted proteins from spatial transcriptomics data.

Usage

SecAct.CCC.scST(
  SpaCET_obj,
  cellType_meta,
  scale.factor = 1000,
  radius = 20,
  ratio_cutoff = 0.2,
  padj_cutoff = 0.01,
  coreNo = 6
)

Arguments

SpaCET_obj

A SpaCET object.

cellType_meta

Column name in meta data that includes cell-type annotations.

scale.factor

Sets the scale factor for spot-level normalization.

radius

Radius cut off (unit: um).

ratio_cutoff

Ratio cut off.

padj_cutoff

Adjusted p value cut off.

coreNo

Core number in parallel computation.

Value

A Seurat object.


Check SecAct data status

Description

Check if SecAct data is available and show its location.

Usage

SecAct.check.data()

Value

Invisible logical indicating whether data is available.

Examples

SecAct.check.data()

Survival regression

Description

Calculate the risk score of each secreted protein.

Usage

SecAct.coxph.regression(mat, surv)

Arguments

mat

Activity matrix.

surv

Survival matrix.

Value

A matrix.


Download SecAct signature database

Description

Downloads the SecAct signature matrix from GitHub Release.

Usage

SecAct.download.data(force = FALSE, timeout = 600)

Arguments

force

Logical, whether to force re-download even if file exists. Default FALSE.

timeout

Download timeout in seconds. Default 600.

Value

Invisible path to the downloaded file.

Examples

## Not run: 
SecAct.download.data()

## End(Not run)

Draw a heatmap plot

Description

Draw a heatmap plot of secreted proteins.

Usage

SecAct.heatmap.plot(
  fg.mat,
  title = NULL,
  colors = c("#03c383", "#aad962", "#fbbf45", "#ef6a32")
)

Arguments

fg.mat

A matrix of values.

title

The title for plot.

colors

Colors.

Value

A ggplot2 object.


Secreted protein activity inference

Description

Infer the activity of over 1000 secreted proteins from tumor gene expression profiles.

Usage

SecAct.inference.gsl(Y, SigMat = "SecAct", lambda = 5e+05, nrand = 1000)

Arguments

Y

Gene expression matrix with gene symbol (row) x sample (column).

SigMat

Secreted protein signature matrix.

lambda

Penalty factor in the ridge regression.

nrand

Number of randomization in the permutation test, with a default value 1000.

Value

A list with four items, each is a matrix. beta: regression coefficients se: standard errors of coefficients zscore: beta/se pvalue: statistical significance


Secreted protein activity inference

Description

Infer the activity of over 1000 secreted proteins from tumor gene expression profiles.

Usage

SecAct.inference.r(Y, SigMat = "SecAct", lambda = 5e+05, nrand = 1000)

Arguments

Y

Gene expression matrix with gene symbol (row) x sample (column).

SigMat

Secreted protein signature matrix.

lambda

Penalty factor in the ridge regression.

nrand

Number of randomizations in the permutation test, with a default value 1000.

Value

A list with four items, each is a matrix. beta: regression coefficients se: standard errors of coefficients zscore: beta/se pvalue: statistical significance


Draw a lollipop plot

Description

Draw a lollipop plot of secreted proteins.

Usage

SecAct.lollipop.plot(fg.vec, title = NULL)

Arguments

fg.vec

A vector of values.

title

The title for plot.

Value

A ggplot2 object.


Secreted protein signaling pattern

Description

Calculate the signaling pattern of secreted proteins based on their activities.

Usage

SecAct.signaling.pattern(SpaCET_obj, scale.factor = 1e+05, radius = 200, k)

Arguments

SpaCET_obj

A SpaCET object.

scale.factor

Sets the scale factor for spot-level normalization.

radius

Radius cut off.

k

Number of patterns for NMF.

Value

A SpaCET object with pattern results.

Examples

## Not run: 
SpaCET_obj <- SecAct.signaling.pattern(SpaCET_obj, k=3)

## End(Not run)

Pattern-associated secreted proteins

Description

Enumerate secreted proteins associated with each signaling pattern.

Usage

SecAct.signaling.pattern.gene(SpaCET_obj, n)

Arguments

SpaCET_obj

A SpaCET object.

n

Pattern order.

Value

A matrix.

Examples

## Not run: 
res <- SecAct.signaling.pattern.gene(SpaCET_obj, n=3)

## End(Not run)

Secreted protein signaling velocity for single-cell ST

Description

Calculate the signaling velocity of secreted proteins based on their activities.

Usage

SecAct.signaling.velocity.scST(
  SpaCET_obj,
  sender,
  secretedProtein,
  receiver,
  cellType_meta,
  scale.factor = 1e+05,
  CustomizedAreaCoordinates = NULL,
  radius = 20,
  colors_cellType = NULL
)

Arguments

SpaCET_obj

A SpaCET object.

sender

Sender cell types.

secretedProtein

Secreted proteins.

receiver

Receiver cell types.

cellType_meta

Column name in meta data that includes cell-type annotations.

scale.factor

Sets the scale factor for spot-level normalization.

CustomizedAreaCoordinates

Optional coordinates for customized area c(x.left, x.right, y.bottom, y.top).

radius

Radius cut off (unit: um).

colors_cellType

Named vector of colors for cell types.

Details

The velocity direction starts from the source cell producing a secreted protein and moves to sink cells receiving the secreted protein signal. The velocity magnitude represents the product between the secreted protein-coding gene expression at source cells and signaling activities at sink cells.

Value

A ggplot2 object.

Examples

## Not run: 
SecAct.signaling.velocity.scST(SpaCET_obj, sender="Fibroblast", 
  secretedProtein="THBS2", receiver="Tumor_boundary", cellType_meta="cellType")

## End(Not run)

Secreted protein signaling velocity

Description

Calculate the signaling velocity of secreted proteins based on their activities.

Usage

SecAct.signaling.velocity.spotST(
  SpaCET_obj,
  scale.factor = 1e+05,
  gene,
  signalMode = "receiving",
  radius = 200,
  contourMap = FALSE,
  coutourBins = 11,
  animated = FALSE
)

Arguments

SpaCET_obj

A SpaCET object.

scale.factor

Sets the scale factor for spot-level normalization.

gene

Gene symbol coding a secreted protein.

signalMode

Mode of signaling velocity, i.e., "receiving", "sending", and "both".

radius

Radius cut off.

contourMap

A logical indicating whether transform as contour map.

coutourBins

Number of bins for contour map.

animated

A logical indicating whether generate animated figure.

Details

The velocity direction starts from the source cell producing a secreted protein and moves to sink cells receiving the secreted protein signal. The velocity magnitude represents the product between the secreted protein-coding gene expression at source cells and signaling activities at sink cells.

Value

A ggplot2 object.

Examples

## Not run: 
SecAct.signaling.velocity.spotST(SpaCET_obj, gene="TGFB1", signalMode="receiving")
SecAct.signaling.velocity.spotST(SpaCET_obj, gene="TGFB1", signalMode="sending")

## End(Not run)

Draw a survival plot

Description

Draw a survival plot of secreted proteins.

Usage

SecAct.survival.plot(mat, surv, gene, x.title = "Time")

Arguments

mat

Activity matrix.

surv

Survival matrix.

gene

Gene symbol.

x.title

Title for x axis.

Value

A ggplot2 object.