MitoFinder
MitoFinder copied to clipboard
ValueError: max() arg is an empty sequence
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