Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: max() arg is an empty sequence #65

Open
sandravelascoc opened this issue Oct 3, 2024 · 1 comment
Open

ValueError: max() arg is an empty sequence #65

sandravelascoc opened this issue Oct 3, 2024 · 1 comment

Comments

@sandravelascoc
Copy link

sandravelascoc commented Oct 3, 2024

Hi, everyone:

I am running docker/singularity version of MitoHiFi with apptainer as:

apptainer run -C -B /home -B /project -B /scratch -W ${SLURM_TMPDIR} mitohifi.sif python3 /opt/MitoHiFi/src/mitohifi.py -c /home/velascoc/projects/def-strelkov/velascoc/HiFi/pggb/S16_OS00FE2B_DA230375_bc2089.p_ctg_prefixed.fa -f /home/velascoc/scratch/HiFi/MitoHiFi/P_brassicae_Mitochondrion_LS992577_1.fasta -g /home/velascoc/scratch/HiFi/MitoHiFi/P_brassicae_Mitochondrion_LS992577_1.gb -t 4 -o 4

However, I get the following error:

/opt/MitoHiFi/src/parallel_annotation.py:69: UserWarning: Contig S16#1#ptg000007c does not have an annotation file, check MitoFinder's log
  warnings.warn("Contig "+ contig_id + " does not have an annotation file, check MitoFinder's log")
Traceback (most recent call last):
  File "/opt/MitoHiFi/src/mitohifi.py", line 566, in <module>
    main()
  File "/opt/MitoHiFi/src/mitohifi.py", line 303, in main
    tRNA_ref = fetch.get_ref_tRNA()
  File "/opt/MitoHiFi/src/fetch.py", line 48, in get_ref_tRNA
    reference_tRNA = max(tRNAs, key=tRNAs.get)
ValueError: max() arg is an empty sequence
Program finished with exit code 1 at: Wed Oct  2 14:03:41 PDT 2024

The weird thing is that the command works perfectly with some .gb files and does not work with other .gb files. For example, using NC_034004 as a reference, I get the expected output files, while when I use LS992577, I get the error.

I know that the error is caused by mitofinder and is associated with the genome I am using as a reference. However, I don't know how to fix it. Does anyone have any idea?

I created the container as:
apptainer build mitohifi.sif docker://ghcr.io/marcelauliano/mitohifi:master

and the version is:

 apptainer shell mitohifi.sif
 Apptainer>  python3 /opt/MitoHiFi/src/mitohifi.py --version
 MitoHiFi 3.2.1
 
 Apptainer>/opt/MitoFinder/mitofinder --version
 MitoFinder version 1.4.1

Thanks
Sandra

@jiangxiuhan0310
Copy link

I have meet the same issue. Does anyone know how to fix this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants