Skip to content

Errors when running test MrHAMER2 installation #1

Description

@bioinfo123

Hi,
I got the error after I installed MrHAMER2 and ran the test.
Any suggestions? Thanks.

To test if the installation was successful run:
conda activate MrHAMER2
snakemake -j 4 --configfile config.yml

Errors:
[Mon Sep 30 17:45:01 2024]
Finished job 7.
6 of 17 steps (35%) done
Select jobs to execute...

[Mon Sep 30 17:45:01 2024]
rule polish_clusters:
input: MrHAMER2_test/clustering/Env/clusters_fa, MrHAMER2_test/clustering/Env/smolecule_clusters.fa
output: MrHAMER2_test/fasta/Env_consensus_tmp, MrHAMER2_test/fasta/Env_consensus.bam, MrHAMER2_test/fasta/Env_consensus.fasta
jobid: 6
reason: Missing output files: MrHAMER2_test/fasta/Env_consensus.fasta; Input files updated by another job: MrHAMER2_test/clustering/Env/smolecule_clusters.fa, MrHAMER2_test/clustering/Env/clusters_fa
wildcards: name=MrHAMER2_test, target=Env
threads: 4
resources: tmpdir=/tmp

[Mon Sep 30 17:47:28 2024]
Error in rule polish_clusters:
jobid: 6
input: MrHAMER2_test/clustering/Env/clusters_fa, MrHAMER2_test/clustering/Env/smolecule_clusters.fa
output: MrHAMER2_test/fasta/Env_consensus_tmp, MrHAMER2_test/fasta/Env_consensus.bam, MrHAMER2_test/fasta/Env_consensus.fasta
shell:

    rm -rf MrHAMER2_test/fasta/Env_consensus_tmp
    medaka smolecule --threads 4 --length 50 --min_depth 2 --model ./test_files/r1041_e82_400bps_sup_v4.2.0_model.tar.gz --method racon --qualities MrHAMER2_test/fasta/Env_consensus_tmp MrHAMER2_test/clustering/Env/smolecule_clusters.fa 2> MrHAMER2_test/fasta/Env_consensus.bam_smolecule.log
    cp MrHAMER2_test/fasta/Env_consensus_tmp/consensus.fastq MrHAMER2_test/fasta/Env_consensus.fasta
    cp MrHAMER2_test/fasta/Env_consensus_tmp/subreads_to_spoa.bam MrHAMER2_test/fasta/Env_consensus.bam && cp MrHAMER2_test/fasta/Env_consensus_tmp/subreads_to_spoa.bam.bai MrHAMER2_test/fasta/Env_consensus.bam.bai
    
    (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Removing output files of failed job polish_clusters since they might be corrupted:
MrHAMER2_test/fasta/Env_consensus_tmp
Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
Complete log: .snakemake/log/2024-09-30T174454.718555.snakemake.log

===============
I looked at the log file "../MrHAMER2/MrHAMER2_test/fasta/Env_consensus.bam_smolecule.log" shows the following error.

[17:47:27 - POAManager] Created 0 consensus with 0 alignments.
[17:47:27 - Smolecule] Writing medaka input bam for 0 reads.
[17:47:27 - Smolecule] Running medaka consensus.
[17:47:27 - Predict] Reducing threads to 2, anymore is a waste.
[17:47:27 - Predict] It looks like you are running medaka without a GPU and attempted to set a high number of threads. We have scaled this down to an optimal number. If you wish to improve performance please see https://nanoporetech.github.io/medaka/installation.html#improving-parallelism.
[17:47:27 - Predict] Setting tensorflow inter/intra-op threads to 2/1.
concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/home/ppham/.conda/envs/MrHAMER2/lib/python3.8/concurrent/futures/process.py", line 239, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/home/ppham/.conda/envs/MrHAMER2/lib/python3.8/site-packages/medaka/prediction.py", line 119, in predict
bam_regions = medaka.common.get_bam_regions(
File "/home/ppham/.conda/envs/MrHAMER2/lib/python3.8/site-packages/medaka/common.py", line 706, in get_bam_regions
with pysam.AlignmentFile(bam) as bam_fh:
File "pysam/libcalignmentfile.pyx", line 747, in pysam.libcalignmentfile.AlignmentFile.cinit
File "pysam/libcalignmentfile.pyx", line 996, in pysam.libcalignmentfile.AlignmentFile._open
ValueError: file has no sequences defined (mode='r') - is it SAM/BAM format? Consider opening with check_sq=False
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/home/ppham/.conda/envs/MrHAMER2/bin/medaka", line 8, in
sys.exit(main())
File "/home/ppham/.conda/envs/MrHAMER2/lib/python3.8/site-packages/medaka/medaka.py", line 724, in main
args.func(args)
File "/home/ppham/.conda/envs/MrHAMER2/lib/python3.8/site-packages/medaka/smolecule.py", line 472, in main
_ = fut.result()
File "/home/ppham/.conda/envs/MrHAMER2/lib/python3.8/concurrent/futures/_base.py", line 444, in result
return self.__get_result()
File "/home/ppham/.conda/envs/MrHAMER2/lib/python3.8/concurrent/futures/_base.py", line 389, in __get_result
raise self._exception
ValueError: file has no sequences defined (mode='r') - is it SAM/BAM format? Consider opening with check_sq=False

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions