Getting this error while trying to use edgeR "Error in as.vector(x, mode) : cannot coerce type 'closure' to vector of type 'any'"
1
0
Entering edit mode
Isa • 0
@0db61ddf
Last seen 8 weeks ago
Brazil

So im trying to detect differentially abundant ASVs with the package edgeR, however when i get to this point i keep getting an error i don't understand:

counts <- as(otu_table(ASV_physeq.filt), "matrix")
y = DGEList(counts=counts)
y <- edgeR::calcNormFactors(y, method="TMM");
y <- estimateDisp(y, design);


Error:

Error in as.vector(x, mode) :
cannot coerce type 'closure' to vector of type 'any'


Anyone here that can help me please?

Thanks! Isabella.

edgeR edge • 164 views
0
Entering edit mode

What is design ? dput(design)

0
Entering edit mode
@gordon-smyth
Last seen 15 minutes ago
WEHI, Melbourne, Australia

That doesn't look like an edgeR error. Did the error occur after the last code line or at an earlier stage? If the former, then please show the output from

print(design)


and

summary(y)