Murali-group / Beeline

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

Issues with Beeline on Fedora 27 #51

Open niclaspopp opened 3 years ago

niclaspopp commented 3 years ago

Hi all, I'm trying to run the latest iteration of Beeline using the pre-build Docker container on a Linux Server running Fedora 27. Unfortunately, I'm still running into a few errors even when trying the simple example "GSD" provided in the repository. First off, from Genie3 and GRNBoost2, i.e. the arboreto Docker, container I'm getting the following error:

docker run --rm -v /localscratch/home/ies/niclas.popp/BEELINE:/data/ --expose=41269 grnbeeline/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 " docker: Error response from daemon: linux spec user: unable to find user root: no matching entries in passwd file. docker run --rm -v /localscratch/home/ies/niclas.popp/BEELINE:/data/ --expose=41269 grnbeeline/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 " docker: Error response from daemon: linux spec user: unable to find user root: no matching entries in passwd file. ERRO[0000] error waiting for container: context canceled

We already tried this but could not resolve the problem. Also the output file "rankedEdges.csv" is not produced for some of the remaining algorithms (Scode, Sincerities, Leap, Grisli, Singe and Scribe) when running the config file provided in the repository and therefore the evaluation afterwards fails.

Any help from your side on how to fix this would be greatly appreciated, thank you very much in advance!

ktakers commented 3 years ago

Hello @niclaspopp , thank you for using BEELINE. Unfortunately, I wasn't able to reproduce the docker error in my environment. This appears to be an issue with specific docker images and versions.

For troubleshooting, could you please provide your docker --version ? Also, did you download the grnbeeline/arboreto:base image using docker pull grnbeeline/arboreto:base or build it using ./initialize.sh ?

To clarify, by trying https://forums.docker.com/t/unable-to-find-user-root-no-matching-entries-in-passwd-file/26545 you mean that you have run service docker restart ?

There is another suggested workaround to add --user 0 to the docker commands at https://github.com/Murali-group/Beeline/blob/master/BLRun/genie3Runner.py#L40-L42 and https://github.com/Murali-group/Beeline/blob/master/BLRun/grnboost2Runner.py#L36-L39 to reference the root user by UID. Could please try this and let us know if it resolves the issue? I have not been able to reproduce the error in order test this solution myself.

I don't think the related issue discussed in the forum with the --user option for users not already built into the image, or the other workaround docker stop <container>; docker start <container> apply in this case.

Regarding the missing rankedEdges.csv output files for other algorithms, does python BLRunner.py --config config-files/config.yaml exit after the docker error, or are there additional errors following the docker run ... commands for other algorithms? If so could you please provide the python BLRunner.py --config config-files/config.yaml output for other algorithms?

niclaspopp commented 3 years ago

Thanks a lot for the quick response - much appreciated!

After adding --user 0 to the Docker and switching to the locally build Docker image, both GRNBoost2 and Genie3 seem to run fine (apart from the error mentioned in #48 which is apparently unrelated to the previous problem).

After some investigation I think that the pipeline always stops when performing the inference with SCODE. It seems that some of the files necessary for the inference are created as read-only for non-root users. Since the user running the pipeline on the server doesn't have root privileges the pipeline then stops at that point. The related command and error look like this: (ER/ER_25_100_2 is the folder containing the gene expression data)

Evaluation started
docker run --rm -v /localscratch/home/ies/niclas.popp/BEELINE:/SCODE/data/  grnbeeline/scode:base /bin/sh -c "time -v -o data/outputs/ER/ER_25_100_2/SCODE/time0.txt ruby run_R.rb data/inputs/ER/ER_25_100_2/SCODE/ExpressionData0.csv data/inputs/ER/ER_25_100_2/SCODE/PseudoTime0.csv data/outputs/ER/ER_25_100_2/SCODE/0 25 10 49900 1000 6 "
mkdir: cannot create directory ‘data/outputs/ER/ER_25_100_2/SCODE/0’: File exists

Is there any way to fix this?

adyprat commented 3 years ago

I'm trying to understand the issue with SCODE here: Is the permission issue arising within Docker? If so, have you tried removing the SCODE folder from the ouputs before running the algorithm? As far as I remember the mkdir command is run as a system command (see the source code here)) and if the folder exists it should not affect the rest of the code.

If the SCODE errors out in the parseOutput() (after docker is done running the algorithm) then perhaps it is the user privileges to the outputs written by Docker. Not sure if this would work but running chmod on the output folder as the first step in the parseOutput() function might resolve it (before line 90)

niclaspopp commented 3 years ago

The algorithm is started without an existing SCODE folder in the outputs directory, so the ‘data/outputs/ER/ER_25_100_2/SCODE/0’ folder which produces the error is created correctly but it is impossible to manually remove it afterwards (the error starts like this: rm: cannot remove 'SCODE/0/out_2/RSS.txt': Permission denied).

Just to clarify since I couldn't get it to work: How exactly would you suggest running chmod in parseOutput()? Thanks again for your quick responses!