Closed Ufungi closed 2 months ago
Hi, WITCH seemed to crash during the initial phase when performing decompositions into subsets and generating HMMs. From the look of the fatal error message:
Fatal exception (source file ../../src/p7_trace.c, line 165 realloc for size 262144 failed
It seems to be a memory issue when running HMMBuild.
This raises a good point for a QOL change to WITCH to sanity check if all HMMs are created correctly in the first phase (and if not, abort the task and notify the user). But to solve your issue, you can try one or more of the following:
-t 16
or -t 24
). Heavy parallelization without increasing available memory can easily be an issue.-A 10
by default) and an upper bound (-Z
, by default no upper bound), which says that we are going to decompose to subsets with numbers of sequences $X$, where $A\leq X\leq Z$. If your backbone (Type_UNITE_ref_DB_aligned.fasta.raxml.bestTree
in your case) is large, then the largest HMM will be on your entire set of input sequences and could have an impact on memory usage. Intuitively, a small $A$ and large $Z$ gives the best accuracy, but in experiments, the impact usually is negligible for the upper bound (e.g., setting $Z=1000$ should be sufficient).-t 16 & -Z 1000 options worked successfully! Thank you so much 😊
Glad it worked out!
I installed WITCH through pip on an independent conda environment in Ubuntu 20.04
(witch) genome@limsfep-zen-32c:/data/genome/run/snyoo/programs/appspam/Fungi$ python3 /data/genome/run/snyoo/programs/WITCH/witch.py \
***** Configurations ** home.path: /data/genome/run/snyoo/programs/WITCH/witch_msa/home.path main.config: /home/genome/.witch_msa/main.config
Decomposing the backbone tree... Running...: 72%|██████████████████▊ | 6750/9327 [04:37<01:47, 23.97it/s]Fatal exception (source file ../../src/p7_trace.c, line 165 realloc for size 262144 failed Running...: 73%|██████████████████▉ | 6778/9327 [04:38<01:42, 24.89it/s]Aborted (core dumped) Running...: 100%|██████████████████████████| 9327/9327 [06:30<00:00, 23.86it/s]
Performing all-against-all HMMSearches between the backbone and queries... Running...: 87%|███████████████▌ | 258526/298464 [3:51:46<2:11:32, 5.06it/s]WITCH-NG Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
concurrent.futures.process._RemoteTraceback: """ Traceback (most recent call last): File "/home/genome/anaconda3/envs/witch/lib/python3.12/concurrent/futures/process.py", line 263, in _process_worker r = call_item.fn(*call_item.args, **call_item.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/genome/run/snyoo/programs/WITCH/witch_msa/gcmm/algorithm.py", line 513, in subset_frag_chunk_hmmsearch res = evalHMMSearchOutput(hmmsearch_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/data/genome/run/snyoo/programs/WITCH/witch_msa/gcmm/algorithm.py", line 558, in evalHMMSearchOutput outfile = open(path, 'r') ^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: '/data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_0_0/hmmsearch.resu """
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/data/genome/run/snyoo/programs/WITCH/witch.py", line 5, in
witch_runner()
File "/data/genome/run/snyoo/programs/WITCH/witch_msa/init.py", line 40, in witch_runner
mainAlignmentProcess(args)
File "/data/genome/run/snyoo/programs/WITCH/witch_msa/gcmm/gcmm.py", line 152, in mainAlignmentProcess
hmmsearch_paths = search.search(lock, pool)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/genome/run/snyoo/programs/WITCH/witchmsa/gcmm/algorithm.py", line 298, in search
ret, , , = runTasks(func, pool, mytasks, len(subset_args),
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/genome/run/snyoo/programs/WITCH/witch_msa/gcmm/task.py", line 126, in runTasks
handle_runtime += handleFuture(future, success, ignored, retry,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/data/genome/run/snyoo/programs/WITCH/witch_msa/gcmm/task.py", line 76, in handleFuture
ret = future.result()
^^^^^^^^^^^^^^^
File "/home/genome/anaconda3/envs/witch/lib/python3.12/concurrent/futures/_base.py", line 449, in result
return self.get_result()
^^^^^^^^^^^^^^^^^^^
File "/home/genome/anaconda3/envs/witch/lib/python3.12/concurrent/futures/_base.py", line 401, in get_result
raise self._exception
FileNotFoundError: [Errno 2] No such file or directory: '/data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_0_0/hmmsearch.resu
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?
Error: File format problem in trying to open HMM file /data/genome/run/snyoo/programs/WITCH/results/Fungi/tree_decomp/root/A_00/hmmbuild.model.A File exists, but appears to be empty?