Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in PLIER while performing pseudobulk analysis with single-cell data (Error in svd(Y) : infinite or missing values in 'x') #18

Open
recervictory opened this issue Nov 25, 2024 · 1 comment

Comments

@recervictory
Copy link

Hello,

I am attempting to use the PLIER package for pseudobulk analysis of single-cell RNA sequencing data. I have generated pseudobulk data using the PseudobulkExpression function from Seurat and passed it to the PLIER function. However, I encounter an error during the SVD computation:

`
pseudobulk_data <- PseudobulkExpression(
object = seuratObject,
group.by = c("sample", "cell_type"), # Grouping by sample and cell type
assays = "RNA", # Assay to use
features = NULL, # Use all features
method = "average", # Aggregation method
normalization.method = "LogNormalize",# Normalization method
scale.factor = 10000, # Scale factor for normalization
verbose = TRUE, # Print progress
layer = "data"
)

plierResult <- PLIER(pseudobulk_data, allPaths)

ERROR
Selecting common genes: 6078
Removing 12 pathways with too few genes
Computing SVD
Error in svd(Y) : infinite or missing values in 'x'

`

@wgmao
Copy link
Owner

wgmao commented Nov 25, 2024

Could you check if there are any NA or infinite values in pseudobulk_data? If the data looks good, the issues might be due to some genes having constant values (e.g., all zeros) across all cells. By default, PLIER applies the z-score transformation on genes, which can result in constant gens being converted to NA values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants