MetazoaPhylogenomicsLab / FANTASIA

GNU General Public License v3.0
20 stars 1 forks source link

error fetching image #1

Open DiegoSafian opened 6 months ago

DiegoSafian commented 6 months ago

Hi,

Congrats on developing this great tool! I want to test it but I got this error while trying to pull the image:

singularity pull --arch amd64 library://gemma.martinezredondo/fantasia/fantasia:undefined
FATAL:   While pulling library image: error fetching image: image does not exist in the library: gemma.martinezredondo/fantasia/fantasia:undefined (amd64)
singularity pull library://gemma.martinezredondo/fantasia/fantasia
FATAL:   While pulling library image: error fetching image: image does not exist in the library: gemma.martinezredondo/fantasia/fantasia:latest (amd64)

Can you help me?? Thanks Diego

gmartinezredondo commented 6 months ago

Hi, Diego!

Try the following:

singularity pull --arch amd64 library://gemma.martinezredondo/fantasia/fantasia:sha256.008720e1258e82f9461045fbc4996631bc6251f18a121c4f611f0637eaf68f5f
DiegoSafian commented 6 months ago

HI,

Yes, it worked! thanks Diego

DiegoSafian commented 6 months ago

Hi again, Sorry I keep bothering here. I try to run it like:

#!/bin/bash
#SBATCH --job-name=fatnasia

ml purge
ml Singularity

singularity exec /camp/home/user/bin/fantasia_sha256.008720e1258e82f9461045fbc4996631bc6251f18a121c4f611f0637eaf68f5f.sif ./fantasia --infile sps.pp.fasta --outpath ./ --prefix sps

But I keep getting this:

source: open /camp/home/user/activate: no such file or directory
FATAL:   stat /camp/home/user/fantasia: no such file or directory
gmartinezredondo commented 6 months ago

Hi, Diego!

Could you try executing it like this?

./fantasia --infile sps.pp.fasta --outpath ./ --prefix sps

With fantasia being the image you downloaded

DiegoSafian commented 6 months ago

Hi again, I tried:

singularity exec /camp/home/user/fantasia_sha256.008720e1258e82f9461045fbc4996631bc6251f18a121c4f611f0637eaf68f5f.sif --infile ./sps_pp.dr.fasta --outpath ./ --prefix sps

But I still getting a similar error:

source: open /camp/home/user/activate: no such file or directory
FATAL:   "--infile": executable file not found in $PATH

I am traying to run in a cluster(slurm). Can be this the problem?

When I pull the image , I got two wornings:

singularity pull --arch amd64 library://gemma.martinezredondo/fantasia/fantasia:sha256.008720e1258e82f9461045fbc4996631bc6251f18a121c4f611f0637eaf68f5f
INFO:    Using cached image
WARNING: integrity: signature object 5 not valid: openpgp: unsupported feature: unknown critical signature subpacket type 33
WARNING: Skipping container verification
gmartinezredondo commented 6 months ago

Hi!

You don't need to call singularity exec to run it. Just typing this should work:

./fantasia --infile sps.pp.fasta --outpath ./ --prefix sps

I believe the warning you get when you pull the image is related to checking the integrity of the digital signature of the image and should not affect.

DiegoSafian commented 6 months ago

Hi, Sorry to ask to many questions. It apper that my fasta cannot be read by fantasia as I am getting this error:

head: cannot open 'bifurca_pp.dr.fasta' for reading: No such file or directory
sed: can't read bifurca_pp.dr.fasta: No such file or directory

 ######   ##   #    # #####   ##    ####  #   ##   
 #       #  #  ##   #   #    #  #  #      #  #  #  
 #####  #    # # #  #   #   #    #  ####  # #    # 
 #      ###### #  # #   #   ######      # # ###### 
 #      #    # #   ##   #   #    # #    # # #    # 
 #      #    # #    #   #   #    #  ####  # #    # 

FANTASIA (Functional ANnoTAtion based on embedding space SImilArity)

Generating input and configuration files...

Fatal Error:
Failed to open the database file
Program halted !!

================================================================
Program: CD-HIT, V4.8.1 (+OpenMP), Apr 07 2021, 10:57:21
Command: cd-hit -i bifurca_pp.dr.fasta -o
         bifurca_pp.dr_cdhit100.pep -c 1

Started: Fri Mar 15 12:07:21 2024
================================================================
                            Output                              
----------------------------------------------------------------
>> Opening FASTA file...
Failed to open bifurca_pp.dr_cdhit100.pep
mv: cannot stat 'bifurca_pp.dr_cdhit100.pep.out': No such file or directory
awk: cannot open bifurca_pp.dr_cdhit100_oneline.pep (No such file or directory)
grep: bifurca_pp.dr_cdhit100.pep: No such file or directory
[E::stk_subseq] failed to open the input file/stream
Input files can be found in /camp/home/safiand/
Configuration files can be found in /camp/home/safiand/config_files/
grep: bifurca_pp.dr.fasta: No such file or directory
  File "<string>", line 1
    import os; print(4.4 + 0.0021 * )
                                    ^
