Error in CIBERSORTx
1
0
Entering edit mode
18 months ago
Manav • 0

Hello,

I am trying to use CIBERSORT to deconvolute the immune cells in pancreatic cancer after my treatments. I have 3 biological replicates of Control, Treatments A,B,C.

Using edgeR, I created the cpm matrix which is not log transformed. and converted it to the required format as follows:

# Load Packages ----
library(edgeR) 
library(org.Mm.eg.db)

# Load the data ----
data<- read.csv("gene_count_matrix.csv", header = T, row.names = 1L) # n=55401
pheno<- read.csv("pheno_sheet.csv", header = T, row.names = 1L)

# Load the data into edgeR ----
dge<- DGEList(counts=data, group = pheno$Sample) # n=55401

# Filtering low count genes ----
keep<- filterByExpr(dge)
dge<- dge[keep,,keep.lib.sizes=FALSE] # n=21476

# Normalising the data ----
dge<- calcNormFactors(dge)

cpm<- cpm(dge, log=F) # n=21476
cpm<- data.frame(cpm)
cpm$ENTREZID<- mapIds(org.Mm.eg.db, keys = rownames(cpm), keytype = "ENSEMBL", column = "ENTREZID")
cpm<- cpm[!duplicated(cpm$ENTREZID),]
cpm$SYMBOL<- mapIds(org.Mm.eg.db, keys = rownames(cpm), keytype = "ENSEMBL", column = "SYMBOL")
cpm<- na.omit(cpm)
rownames(cpm) = cpm$SYMBOL
cpm<- subset(cpm, select = -c(ENTREZID, SYMBOL))

write.csv(cpm, "CPM_CIBERSORTX.csv")

I then converted it to a tab delimited file and uploaded it to CIBERSORTx.

Using the default LM22 matrix, I used the following job parameters:

Date: 2022-10-12 14:39:40
Job type: Impute Cell Fractions
Signature matrix file: LM22.update-gene-symbols.txt
Mixture file: CPM_CIBERSORTX.txt
Batch correction: enabled
Batch correction mode: B-mode
Disable quantile normalization: true
Run mode (relative or absolute): relative
Permutations: 100

And then this is the error I got:

Error: $ operator is invalid for atomic vectors
In addition: Warning message:
In mclapply(1:svn_itor, res, mc.cores = svn_itor) :
  all scheduled cores encountered errors in user code
Execution halted

Does anyone know how to resolve this?

Thanks for your time.

RNA-seq CIBERSORT LM22 • 3.9k views
ADD COMMENT
0
Entering edit mode

Maybe try to convert the atomic vector to a data frame and print it already tab separated with:

write.table(as.data.frame(cpm), "CPM_CIBERSORTX.tsv", sep="\t")

Also make sure before running CIBERSORT that you have the gene symbols in the first column of your file.

ADD REPLY
0
Entering edit mode

Hi, Thanks for your suggestion. Unfortunately, I got the same error when I did it with your suggestion.

ADD REPLY
0
Entering edit mode

Hmm.. could you show the content of the file?

head CPM_CIBERSORTX.tsv
ADD REPLY
0
Entering edit mode

This is the file. Of note, after saving it as a tsv file, I added "Gene" over rownames as per requirements of CIBERSORT enter image description here

So the final File looked like this. enter image description here

ADD REPLY
0
Entering edit mode

Hello. I faced the same problem but not able to resolve it. I don't have double quotation and no NA values and the dataset used is in the form of dataset not any other type. Would anyone could help me resolve this error? I can provide more info on that. Thanks.

Error in out[[t]]$coefs : $ operator is invalid for atomic vectors
In addition: Warning message:
In mclapply(1:svn_itor, res, mc.cores = svn_itor) :
  all scheduled cores encountered errors in user code
ADD REPLY
0
Entering edit mode

For me, this error was produced when the difference between the number of samples (in the mixture file) to the number of cell types (in the signature matrix) was not large enough.

ADD REPLY
1
Entering edit mode
18 months ago
iraun 6.2k

So, your file contains double quotation marks? See CIBERSORTx instructions

ADD COMMENT
0
Entering edit mode

Oh I see the problem. Thanks for the help.

ADD REPLY
0
Entering edit mode

Sure no problem. Please consider marking the answer as accepted :).

ADD REPLY
0
Entering edit mode

Hi, I am having the same problem. Just wondering how you got rid of the quotes in the matrix? thanks

ADD REPLY

Login before adding your answer.

Traffic: 1521 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