cmdscale() error: NA values not allowed in 'd', ask for help.
Entering edit mode
Wagaa ▴ 10
Last seen 3.3 years ago
United States

I am learning scRNA-seq analysis by following the workflow. The link is here

I encountered an error at 2.6.2 Dimensionality reduction Step.

W <- colData(se)[, grepl("^W", colnames(colData(se)))]
W <- as.matrix(W)
d <- dist(W)
fit <- cmdscale(d, eig = TRUE, k = 2)

The error information: Error in cmdscale(d, eig = TRUE, k = 2) : NA values not allowed in 'd'

Anyone may help me? thank you.

cmdscale zinbwave scRNA-seq single cell sequencing RNA-seq • 2.7k views
Entering edit mode

WonderMouse Technologies is web designing company, which provides web designing services in Dubai. The company provides cost-competitive website design and development solutions to start-ups, SME’s and enterprises. Our well-organized, flexible and transparent processes help us create Web Design Services or solutions that meet client’s present as well as future demands. The expert professionals of website design company in Delhi can meet all your requisites efficiently and as a mobile application development company in India, we focus on the goals, budget, and success of the businesses. Whether you are looking for best mobile app development services, desktop or web apps development services or web designing services, Wondermouse technologies is top destination for all your requirements. Our dedicated team of designers, developers use the best tools in order to ensure the best deliverables for every project.

Entering edit mode
davide risso ▴ 920
Last seen 23 months ago
University of Padova


the workflow you are following is quite old (~3 years ago) and since then several changes happened to the zinbwave package. One of them is that it now uses the SingleCellExperiment class which stores the reduced dimension matrix in the reducedDim slot.

If you update your code to the following, it should work.

W <- reducedDim(se, "zinbwave")
d <- dist(W)
fit <- cmdscale(d, eig = TRUE, k = 2)

Best, Davide


Login before adding your answer.

Traffic: 354 users visited in the last hour
Help About
Access RSS

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

Powered by the version 2.3.6