ebi-pf-team / interproscan

Genome-scale protein function classification
Apache License 2.0
302 stars 67 forks source link

Error while running singularity image #372

Closed Artifice120 closed 4 months ago

Artifice120 commented 4 months ago

Afternoon,

While running the following command :

singularity exec -B $PWD/interproscan-5.68-100.0/data/:/opt/interproscan/data  \
-B $PWD/output:/output \
-B $PWD/temp:/temp \
-B $PWD:/input interproscan_latest.sif /opt/interproscan/interproscan.sh \
--input /lustre/isaac/scratch/jtorre28/foxgloves/purged/purged2/BRAKER-arthro-busco/braker_aa \
--output-dir /output \
--tempdir /temp \
--cpu 16

I receive this error

Matches for any sequences that are not represented in the lookup service will be calculated locally.
16/07/2024 16:32:25:223 Uploaded 56435 unique sequences for analysis
16/07/2024 16:33:11:508 97% completed
2024-07-16 16:35:40,299 [amqEmbeddedWorkerJmsContainer-29] [uk.ac.ebi.interpro.scan.management.model.implementations.RunBinaryStep:199] ERROR - Command line failed with exit code: 1
Command: bin/hmmer/hmmer3/3.3/hmmsearch -Z 61295632 --cut_ga --cpu 1 -o /temp/il1340_20240716_163208285_7xlq//jobPfam/000000050001_000000055000.raw.out data/pfam/37.0/pfam_a.hmm /temp/il1340_20240716_163208285_7xlq//jobPfam/000000050001_000000055000.fasta
Error output from binary:

Error: File format problem in trying to open HMM file data/pfam/37.0/pfam_a.hmm.
Opened data/pfam/37.0/pfam_a.hmm.h3m, a pressed HMM file; but format of its .h3i file unrecognized

2024-07-16 16:35:40,305 [amqEmbeddedWorkerJmsContainer-29] [uk.ac.ebi.interpro.scan.jms.worker.LocalJobQueueListener:216] ERROR - Execution thrown when attempting to executeInTransaction the StepExecution.  All database activity rolled back.
java.lang.IllegalStateException: Command line failed with exit code: 1
Command: bin/hmmer/hmmer3/3.3/hmmsearch -Z 61295632 --cut_ga --cpu 1 -o /temp/il1340_20240716_163208285_7xlq//jobPfam/000000050001_000000055000.raw.out data/pfam/37.0/pfam_a.hmm /temp/il1340_20240716_163208285_7xlq//jobPfam/000000050001_000000055000.fasta
Error output from binary:

Error: File format problem in trying to open HMM file data/pfam/37.0/pfam_a.hmm.
Opened data/pfam/37.0/pfam_a.hmm.h3m, a pressed HMM file; but format of its .h3i file unrecognized

        at uk.ac.ebi.interpro.scan.management.model.implementations.RunBinaryStep.execute(RunBinaryStep.java:201) ~[interproscan-management-5.68-100.0.jar:?]
        at uk.ac.ebi.interpro.scan.jms.activemq.StepExecutionTransactionImpl.executeInTransaction(StepExecutionTransactionImpl.java:87) ~[interproscan-5.jar:?]
        at jdk.internal.reflect.GeneratedMethodAccessor92.invoke(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344) ~[spring-aop-5.2.24.RELEASE.jar:5.2.24.RELEASE]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198) ~[spring-aop-5.2.24.RELEASE.jar:5.2.24.RELEASE]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.2.24.RELEASE.jar:5.2.24.RELEASE]
        at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:367) ~[spring-tx-5.2.24.RELEASE.jar:5.2.24.RELEASE]
        at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118) ~[spring-tx-5.2.24.RELEASE.jar:5.2.24.RELEASE]
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.2.24.RELEASE.jar:5.2.24.RELEASE]
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212) ~[spring-aop-5.2.24.RELEASE.jar:5.2.24.RELEASE]
        at com.sun.proxy.$Proxy141.executeInTransaction(Unknown Source) ~[?:?]
        at uk.ac.ebi.interpro.scan.jms.worker.LocalJobQueueListener.onMessage(LocalJobQueueListener.java:200) [interproscan-5.jar:?]
        at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:761) [spring-jms-5.2.24.RELEASE.jar:5.2.24.RELEASE]
        at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:699) [spring-jms-5.2.24.RELEASE.jar:5.2.24.RELEASE]
        at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:674) [spring-jms-5.2.24.RELEASE.jar:5.2.24.RELEASE]
        at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:318) [spring-jms-5.2.24.RELEASE.jar:5.2.24.RELEASE]
        at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:257) [spring-jms-5.2.24.RELEASE.jar:5.2.24.RELEASE]
        at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1186) [spring-jms-5.2.24.RELEASE.jar:5.2.24.RELEASE]
        at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1176) [spring-jms-5.2.24.RELEASE.jar:5.2.24.RELEASE]
        at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1073) [spring-jms-5.2.24.RELEASE.jar:5.2.24.RELEASE]
        at java.lang.Thread.run(Thread.java:829) [?:?]
2024-07-16 16:35:40,311 [amqEmbeddedWorkerJmsContainer-29] [uk.ac.ebi.interpro.scan.jms.worker.LocalJobQueueListener:218] ERROR - The exception is :
2024-07-16 16:35:40,366 [amqEmbeddedWorkerJmsContainer-29] [uk.ac.ebi.interpro.scan.jms.worker.LocalJobQueueListener:222] ERROR - StepExecution with errors - stepName: stepPfamRunHmmer3
2024-07-16 16:35:40,773 [main] [uk.ac.ebi.interpro.scan.jms.master.StandaloneBlackBoxMaster:190] WARN - StepInstance 2252 is being re-run following a failure.

Not sure what is wrong since this is running within a container and I have access to the referenced folders.

Artifice120 commented 4 months ago

Think I found something. This seems to be the original sin.

Opened data/pfam/37.0/pfam_a.hmm.h3m, a pressed HMM file; but format of its .h3i file unrecognized

When I open pfam_a.hmm.h3i the file is blank; however the md5sum is ok.

interproscan-data-5.68-100.0.tar.gz: OK

Maybe a older version will have the file pair in whivh case will just use that one and change the version name

tgrego commented 4 months ago

the pressed files are not included in the tarballs, only the hmm files. You can recreate the pressed files by running: python3 setup.py -f interproscan.properties

Artifice120 commented 4 months ago

Unfortunate.

The interproscan.properties file is read-only in the container.

Is there a way to make a copy of the container that is editable?

Artifice120 commented 4 months ago

You are right that did create the pressed files. The program is running fine now.

Thanks.

EDIT: Ended up having to just run HMMpress on all of the data folder hmm files with a separate hmm installation since I kept having the same error for each hmm file in the data folder for whatever reason.

nthosar9846 commented 1 week ago

@Artifice120 Can you please explain how you resolved this error? I am running into the same issue while running

singularity exec -B /home/nthosar9846/tools/interproscan-5.71-102.0/data:/opt/interproscan/data -B /home/nthosar9846/esx_pe_ppe/interpro_input/:/input -B /home/nthosar9846/esx_pe_ppe/temp:/temp -B /home/nthosar9846/esx_pe_ppe/interpro_output:/output /home/nthosar9846/tools/interproscan_latest.sif /opt/interproscan/interproscan.sh --input /input/all_hypothetical_proteins.fasta --disable-precalc --output-dir /output --tempdir /temp --cpu 8

I get this error

Error: File format problem in trying to open HMM file data/pfam/37.0/pfam_a.hmm. Opened data/pfam/37.0/pfam_a.hmm.h3m, a pressed HMM file; but format of its .h3i file unrecognized

I followed the steps from the release notes to run interpro using singularity.

I downloaded interproscan-data-5.71-102.0.tar.gz but there is no setup.py in the data folder. Do I need to download the tarball binary files ?

nthosar9846 commented 1 week ago

I was able to run python3 setup.py -f interproscan.properties in the singularity shell, but how do I recreate the pressed files outside the shell?

Artifice120 commented 1 week ago

When I received that same error I checked the location

/home/nthosar9846/tools/interproscan-5.71-102.0data/pfam/37.0/ 

The directory did not have the .hmm version on the file.

I ended up installing the HMMpress program separately with conda

conda create -p path/to/new/env/name 
conda install -c bioconda hmmer
conda activate path/to/new/env/name

I then just went into the directory mentioned in the error and ran hmmpress command after removing the 3m files