edroaldo/cellrouter

processtrajectories error

Opened this issue · 1 comments

Hello, I seem to be getting the same error as "processtrajectories error #9" however I am following the Paul example using that data and copy pasting the the exact script from the tutorial. All seemed to be going quite well until this step. Please advise, thanks so much.

Here is the command and output I am seeing:

cellrouter <- processTrajectories(cellrouter, rownames(cellrouter@ndata), path.rank=ranks[3], num.cells = 3, neighs = 3,column.ann = 'population', column.color = 'colors')
[1] "parsing trajectory information"
[1] 3
Error in igraph::induced.subgraph(graph = g, vids = unlist(igraph::neighborhood(graph = g, :
Not a graph object


here is some other info I noticed you requested in the other thread:

user@server:~$ ls results
custom_1.pdf pathsCells_FlowNetwork_paths.ser
heatmap_all_genes_CellRouter_clusters.png PCA_1.pdf
heatmap_top_10_genes_CellRouter_clusters.png PCA_2.pdf
heatmap_top_10_genes_original_clusters.png tSNE_1.pdf
heatmap_top_10_genes_sorted_populations.png tSNE_2.pdf
knn_tsne_CellRouter_clusters.pdf tSNE_graphClustering_clusters.pdf
paths tSNE_original_clusters.pdf

user@server:~$ ls results/paths
6.1 6.2 6.3 6.4 6.5 6.7 6.8 6.9 cell_edge_weighted_network.txt

user@server:~$ java -version
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-2ubuntu218.04)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-2ubuntu218.04, mixed mode, sharing)

user@server:~$ ls results/paths/6.1
CellRouter.sh Cells_FlowNetwork_scripts.R
Cells_FlowNetwork_all_paths_subnet_exportGML.R Cells_FlowNetwork_scripts.Rout
Cells_FlowNetwork_all_paths_subnet.txt cell_sinks.txt
Cells_FlowNetwork_all_paths_totalFlow.txt cell_sources.txt
Cells_FlowNetwork_all_paths.txt

then I found in the Cells_FlowNetwork_scripts.Rout file that it was stalling when attempting to load igraph:

library(igraph);
Error in library(igraph) : there is no package called ‘igraph’
Execution halted

this is because I have separate Rlibs directories on this server and so it needed to load my libPaths() first. I added that line to the CellRouter_Class.R script:

setMethod("processTrajectories",
signature="CellRouter",
definition=function(object, genes, path.rank, num.cells, neighs, column.ann, column.color){
.libPaths(c("wsRlibs361", .libPaths()))
library(igraph)
object@gene.trajectory <- genes

and it fixed that problem? but introduced what seems to be a worse one at this earlier step:

cellrouter <- findPaths(cellrouter, column='population', libdir, paste(getwd(), 'results/paths', sep='/'), method="graph")
-------------------Transition: 6.1 -----------------------

  1. Computing flow network
    Error: Could not find or load main class cellrouter.CellRouter
    Caused by: java.lang.ClassNotFoundException: cellrouter.CellRouter
    -------------------Transition: 6.2 -----------------------
  2. Computing flow network
    Error: Could not find or load main class cellrouter.CellRouter
    Caused by: java.lang.ClassNotFoundException: cellrouter.CellRouter
    -------------------Transition: 6.3 -----------------------
  3. Computing flow network
    Error: Could not find or load main class cellrouter.CellRouter
    Caused by: java.lang.ClassNotFoundException: cellrouter.CellRouter
    -------------------Transition: 6.4 -----------------------
  4. Computing flow network
    Error: Could not find or load main class cellrouter.CellRouter
    Caused by: java.lang.ClassNotFoundException: cellrouter.CellRouter
    -------------------Transition: 6.5 -----------------------
  5. Computing flow network
    Error: Could not find or load main class cellrouter.CellRouter
    Caused by: java.lang.ClassNotFoundException: cellrouter.CellRouter
    -------------------Transition: 6.7 -----------------------
  6. Computing flow network
    Error: Could not find or load main class cellrouter.CellRouter
    Caused by: java.lang.ClassNotFoundException: cellrouter.CellRouter
    -------------------Transition: 6.8 -----------------------
  7. Computing flow network
    Error: Could not find or load main class cellrouter.CellRouter
    Caused by: java.lang.ClassNotFoundException: cellrouter.CellRouter
    -------------------Transition: 6.9 -----------------------
  8. Computing flow network
    Error: Could not find or load main class cellrouter.CellRouter
    Caused by: java.lang.ClassNotFoundException: cellrouter.CellRouter
    -------------------Transition: 6.10 -----------------------
  9. Computing flow network
    Error: Could not find or load main class cellrouter.CellRouter
    Caused by: java.lang.ClassNotFoundException: cellrouter.CellRouter

I thought it was a server related problem however I also tried the same wokflow on my macbook and at the same step got this

cellrouter <- findPaths(cellrouter, column='population', libdir, paste(getwd(), 'results/paths', sep='/'), method="graph")
-------------------Transition: 6.1 -----------------------

  1. Computing flow network
    Error: Could not find or load main class cellrouter.CellRouter
    -------------------Transition: 6.2 -----------------------
  2. Computing flow network
    Error: Could not find or load main class cellrouter.CellRouter

Now I am totally lost. Please let me know if there is anything else that would help get to the bottom of this. Thanks again.
W

so after seeing another post, on the macbook I changed
libdir <- "CellRouter"
to
libdir <- "~/CellRouter"
and it seemed to work properly

cellrouter <- findPaths(cellrouter, column='population', libdir, paste(getwd(), 'results/paths', sep='/'), method="graph")
-------------------Transition: 6.1 -----------------------

  1. Computing flow network
    Creating flow network...
    Number of sources: 1
    Number of sinks: 1
    Network size before: 2699
    New source s added
    New target t added
    Network size: 2701
    Computing flow
    Number of paths: 10
    Number of paths: 20
    Number of paths: 30
    Number of paths: 40
    Number of paths: 50
    Number of paths: 60
    Number of paths: 70
    Number of paths: 80
    Number of paths: 90
    Number of paths: 100
    Number of paths: 110
    Number of paths: 120
    Number of paths: 130
    Number of paths: 140
    path size before: 145
    path size after: 145
    Subnet size: 141
    merging: Cells_FlowNetwork_all_paths_subnet_exportGML.R
    -------------------Transition: 6.2 -----------------------
  2. Computing flow network
    ...

then I get to here and:

cellrouter <- processTrajectories(cellrouter, rownames(cellrouter@ndata), path.rank=ranks[3], num.cells = 3, neighs = 3,column.ann = 'population', column.color = 'colors')
[1] "parsing trajectory information"
Cells_FlowNetwork_all_paths_subnet.gml
Cells_FlowNetwork_all_paths_subnet.gml
Cells_FlowNetwork_all_paths_subnet.gml
Cells_FlowNetwork_all_paths_subnet.gml
Cells_FlowNetwork_all_paths_subnet.gml
Cells_FlowNetwork_all_paths_subnet.gml
Cells_FlowNetwork_all_paths_subnet.gml
Cells_FlowNetwork_all_paths_subnet.gml
[1] 3
[1] "6.1"
[1] "6.2"
[1] "6.3"
[1] "6.4"
[1] "6.5"
[1] "6.7"
[1] "6.8"
[1] "6.9"
names <- unique(names(cellrouter@pathsinfo$distr))
cellrouter <- correlationPseudotime(cellrouter, type='spearman')
[1] "computing correlation with the pseudotime"
6.1
6.2
6.3
6.4
6.5
6.7
6.8
6.9
cellrouter <- topGenes(cellrouter, 0.8, 0.1)
Error in sort.int(x, na.last = na.last, decreasing = decreasing, ...) :
'x' must be atomic

stuck again :(