fraenkel-lab/OmicsIntegrator2

Error during randomizations

natashapm opened this issue · 6 comments

Using this command:

python /home/nlpm/packages/OmicsIntegrator2/src/parameter_sweep.py -e /home/nlpm/OI2_Networks/interactome/iref14_Recon2_Htt_mzMatchedMet_OI2_interactome.txt -p /home/nlpm/OI2_Networks/terminals/Cypro_all_terminals.txt -o /home/nlpm/OI2_Networks/networks/Cypro/randomizations/ -w 3 6 9 12 -b 0.25 0.5 0.75 1 2 -g 5 10 20 --noisy_edges=100 --random_terminals=100 -noise=0.04567861 --seed=1

I got this error:

10:59:30 - Graph: INFO - {'w': 12.0, 'b': 2.0, 'g': 20.0, 'noise': 0.04567861, 'exclude_terminals': False, 'seed': 1, 'noisy_edges_repetitions': 100, 'random_terminals_repetitions': 100}
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
  File "/net/dorsal/apps/python361/lib/python3.6/multiprocessing/pool.py", line 119, in worker
    result = (True, func(*args, **kwds))
  File "/net/dorsal/apps/python361/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
    return list(map(*args))
  File "/home/nlpm/packages/OmicsIntegrator2/src/graph.py", line 525, in _eval_randomizations
    forest, augmented_forest = self.randomizations(params["noisy_edges_repetitions"], params["random_terminals_repetitions"])
  File "/home/nlpm/packages/OmicsIntegrator2/src/graph.py", line 492, in randomizations
    forest, augmented_forest = self.output_forest_as_networkx(vertex_indices.node_index.values, edge_indices.edge_index.values)
  File "/home/nlpm/packages/OmicsIntegrator2/src/graph.py", line 322, in output_forest_as_networkx
    forest.add_nodes_from(list(set(self.nodes[vertex_indices]) - set(forest.nodes())))
  File "/home/nlpm/packages/OmicsIntegrator2/venv/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 1700, in __getitem__
    result = getitem(key)
IndexError: arrays used as indices must be of integer (or boolean) type
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/nlpm/packages/OmicsIntegrator2/src/parameter_sweep.py", line 116, in <module>
    main()
  File "/home/nlpm/packages/OmicsIntegrator2/src/parameter_sweep.py", line 102, in main
    results = graph.grid_search_randomizations(args.prize_file, params)
  File "/home/nlpm/packages/OmicsIntegrator2/src/graph.py", line 561, in grid_search_randomizations
    results = pool.map(self._eval_randomizations, all_params)
  File "/net/dorsal/apps/python361/lib/python3.6/multiprocessing/pool.py", line 260, in map
    return self._map_async(func, iterable, mapstar, chunksize).get()
  File "/net/dorsal/apps/python361/lib/python3.6/multiprocessing/pool.py", line 608, in get
    raise self._value
IndexError: arrays used as indices must be of integer (or boolean) type

@natashapm did updated script work?

No, still didn't work - got the same error with the randomizations

Works for one parameter set during randomizations

@natashapm did we manage to resolve this?

Yes, that error was resolved. I might've come across another error, but I'll revisit it in the next couple of days. I need to fully debug my side of it.