stjude / CICERO

CICERO: a versatile method for detecting complex and diverse driver fusions using cancer RNA sequencing data.
https://stjude.github.io/CICERO
Other
35 stars 19 forks source link

Docker Error: Can't locate English.pm in @INC #91

Closed ztamura closed 2 years ago

ztamura commented 2 years ago

Hi - I've been trying to run Cicero with the Docker image provided here on GitHub, but I've been having some trouble.

Image Download

Because the High Performance Computing cluster I use does not allow Docker, I singularity pulled the docker image:

singularity pull docker://ghcr.io/stjude/cicero:v1.8.1

Minimal working example of error

This is the bash script I ran. I used the demo data provided here. (I've substituted my username with xxx)

#!/bin/bash

export LC_ALL=C
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8

singularity exec \
--bind /home/xxx/analysis/cicero/test-dataset/MV4_11,/home/xxx/ref/grch38/cicero-reference-genome,/home/xxx/analysis/cicero/src/run-cicero,/home/xxx/analysis/cicero/result \
/home/xxx/bin/cicero/v1.8.1/docker/cicero-v1.8.1.simg \
bash /home/xxx/analysis/cicero/src/run-cicero/test_cicero_singularity_runscript_2021-12-18.sh

The bash file /home/xxx/analysis/cicero/src/run-cicero/test_cicero_singularity_runscript_2021-12-18.sh contains:

#!/bin/bash

export PATH=/opt/conda/bin:/opt/cicero/src/bin:/opt/cicero/configs/genome:/opt/cicero/configs/app:$PATH

Cicero.sh \
-n 8 \
-b /home/xxx/analysis/cicero/test-dataset/MV4_11/MV4_11_RNAseq_1.bam \
-g GRCh38_no_alt \
-r /home/xxx/ref/grch38/cicero-reference-genome/reference/ \
-o /home/xxx/analysis/cicero/result/test/2021-12-18/MV4_11

This is what I get in my standard error stream:

exit: Error in ExtractSClips: numeric argument required

In addition, in one of the output files (01_ExtractSClips.err), I get this error message:

Can't locate English.pm in @INC (you may need to install the English module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /opt/cicero/src/bin/get_sc_cmds.pl line 8.

BEGIN failed--compilation aborted at /opt/cicero/src/bin/get_sc_cmds.pl line 8.

Can't locate English.pm in @INC (you may need to install the English module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /opt/cicero/src/bin/get_geneInfo.pl line 11.

BEGIN failed--compilation aborted at /opt/cicero/src/bin/get_geneInfo.pl line 11.

This error message suggests that the English perl module is missing in the Docker container, but is this the case? Is this because I am running the Docker image in Singularity?

I would very much appreciate any help.

adthrasher commented 2 years ago

English.pm is included in the docker image.

$ docker run --entrypoint bash -it ghcr.io/stjude/cicero:v1.8.1
root@0c03b6915ac4:/# find . -name 'English.pm'
./usr/local/perlbrew/perls/perl-5.10.1/lib/5.10.1/English.pm
./usr/local/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/Date/Language/English.pm

In the Docker container, the @INC should be set like this.

root@0c03b6915ac4:/# perl -e "print \"@INC\""
/opt/cicero/src/perllib /usr/local/perlbrew/perls/perl-5.10.1/lib/5.10.1/x86_64-linux /usr/local/perlbrew/perls/perl-5.10.1/lib/5.10.1 /usr/local/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1/x86_64-linux /usr/local/perlbrew/perls/perl-5.10.1/lib/site_perl/5.10.1 

Looking at the value included in your error message, I think your local environment is leaking into the singularity container.

I updated your wrapper script to include --containall on the Singularity command like

#!/bin/bash

export LC_ALL=C
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8

singularity exec \
--containall \
--bind /home/athrashe/tmp/cicero_test:/data \
--bind /home/athrashe/tmp/cicero_test/reference:/reference \
--bind /home/athrashe/tmp/cicero_test/output:/result \
/home/athrashe/tmp/cicero_test/cicero_v1.8.1.sif \
bash /data/test_cicero_singularity_runscript_2021-12-18.sh

I also had to set the PATH and PERL5LIB system variables manually in test_cicero_singularity_runscript_2021-12-18.sh. So it became

#!/bin/bash

export PATH=/opt/cicero/src/bin:/opt/conda/bin:/usr/local/perlbrew/perls/perl-5.10.1/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export PERL5LIB=/opt/cicero/src/perllib

Cicero.sh \
-n 8 \
-b /data/MV4_11_RNAseq_1.bam \
-g GRCh38_no_alt \
-r /reference \
-o /result

You may not need the explicit PATH and PERL5LIB setting, but in my environment, Singularity leaks host variables into the container, even with --containall set.