A problem occurs when running the monocle2
1
0
Entering edit mode
@6329b4d3
Last seen 7 weeks ago
Hangzhou,PRC

Fig 1 enter image description here

Fig 2 enter image description here

Fig 3 enter image description here

Fig 4 enter image description here

I encountered a problem when running monocle2. When I tried to open the file produced by the newCellDataSet function of the monocle package (see the Fig 1), an error occurred (see the Fig 2). I clicked on mycds in the Global Environment and found that almost all the contents of the mycds file were empty (see the Fig 3). I have tried many methods, including using upgrade_graph("mycds") (the result of this function is: Error in upgrade_graph(mycds): Not all inherits(graph, "igraph") are TRUE) (see the Fig 4). Switching to other versions of monocle did not solve the error either. My current R version is 4.5.1, the monocle package version is 2.36.0, and the igraph package version is 2.1.4. Has anyone encountered this problem before? How can I solve it?

monocle • 127 views
ADD COMMENT
0
Entering edit mode
Kevin Blighe ★ 4.0k
@kevin
Last seen 4 hours ago
The Cave, 181 Longwood Avenue, Boston, …

Hi yuheng_yang,

This error arises from an incompatibility between Monocle 2.36.0 and the newer igraph 2.1.4, which causes the CellDataSet object to initialise incompletely and the graph to fail validation. Monocle 2 is no longer actively maintained and struggles with recent igraph releases.

To resolve it, downgrade igraph to a compatible version:

remotes::install_version("igraph", version = "2.0.3")

Restart your R session afterwards, then recreate the CellDataSet with newCellDataSet(). This should populate the object correctly and allow upgrade_graph() to run without issues.

If problems persist, I recommend migrating to Monocle 3, which is more robust with current R and package versions.

Best,
Kevin

ADD COMMENT

Login before adding your answer.

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