Sigmatrix should not contain missing values error in deconvolution using granule
0
0
Entering edit mode
@1229c6e6
Last seen 5 weeks ago
Germany

Hey so I am currently trying to do a deconvolution in R using the granule tool. The code seems fine to me but I always get the error message ''sigMatrix should not contain missing values''. So I assume there is a problem with my reference data but I can't figure out what it is. Has anybode encountered this issue before. If so I would be very happy for help


library(granulator)
library(readr)
library(dplyr)
library(tibble)

# Define file paths
filtered_tpm_matrix_path <- "C:/Users/User/Desktop/Heidelberg/filtered_tpm_matrix.csv"
log2fc_file_path <- "C:/Users/User/Desktop/Heidelberg/reshaped_gene_clusters_log2FC.csv"
deconvolution_output_path <- "C:/Users/User/Desktop/Heidelberg/deconvolution_results.csv"

# Read the filtered TPM matrix and log2FC file
filtered_tpm_matrix <- read.csv(filtered_tpm_matrix_path, row.names = 1)
log2fc_genes <- read.csv(log2fc_file_path)

# Convert the filtered TPM matrix to a matrix if it's not already
filtered_tpm_matrix <- as.matrix(filtered_tpm_matrix)

# Inspect the data
head(filtered_tpm_matrix)
head(log2fc_genes)

# Run deconvolution
decon <- deconvolute(m = filtered_tpm_matrix, sigMatrix = log2fc_genes)

# Save the results to a CSV file
write.csv(decon, deconvolution_output_path, row.names = TRUE)
granulator • 346 views
ADD COMMENT

Login before adding your answer.

Traffic: 375 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6