ythuang0522 / homopolish

High-quality Nanopore-only genome polisher
GNU General Public License v3.0
65 stars 12 forks source link

FileNotFoundError: [Errno 2] No such file or directory: 'ANI.txt' #37

Closed chen1i6c04 closed 3 years ago

chen1i6c04 commented 3 years ago

Hi I ran the homopolish v0.3, display below error:

ERROR, skch::validateInputFiles, Count of query and ref genomes should be non-zero
Traceback (most recent call last):
  File "homopolish.py", line 58, in <module>
    main()
  File "homopolish.py", line 42, in main
    FLAGS.output_dir, FLAGS.minimap_args, FLAGS.mash_threshold, FLAGS.download_contig_nums, FLAGS.debug, FLAGS.meta, FLAGS.local_DB_path)
  File "/home/chen1i6c04/Tools/homopolish/modules/polish_interface.py", line 327, in polish_genome
    out = without_genus(out, assembly_name, output_dir_debug, mash_screen, assembly, model_path, sketch_path, genus_species, threads, output_dir, minimap_args, mash_threshold, download_contig_nums, debug, meta)
  File "/home/chen1i6c04/Tools/homopolish/modules/polish_interface.py", line 267, in without_genus
    download_path = download_action(ncbi_id, contig_output_dir,contig_name)
  File "/home/chen1i6c04/Tools/homopolish/modules/polish_interface.py", line 144, in download_action
    db_path = download.download(homologous_output_dir, ncbi_id, url_list,contig_name)       
  File "/home/chen1i6c04/Tools/homopolish/modules/download.py", line 216, in download
    ani.parseAni(out)
  File "/home/chen1i6c04/Tools/homopolish/modules/ani.py", line 31, in parseAni
    with open(db_txt,'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/media/NGS/Data_Analysis/20201221_hybrid_and_denovo/Denovo_AniFix/R20-0150/debug/contig_1/ANI.txt'

You use FastANI to calculate genome similarity, but FastANI will no output result if ANI value much below 80, perhaps it is reason.

Thanks

ythuang0522 commented 3 years ago

Thanks. Will fix it.

ythuang0522 commented 3 years ago

This sounds odd at the default setting as the initial Mash pulls genomes of ANI > 95% and subsequently filtered by FastANI. Can you confirm that this is rare species and FastANI has been build into the conda env? It would be great if we can have this genome for debugging.

chen1i6c04 commented 3 years ago

Hi No, my genome is not rare species. I check my genome sequence, this error appear on the short sequence about 6k bp. This error also appear on short sequence of other genome. No error on the complete genome.

ythuang0522 commented 3 years ago

Thanks. This is likely the source of error. We will push a fixed version soon. Thanks.

ythuang0522 commented 3 years ago

We have pushed a fix version. Now the program will continue polishing if FastANI fails to estimate the distance. Please see if this works in your case. Thanks.

chen1i6c04 commented 3 years ago

It can work, thank you.