Skip to content

Error in RegProcess Function: "arguments must have same length" When Processing ARACNe Network File #23

@ZGuofei

Description

@ZGuofei

Hello, I encountered an issue while using the PISCES pipeline for single-cell data analysis, specifically with the RegProcess function when processing an ARACNe-generated network file.

Here are the details:

Problem Description:

I am trying to process an ARACNe-generated network file using the RegProcess function. The network file is a TSV file generated from a gene expression matrix, containing three columns: Regulator, Target, and MI.
The expression matrix is a genes (rows) x samples (columns) matrix representing single-cell RNA-seq CPM-normalized data.
When I call the RegProcess function, I get the following error:

Error in tapply(1:nrow(tmp), as.vector(tmp$tf), function(pos, tmp) { :
arguments must have same length
In addition: Warning messages:
1: In data.frame(tf = factor(tmp[, 1]), target = factor(tmp[, 2]), :
NAs introduced by coercion
2: In data.frame(tf = factor(tmp[, 1]), target = factor(tmp[, 2]), :
NAs introduced by coercion

Steps Taken to Resolve the Issue:

I have checked the format of the TSV file and confirmed that all columns and data are correctly formatted.
I filtered out any potential NA values in the network file to ensure data consistency.
I verified that the gene names in both the expression matrix and the ARACNe network file match.

Relevant Code:

Load the expression matrix

exp.mat <- as.matrix(read.table("exp.cpm1.txt", sep = "\t", header = TRUE, row.names = 1))

Call the RegProcess function to process the ARACNe network file

RegProcess(a.file = "bootstrap.tsv",
exp.mat = exp.mat,
out.dir = "output/",
out.name = "regulon")

Details of the Troubleshooting Steps:

I ensured that the TSV file contains a header and that the data is formatted consistently.
I checked for duplicate row or column names and ensured that all input files use tab delimiters.
I confirmed that the expression matrix has no missing values and that all gene IDs are unique.

Help Requested:

I would like to know if this error could be related to the TSV file format or data consistency.
Are there any recommended ways to further debug this issue, or should I provide additional debugging information?
If there are similar issues or known solutions, I would appreciate some guidance.
Thank you very much for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions