ythuang0522 / homopolish

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

NameError: name 'TextColor' is not defined #29

Closed mmsrand closed 2 years ago

mmsrand commented 3 years ago

Hello, when I am using the bacteria template (-s bacteria.msh) as a parameter, the pipeline is working but when I try to specify the genus, this error below occurs. I am new to Unix and therefore ask if this is a problem of the code or if I can do something to avoid this error? Thank you.

[2021/04/21 13:49] INFO: Stage: Select closely-related genomes and download Genus: bordetella_pertussis Traceback (most recent call last): File "/home/martina/Downloads/homopolish-master/homopolish.py", line 55, in main() File "/home/martina/Downloads/homopolish-master/homopolish.py", line 41, 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/martina/Downloads/homopolish-master/modules/polish_interface.py", line 314, in polish_genome out = genus_species_polish(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/martina/Downloads/homopolish-master/modules/polish_interface.py", line 219, in genus_species_polish ncbi_id, url_list = download.parser_genus_species(genus_species, download_contig_nums) File "/home/martina/Downloads/homopolish-master/modules/download.py", line 187, in parser_genus_species sys.stderr.write(TextColor.PURPLE + "Closely-related genomes less than 5, not to polish...\n" + TextColor.END) NameError: name 'TextColor' is not defined

ythuang0522 commented 3 years ago

Hi, i saw two issues here. The first is a bug of missing the TextColor module, which we will push a fixed version later. The main issue seems the lack of genomes of the same genus in NCBI. You may have to double check if the genus/species name typed matches that in the NCBI. Then check if the number of genomes under the same genus are sufficient (>5).

ythuang0522 commented 2 years ago

The color module bug has been resolved.