SyntaxError: invalid syntax
Initiating GO annotation prediction using ProtT5 model. Estimated memory usage of  G
2024-03-15 12:07:42.152936: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /.singularity.d/libs
2024-03-15 12:07:42.157539: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
2024-03-15 12:08:12,320 INFO Created the prefix directory bifurca_prott5
2024-03-15 12:08:12,323 INFO Created the file bifurca_prott5/input_parameters_file.yml
2024-03-15 12:08:12,370 INFO Created the file bifurca_prott5/sequences_file.fasta
2024-03-15 12:08:12,427 INFO Created the file bifurca_prott5/mapping_file.csv
2024-03-15 12:08:12,429 INFO Created the file bifurca_prott5/remapped_sequences_file.fasta
2024-03-15 12:08:12,449 INFO Created the stage directory bifurca_prott5/bifurca_prott5_embeddings
2024-03-15 12:08:12,453 INFO Created the file bifurca_prott5/bifurca_prott5_embeddings/input_parameters_file.yml

My fasta look like this:

>g12882-T1 gene=g12882 seq_id=LG2_scaffold_1 type=cds
MMALPLHFFCHVVFLLQPYVMNTADGGAYYGPKPPPQQQPQPIPQYSDDFPQQQFLGNEM
PHSPFSKGIPSLSQYGKDAPQLPVPLQIGKIRPLTKGKGQTFPRGSKGPFPVPGGKGFTD
GQGIEGPPGPVGPPGPQGPSGLPGQGIPGSPGKPGPPGPQGYRGNGKPGIQGFPGKPGGP
GLPGAKGDLGPIGGQGPTGLPGPPGLPGPTGLPGISKSGGQGLPGLPGQPGEPGQNGPPG
FPGPQGLEGDKGLGLPGFPGVNGPGGPPGPPGQVGLPGNGKPGLNGVPGQPGFPGKPGPP
GEAGLVGAPGQRGQPGRPGVPGIGKPGKDGVRGLPGFSGGKGEPGPPGLIGPPGLPGYGK
TGFPGPKGHKGHAGLPGQPGPKGVKGQVGQPGVIGLTGLTGIPGAPGPTGPSGSFGFPGQ
KGEDGTFGPRGNPGMKGETGPPGLSGQPGRPGEGGQLGQRGFQGPIGPKGEAGPIGLPGA
PGAAGLQGPRGEGGESGNKGQPGPQGIPGLTGPGGPIGPPGRPGQKGETGPTGNHGYPGN
GTPGTPGEIGPQGNPGPSGPPGLPGQPGPPGPPGPPGIPAESPDIIQFLPHTGPYNGQGY
IKPGNGVEISGTMQQIPTFTSKLTNPFPLVGSPITFDKLLHNGNQDYNPQNGIFTCSIPG
IYYFAYHIHCKGGNVWVALMKNSEPIMYTYDEYKKGFLDQASGSAILPLRKGDTVHIELP
SDQAAGLYAGEYVHSTFSGYLLYLM*
>g12883-T1 gene=g12883 seq_id=LG2_scaffold_1 type=cds
MASRAGPRASGTDGSDFQHRERVASHYQMSVALKSEIRKLNIVHVLIWVLMAAQVTVSQL
SLVSHKVVASPYQWEYPYLLSIVPTVFSFMALPRNNISYLVISMISAGLFCVAPLIYGGM
EMFPVAQQLYRHGKAYRFIFGFSAVSVMYLVIIISVQVHAWQIYYSKKLLDQWFTTTQDK
KKK*
gmartinezredondo commented 6 months ago

I have created a file with the two sequences and it works for me. It looks like a problem with the path to the input file. Which is the command you have used?

DiegoSafian commented 6 months ago

I have tried two options:

./fantasia.sif --infile sps.pp.fasta --outpath ./ --prefix sps (with sps.pp.fasta in the folder where I run the bash job ) and ./fantasia.sif --infile FULL_PATH/sps.pp.fasta --outpath FULL_PATH --prefix sps

All the empty output have been created in a different directory (home) an not in the COMPLETE_PATH. It might be the case that FANTASIA is taking checking my home directory instead the dir I provideed??

I am attaching the log. fatnasia.txt

gmartinezredondo commented 6 months ago

All the empty output have been created in a different directory (home) an not in the COMPLETE_PATH. It might be the case that FANTASIA is taking checking my home directory instead the dir I provided??

That could be. I've been told that some days ago and I'm trying to figure out why this may happen in some cases and how to fix it

DiegoSafian commented 5 months ago

Hi, I am wondering if the issue with the paths has been fixed or have found a way to solve it.

gmartinezredondo commented 5 months ago

Hi! I'm still working on it. I can only think of running it from your home directory.

DiegoSafian commented 5 months ago

yes... that might be a temporary solution. The problem is that I only have 5G in my home directory. Is the error a concern for the analysis?

Initiating GO annotation prediction using ProtT5 model. Estimated memory usage of 58.13269999999999 G
2024-04-09 08:40:42.286307: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /.singularity.d/libs
gmartinezredondo commented 5 months ago

Yes... that might be a temporary solution. The problem is that I only have 5G in my home directory. The estimated memory usage prediction refers to the RAM used during the execution. It may need more than predicted but is a starting point when asking for resources in a cluster. It is not related to disk space.

Is the error a concern for the analysis? If the output files are generated, you can safely ignore it. There will always be an error related to cuda when executing singularity but it does not influence the inference.