RitchieLabIGH / IRFinder

MIT License
13 stars 10 forks source link

Error: which: no winflat in (list of PATHS) #2

Closed Floyd1229 closed 2 years ago

Floyd1229 commented 2 years ago

Hello,

I'm trying to run the analysisWithLowReplicates.pl Perl script for the differential intron retention analysis step for IRFinder. I'm getting the error that the winflat executable can't be found, even though the error message says it searches within the directory it is located in.

Any help would be appreciated. Thank you.

Here's my code:

[my_username]$ module load singularity-3.8.3-gcc-8.2.0-7y47d4c
[my_username]$ export SINGULARITY_BINDPATH=/PATH_TO_DIR/

[my_username]$ IRQUANTdir=/PATH_TO_IR_QUANTIFICATION
[my_username]$ DiffIRdir=/PATH_TO_DIFF_IR

[my_username]$ chmod u+x IRFinder-2.0-beta/bin/analysisWithLowReplicates.pl
[my_username]$ perl /PATH_TO_IRFINDER/bin/analysisWithLowReplicates.pl -A ${DiffIRdir}/pooled_P7_WT_male/IRFinder-IR-dir.txt ${IRQUANTdir}/P7_WT_male/Sample_*/IRFinder-IR-dir.txt -B ${DiffIRdir}/pooled_P7_HZ_male/IRFinder-IR-dir.txt ${IRQUANTdir}/P7_HZ_male/Sample_*/IRFinder-IR-dir.txt > WT-vs-HZ.txt

which: no winflat in (lists PATH directories here)
Searched at:
  /PATH_TO/IRFinder-2.0-beta/bin/util/winflat
  and on the PATH

[my_username]$ ls /PATH_TO/IRFinder-2.0-beta/bin/util/
adjust.R               
Build-BED-refs.sh      
gtf2bed-custom.pl   
IRFinder-BuildRefFromEnsembl  
warnings
bash_utils.sh          
deseq2.R               
IntronExclusion.pl  
Mapability                    
winflat
bed-to-intron+exon.pl  
generateReadsError.pl  
irfinder            
trim

[my_username]$ file /PATH_TO/IRFinder-2.0-beta/bin/util/_
/PATH_TO/IRFinder-2.0-beta/bin/util/winflat: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.2.0, BuildID[sha1]=d6dd1fc0faced7fa41f162f89a31fd1d78ab434d, not stripped

Additional Info: OS distro and version: 3.10.0-957.1.3.el7.x86_64 Singularity: 3.8.3 IRFinder: 2.0.0 Bedtools: 2.27.1 GCC: 4.8.5 20150623 (Red Hat 4.8.5-36) GLIBC: 2.17 Perl: perl 5, version 26, subversion 2 (v5.26.2) built for x86_64-linux-thread-multi Samtools: samtools 1.9, Using htslib 1.9

CloXD commented 2 years ago

Hello Floyd, the issue is that you are not using the singularity image to run the perl script. You can do it using:

singularty shell $singularity_image
/IRFinder/bin/analysisWithLowReplicates.pl -A  .... 

or

singularity exec $singularity_image /IRFinder/bin/analysisWithLowReplicates.pl -A ....

I hope this will solve your issue.

Cheers, Claudio

Floyd1229 commented 2 years ago

Hi Claudio,

I tried both commands, and I got the same error message:

FATAL: could not open image /PATH_TO_IRFINDER/bin/analysisWithLowReplicates.pl: image format not recognized

Do I have to build a separate perl through singularity in order for this to work?

CloXD commented 2 years ago

Hi Floyd, sorry, I should have specified that the variable $singularity_image is where your singularity image is on your disk. For example:

singularity exec /home/floyd/images/IRFinder .... 

I usually assign it to a variable ( $singularity_image or $simg ) at the beginning of a script for convenience. Cheers, Claudio

Floyd1229 commented 2 years ago

Hi Claudio,

I followed your instructions, and still got error messages:

WARNING: passwd file doesn't exist in container, not updating
WARNING: group file doesn't exist in container, not updating
FATAL:   permission denied

After some searching, I think I found the issue? I created the IRFinder image via

singularity build -F ./IRFinder/IRFinder docker://cloxd/irfinder:2.0

but when I look at the files that are downloaded, there's only one IRFinder SIF file. I don't get the IRFinder/bin folder that contains the analysisWithLowReplicates.pl or analysisWithNoReplicates.pl scripts. I tried downloading the analysisWithLowReplicates.pl file separately and adding it to the IRFinder folder, but singularity doesn't seem to like that.

Am I missing something? Thank you for your help.

CloXD commented 2 years ago

Hello Taylor, all the binary files are inside the image (sif file), so don't warry about that. Can you show me the command that you gave?

Floyd1229 commented 2 years ago

Sure thing:

[my_username]$ module load singularity-3.8.3-gcc-8.2.0-7y47d4c 
[my_username]$ export SINGULARITY_BINDPATH=/PATH_TO_OUTPUT_DIR

