metaGmetapop / metapop

A pipeline for the macro- and micro-diversity analyses and visualization of metagenomic-derived populations
MIT License
37 stars 10 forks source link

There was an error in a '. bam' file while running Linking SNPs, but the other files are fine #29

Open Lilingyuns opened 9 months ago

Lilingyuns commented 9 months ago

Hi, I ran Metapop with different files and found that when there is a ". bam" file, it always reports an error:

Linking SNPs starting at: 08/10/2023 05:11:02...Traceback (most recent call last): File "/home/miniconda3/envs/metapop/bin/metapop", line 8, in sys.exit(main()) File "/home/miniconda3/envs/metapop/lib/python3.7/site-packages/metapop/metapop_main.py", line 329, in main linked_file = metapop.metapop_mine_reads.do_mine_reads(output_directory_base, threads) File "/home/miniconda3/envs/metapop/lib/python3.7/site-packages/metapop/metapop_mine_reads.py", line 477, in do_mine_reads formatted_to_valid_combos(formatted_snps, res, output_file) File "/home/miniconda3/envs/metapop/lib/python3.7/site-packages/metapop/metapop_mine_reads.py", line 373, in formatted_to_valid_combos new_keys.append(new) UnboundLocalError: local variable 'new' referenced before assignment

But I am able to successfully run other files without this file, and I am not sure if anyone is like me.

My Metapop/09. Linked SNPs/linked Snp_ There are some contents in "results. tsv": data_ref source contig_gene OC codon refs snp ref_count snp_count ref_first ref_second 1 A502N_V10000 Nodule_k141_4877_1 1 202 GGC ACG 7 8 0 0 1 A502N_V10000 Nodule_k141_4877_1 1 202 GGC AC. 7 8 0 0 1 A502N_V10000 Nodule_k141_4877_1 1 202 GGC .CG 7 8 0 0 1 A502N_V10000 Nodule_k141_4877_1 1 202 GGC A.G 7 8 0 0

Looking forward to your reply, thanks!