UnboundLocalError: local variable 'level_num' referenced before assignment
Opened this issue · 3 comments
Traceback (most recent call last):
File "/share/soft/BASALT_script/BASALT", line 141, in
BASALT_main_c(assembly_list, datasets, num_threads, lr_list, hifi_list, hic_list, eb_list, ram, continue_mode, functional_module, autobining_parameters, refinement_paramter, max_ctn, min_cpn, pwd, QC_software)
File "/share/soft/BASALT_script/BASALT_main_c.py", line 509, in BASALT_main_c
Contig_retrieve_within_group_main(best_binset_after_contig_retrieve, outlier_remover_folder, num_threads, continue_mode, cpn_cutoff, ctn_cutoff, assembly_mo_list, connections_list, coverage_matrix_list)
File "/share/soft/BASALT_script/S7_Contigs_retrieve_within_group_checkm.py", line 1919, in Contig_retrieve_within_group_main
Contig_retrieve_within_group(assemblies_list, binset, outlier_remover_folder, PE_connections_list, num_threads, last_step, coverage_matrix_list, pwd, cpn_cutoff, ctn_cutoff)
File "/share/soft/BASALT_script/S7_Contigs_retrieve_within_group_checkm.py", line 1655, in Contig_retrieve_within_group
os.system('mv *filtrated_bin_connecting_contigs'+str(level_num)+'.txt *eliminated_bin_connecting_contigs'+str(level_num)+'.txt '+binset+'retrieved'+str(level_num))
UnboundLocalError: local variable 'level_num' referenced before assignment
Please update the BASALT script and try it again. We may already fixed this error recently but I am not quite sure.
Thank you very much for your answer. However, we encountered a new problem again.
Traceback (most recent call last):
File "/share/soft/BASALT_script/ensemble.py", line 140, in
main(opt)
File "/share/soft/BASALT_script/ensemble.py", line 30, in main
dataset = MyDataSet_test(type=args.norm_type, use_256=args.use_256, fea=args.fea, split='test', dec=args.dec)
File "/share/soft/BASALT_script/my_dataset.py", line 168, in init
datas.append(norm(np.vstack(temp_datas), type))
UnboundLocalError: local variable 'temp_datas' referenced before assignment
Traceback (most recent call last):
File "/share/soft/BASALT_script/BASALT", line 137, in
BASALT_main_d(assembly_list, datasets, num_threads, lr_list, hifi_list, hic_list, eb_list, ram, continue_mode, functional_module, autobining_parameters, refinement_paramter, max_ctn, min_cpn, pwd, QC_software)
File "/share/soft/BASALT_script/BASALT_main_d.py", line 453, in BASALT_main_d
outlier_remover_main('BestBinset', coverage_matrix_list, datasets, lr_list, hifi_list, assembly_mo_list, pwd, num_threads)
File "/share/soft/BASALT_script/S5_Outlier_remover_DL_11012023.py", line 549, in outlier_remover_main
A=outlier_predictor(depth_TNF_matrix, contigs_depth, bin_contigs, datasets, lr, hifi_list, num_threads, nx)
File "/share/soft/BASALT_script/S5_Outlier_remover_DL_11012023.py", line 145, in outlier_predictor
for line in open('Predicted_potential_outlier.txt','r'):
FileNotFoundError: [Errno 2] No such file or directory: 'Predicted_potential_outlier.txt'
Hello, I encountered a similar issue although I installed BASALT last month. Can you help me?
Trying to read combat bins from the same assembly
23
0
Total 0 iterations
Iteration starts
Traceback (most recent call last):
File "/home/dragon/soft/anaconda3/envs/BASALT/bin/BASALT", line 141, in <module>
BASALT_main_c(assembly_list, datasets, num_threads, lr_list, hifi_list, hic_list, eb_list, ram, continue_mode, functional_module, autobining_parameters, refinement_paramter, max_ctn, min_cpn, pwd, QC_software)
File "/home/dragon/soft/anaconda3/envs/BASALT/bin/BASALT_main_c.py", line 509, in BASALT_main_c
Contig_retrieve_within_group_main(best_binset_after_contig_retrieve, outlier_remover_folder, num_threads, continue_mode, cpn_cutoff, ctn_cutoff, assembly_mo_list, connections_list, coverage_matrix_list)
File "/home/dragon/soft/anaconda3/envs/BASALT/bin/S7_Contigs_retrieve_within_group_checkm.py", line 1919, in Contig_retrieve_within_group_main
Contig_retrieve_within_group(assemblies_list, binset, outlier_remover_folder, PE_connections_list, num_threads, last_step, coverage_matrix_list, pwd, cpn_cutoff, ctn_cutoff)
File "/home/dragon/soft/anaconda3/envs/BASALT/bin/S7_Contigs_retrieve_within_group_checkm.py", line 1655, in Contig_retrieve_within_group
os.system('mv *_filtrated_bin_connecting_contigs_'+str(level_num)+'.txt *_eliminated_bin_connecting_contigs_'+str(level_num)+'.txt '+binset+'_retrieved_'+str(level_num))
UnboundLocalError: local variable 'level_num' referenced before assignment