Murali-group / Beeline

BEELINE: evaluation of algorithms for gene regulatory network inference
GNU General Public License v3.0
171 stars 53 forks source link

Not able to run GENIE3 and GRNBOOST2 #46

Closed Zengggg closed 3 years ago

Zengggg commented 3 years ago

Hi, When I try to run GENIE3 and GRNBOOST, it outputs an error: AttributeError: 'DataFrame' object has no attribute 'to_numpy'. The command line output is as below:

(BEELINE) zengyp@ubuntu:~/Single_cell/1/Beeline-master$ python BLRunner.py --config config-files/config.yaml
Skipping PIDC
Skipping GRNVBEM
Skipping PPCOR
Skipping SCODE
Skipping SCNS
Skipping SINCERITIES
Skipping LEAP
Skipping GRISLI
Skipping SINGE
Skipping SCRIBE
<BLRun.BLRun object at 0x7f15d1eae240>
Evaluation started
docker run --rm -v /home/zengyp/Single_cell/1/Beeline-master:/data/ --expose=41269 arboreto:base /bin/sh -c "time -v -o data/outputs/example/GSD/GENIE3/time.txt python runArboreto.py --algo=GENIE3 --inFile=data/inputs/example/GSD/GENIE3/ExpressionData.csv --outFile=data/outputs/example/GSD/GENIE3/outFile.txt "
Traceback (most recent call last):
  File "runArboreto.py", line 43, in <module>
    main(sys.argv)
  File "runArboreto.py", line 32, in main
    network = genie3(inDF.to_numpy(), client_or_address = client, gene_names = inDF.columns)
  File "/opt/conda/lib/python3.6/site-packages/pandas/core/generic.py", line 3614, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'to_numpy'
docker run --rm -v /home/zengyp/Single_cell/1/Beeline-master:/data/ --expose=41269 arboreto:base /bin/sh -c "time -v -o data/outputs/example/GSD/GRNBOOST2/time.txt python runArboreto.py --algo=GRNBoost2 --inFile=data/inputs/example/GSD/GRNBOOST2/ExpressionData.csv --outFile=data/outputs/example/GSD/GRNBOOST2/outFile.txt "
Traceback (most recent call last):
  File "runArboreto.py", line 43, in <module>
    main(sys.argv)
  File "runArboreto.py", line 36, in main
    network = grnboost2(inDF.to_numpy(), client_or_address = client, gene_names = inDF.columns)
  File "/opt/conda/lib/python3.6/site-packages/pandas/core/generic.py", line 3614, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'to_numpy'
Traceback (most recent call last):
  File "BLRunner.py", line 79, in <module>
    main()
  File "BLRunner.py", line 73, in main
    evaluation.runners[idx].parseOutput()
  File "/home/zengyp/Single_cell/1/Beeline-master/BLRun/runner.py", line 90, in parseOutput
    OutputParser[self.name](self)
  File "/home/zengyp/Single_cell/1/Beeline-master/BLRun/genie3Runner.py", line 60, in parseOutput
    OutDF = pd.read_csv(outDir+'outFile.txt', sep = '\t', header = 0)
  File "/home/zengyp/anaconda3/envs/BEELINE/lib/python3.7/site-packages/pandas/io/parsers.py", line 678, in parser_f
    return _read(filepath_or_buffer, kwds)
  File "/home/zengyp/anaconda3/envs/BEELINE/lib/python3.7/site-packages/pandas/io/parsers.py", line 440, in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
  File "/home/zengyp/anaconda3/envs/BEELINE/lib/python3.7/site-packages/pandas/io/parsers.py", line 787, in __init__
    self._make_engine(self.engine)
  File "/home/zengyp/anaconda3/envs/BEELINE/lib/python3.7/site-packages/pandas/io/parsers.py", line 1014, in _make_engine
    self._engine = CParserWrapper(self.f, **self.options)
  File "/home/zengyp/anaconda3/envs/BEELINE/lib/python3.7/site-packages/pandas/io/parsers.py", line 1708, in __init__
    self._reader = parsers.TextReader(src, **kwds)
  File "pandas/_libs/parsers.pyx", line 384, in pandas._libs.parsers.TextReader.__cinit__
  File "pandas/_libs/parsers.pyx", line 695, in pandas._libs.parsers.TextReader._setup_parser_source
FileNotFoundError: File b'outputs/example/GSD/GENIE3/outFile.txt' does not exist
adyprat commented 3 years ago

This seems to be related to an earlier issue posted here: https://github.com/Murali-group/Beeline/issues/37 . Could you double check the pandas version inside the arboreto docker and post it here

adyprat commented 3 years ago

For reference the pandas version as set-up in the Docker should be 0.24; as in line no. 10 in https://github.com/Murali-group/Beeline/blob/master/Algorithms/ARBORETO/Dockerfile

Zengggg commented 3 years ago

Thanks for your help! I follow your instruction to change the pandas version, then it runs successfully. Thank you!