Skip to content

ValueError: No records found in handle #366

@anhvu989

Description

@anhvu989

Hello,

I also encountered this issue with Panaroo version 1.6.0. I didn't have this issue before with the older version.

Traceback (most recent call last):
  File "/home/anhvtn/miniforge3/envs/panaroo/bin/panaroo", line 10, in <module>
    sys.exit(main())
  File "/home/anhvtn/miniforge3/envs/panaroo/lib/python3.9/site-packages/panaroo/__main__.py", line 559, in main
    generate_core_genome_alignment(G, temp_dir, args.output_dir,
  File "/home/anhvtn/miniforge3/envs/panaroo/lib/python3.9/site-packages/panaroo/generate_output.py", line 570, in generate_core_genome_alignment
    concatenate_core_genome_alignments(core_gene_names, output_dir, hc_threshold)
  File "/home/anhvtn/miniforge3/envs/panaroo/lib/python3.9/site-packages/panaroo/generate_output.py", line 389, in concatenate_core_genome_alignments
    alignment = AlignIO.read(alignments_dir + filename, "fasta")
  File "/home/anhvtn/miniforge3/envs/panaroo/lib/python3.9/site-packages/Bio/AlignIO/__init__.py", line 386, in read
    raise ValueError("No records found in handle") from None
ValueError: No records found in handle

I have look at the summary_statistics.txt file, and panaroo reported 4099 core genes
"
Core genes (99% <= strains <= 100%) 4099
Soft core genes (95% <= strains < 99%) 24
Shell genes (15% <= strains < 95%) 1099
Cloud genes (0% <= strains < 15%) 587
Total genes (0% <= strains <= 100%) 5809
"

I also looked at aligned_gene_sequences folder and saw alignments of 4123 genes.

I tried to generate msa again with

panaroo-msa -t 8 -o ./ -a core 

100%|████████████████████████████████████████████████████████████████████████████████████████████████████████| 4123/4123 [08:19<00:00,  8.25it/s]
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████| 4123/4123 [30:12<00:00,  2.27it/s]
Entropy threshold automatically set to 0.01.
3904.0 out of 4123 genes kept in filtered core genome

then it works, no error.

Could you please help solve this problem? Many thanks!

Originally posted by @anhvu989 in #120

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