Error with package clusterProfiler: "Error in abs(stats) : non-numeric argument to mathematical function"
0
0
Entering edit mode
María • 0
@María-24490
Last seen 8 months ago

Hi, this is my first post here I was trying to search for some GO terms with clusterProfile (Bioconductor) for my gene list but this happened (My gene list consists of only log2 fold change values with gene names associated)

BiocManager::install("clusterProfiler")
BiocManager::install("pathview")
BiocManager::install("enrichplot")
library(clusterProfiler)
library(enrichplot)
df = read.table("MiTabla.xls", header=TRUE)

# we want the log2 fold change 
original_gene_list <- df$logFC

# name the vector
names(original_gene_list) <- df$Gene.symbol

# omit any NA values 
gene_list<-na.omit(original_gene_list)

# sort the list in decreasing order (required for clusterProfiler)
gene_list = sort(gene_list, decreasing = TRUE)
MisGO <- gseGO(geneList=gene_list, 
             ont ="BP", 
             keyType = "SYMBOL", 
             minGSSize = 3, 
             maxGSSize = 800, 
             pvalueCutoff = 0.05, 
             verbose = TRUE, 
             OrgDb = organism, 
             pAdjustMethod = "none")
#Error in abs(stats) : non-numeric argument to mathematical function
Bioconductor BIOCOND clusterProfiler • 336 views
ADD COMMENT
0
Entering edit mode

What is the result of:

class(gene_list)

It is possible that when the table was loaded the logFC values were read as characters.

ADD REPLY

Login before adding your answer.

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