[my_username]$ DiffIRdir=/PATH_TO_DIFF_IR
[my_username]$ IRQUANTdir=/PATH_TO_IR_QUANTIFICATION
[my_username]$ simg=/PATH_TO_IRFINDER_DIR

I then tried the following for the analysisWithLowReplicates.pl command using singularity exec or singularity shell:

[my_username]$ singularity exec $simg /PATH_TO_IRFINDER_DIR/bin/analysisWithLowReplicates.pl -A ${DiffIRdir}/REF/pooled_P7_WT_male/IRFinder-IR-dir.txt ${IRQUANTdir}/REF/P7_WT_male/*_merged.fastq.gz/IRFinder-IR-dir.txt -B ${DiffIRdir}/REF/pooled_P7_HZ_male/IRFinder-IR-dir.txt ${IRQUANTdir}/REF/P7_HZ_male/*_merged.fastq.gz/IRFinder-IR-dir.txt > ${DiffIRdir}/diff_IR_method2_WT-vs-HZ.txt

WARNING: passwd file doesn't exist in container, not updating
WARNING: group file doesn't exist in container, not updating
FATAL:   stat /PATH_TO_IRFINDER_DIR/bin/analysisWithLowReplicates.pl: no such file or directory

[my_username]$ singularity exec $simg /PATH_TO_IRFINDER_DIR/IRFinder/bin/analysisWithLowReplicates.pl -A ${DiffIRdir}/REF/pooled_P7_WT_male/IRFinder-IR-dir.txt ${IRQUANTdir}/REF/P7_WT_male/*_merged.fastq.gz/IRFinder-IR-dir.txt -B ${DiffIRdir}/REF/pooled_P7_HZ_male/IRFinder-IR-dir.txt ${IRQUANTdir}/REF/P7_HZ_male/*_merged.fastq.gz/IRFinder-IR-dir.txt > ${DiffIRdir}/diff_IR_method2_WT-vs-HZ.txt

WARNING: passwd file doesn't exist in container, not updating
WARNING: group file doesn't exist in container, not updating
FATAL:   stat /PATH_TO_IRFINDER_DIR/IRFinder/bin/analysisWithLowReplicates.pl: not a directory
CloXD commented 2 years ago

Hi, the simg should be the image you downloaded from github and the binary is from the location inside the singularity image ( so /IRFinder/bin/analysisWithLowReplicates.pl ). For example:

wget https://github.com/RitchieLabIGH/IRFinder/releases/download/v2.0/IRFinder
singularity exec ./IRFinder /IRFinder/bin/analysisWithLowReplicates.pl -A ${DiffIRdir}/REF/pooled_P7_WT_male/IRFinder-IR-dir.txt ${IRQUANTdir}/REF/P7_WT_male/*_merged.fastq.gz/IRFinder-IR-dir.txt -B ${DiffIRdir}/REF/pooled_P7_HZ_male/IRFinder-IR-dir.txt ${IRQUANTdir}/REF/P7_HZ_male/*_merged.fastq.gz/IRFinder-IR-dir.txt > ${DiffIRdir}/diff_IR_method2_WT-vs-HZ.txt

Indeed, if you login in the image shell with

singularity shell ./IRFinder 
Singularity> ls /IRFinder/
REF  bin  install.sh  src
Singularity> ls /IRFinder/bin
AdaptorDetect.pl     IRFinderBuildRefDownload     IRFinderLong
DESeq2Constructor.R  IRFinderBuildRefFromSTARRef  TrimBAM4IGV
IRFinder         IRFinderBuildRefProcess      analysisWithLowReplicates.pl
IRFinderBAM      IRFinderDiff         analysisWithNoReplicates.pl
IRFinderBuildRef     IRFinderFastQ        util
Singularity> 

you can see the files inside the image and get in touch with singularity ;) Cheers, Claudio

Floyd1229 commented 2 years ago

Hi,

Ok thank you so much for this! It worked. This is admittedly my first time using Singularity, so the concept of an image and accessing it was hard to get around, even with the tutorials.

Here's the code I executed:

[my_username]$ singularity exec /PATH_TO_IRFINDER_DIR/IRFinder /IRFinder/bin/analysisWithLowReplicates.pl -A ${DiffIRdir}/REF/pooled_P7_WT_male/IRFinder-IR-dir.txt ${IRQUANTdir}/REF/P7_WT_male/*_merged.fastq.gz/IRFinder-IR-dir.txt -B ${DiffIRdir}/REF/pooled_P7_HZ_male/IRFinder-IR-dir.txt ${IRQUANTdir}/REF/P7_HZ_male/*_merged.fastq.gz/IRFinder-IR-dir.txt > ${DiffIRdir}/diff_IR_method2_WT-vs-HZ.txt
CloXD commented 2 years ago

Awesome, no problem. The more you'll use singularity, the more you'll like it! I'm glad it worked. Cheers, Claudio