Hi Matt,
thank you for you quick response.
All the software I am using is updated, I just installed conda and downloaded HotNet2 a few days ago.
Yes, from makeNetworkFiles.py I traced back to the call nx.to_numpy_matrix.
About the commands, I can confirm I successfully ran both the original scripts and data, and new data as well. The issue comes up only with STRING network, which by the way was processed by the same script I used for the other new networks.
As you suggested, I ran with num_cores = 1, but lead to no difference.
Here are the script arguments:
hotnet2=/home/lorenzo/software/hotnet2-master
num_cores=1
num_network_permutations=50
num_heat_permutations=500
# Create network data.
python $hotnet2/makeNetworkFiles.py \
-e data/string/STRING_human_genesymbol_indices.txt \
-i data/string/STRING_genes_index.txt \
-nn string \
-p string \
-b 0.4 \
-o data/string/ \
-np $num_network_permutations \
-c $num_cores
And here is the output:
Creating PPR matrix for real network
--------------------------------------
* Creating HotNet2 diffusion matrix for beta=0.4...
./paper_commands.sh: line 20: 31546 Segmentation fault python $hotnet2/makeNetworkFiles.py -e data/string/STRING_human_genesymbol_indices.txt -i data/string/STRING_genes_index.txt -nn string -p string -b 0.4 -o data/string/ -np $num_network_permutations -c $num_cores
* Loading heat scores for 77 genes
Traceback (most recent call last):
File "/home/lorenzo/software/hotnet2-master/HotNet2.py", line 142, in <module>
run(get_parser().parse_args(sys.argv[1:]))
File "/home/lorenzo/software/hotnet2-master/HotNet2.py", line 69, in run
infmat, indexToGene, G, network_name = hnio.load_network(network_file, HN2_INFMAT_NAME)
File "/home/lorenzo/software/hotnet2-master/hotnet2/hnio.py", line 378, in load_network
H = load_hdf5(file_path)
File "/home/lorenzo/software/hotnet2-master/hotnet2/hnio.py", line 398, in load_hdf5
f = h5py.File(file_path, 'r')
File "/opt/anaconda3/envs/py2/lib/python2.7/site-packages/h5py/_hl/files.py", line 312, in __init__
fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr)
File "/opt/anaconda3/envs/py2/lib/python2.7/site-packages/h5py/_hl/files.py", line 142, in make_fid
fid = h5f.open(name, flags, fapl=fapl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 78, in h5py.h5f.open
IOError: Unable to open file (unable to open file: name = 'data/string/string_ppr_0.4.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
So you successfully could run the code on a larger network like this one?
Thank you
Lorenzo