zjshi / Maast

Microbial agile accurate SNP Typer
MIT License
24 stars 2 forks source link

tree building failed #18

Open Shaokang123 opened 1 year ago

Shaokang123 commented 1 year ago

Hey,

Great tool!

I was trying to build a tree but got below error message. May I ask your help to trouble shoot? I have about 3000 genomes. Is it because my genomes too diverse? Thanks.

....
60: skipped maast_step3_genotype/gt_results/XXAY1.fa.tsv
60: skipped maast_step3_genotype/gt_results/XXAY2.fa.tsv
60: skipped maast_step3_genotype/gt_results/XXAY3.fa.tsv
60: skipped maast_step3_genotype/gt_results/XXAY4.fa.tsv
first_union_in: 0
union_in: 0
[]
Traceback (most recent call last):
  File "/local/home/zskzsk/miniconda3/envs/maast/bin/bin/maast.py", line 1370, in <module>
    main()
  File "/local/home/zskzsk/miniconda3/envs/maast/bin/bin/maast.py", line 1363, in main
    tree_main(args)
  File "/local/home/zskzsk/miniconda3/envs/maast/bin/bin/maast.py", line 1300, in tree_main
    concat_alleles.concat_allele_tree(args)
  File "/local/home/zskzsk/miniconda3/envs/maast/bin/snps_io/concat_alleles.py", line 347, in concat_allele_tree
    concat_snps(allele_aln, aln_fasta, max_gap_ratio, min_site_prev, min_maf, min_mac)
  File "/local/home/zskzsk/miniconda3/envs/maast/bin/snps_io/concat_alleles.py", line 225, in concat_snps
    for i, allele in enumerate(allele_aln[good_names[0]]):
IndexError: list index out of range

My cmd:

maast tree --input-dir maast_step3_genotype/gt_results --out-dir maast_step4_tree
zjshi commented 1 year ago

Hi Shaokang123,

I apologize for my delayed response and thanks for trying Maast! Would you please let me know how many SNPs were called for your genomes? It could be counted in the core_snps.vcf file. It may also be helpful to take a look at the these genotype reports (e.g. maast_step3_genotype/gt_results/XXAY1.fa.tsv) to make sure that most of them are not empty. Happy to take a closer look if you could share with me the genomes.

zinque commented 7 months ago

Hi,

I get a similar error:

maast tree --input-list ./ncbi_genotypes.input.tsv --out-dir ./output_ncbi/ --input-dir input_ncbi/ SNP tree building; start skip GCA_000173255.2_ASM17325v2_genomic.fna skip GCA_000226235.1_ASM22623v1_genomic.fna skip GCA_000195375.2_ASM19537v2_genomic.fna skip GCA_000235865.1_ASM23586v1_genomic.fna skip GCA_000026525.1_ASM2652v1_genomic.fna skip GCA_000011045.1_ASM1104v1_genomic.fna skip GCA_000026505.1_ASM2650v1_genomic.fna skip GCA_000233755.1_ASM23375v1_genomic.fna skip GCA_000235785.2_ASM23578v2_genomic.fna skip GCA_000160175.1_ASM16017v1_genomic.fna first_union_in: 0 union_in: 0 [] Traceback (most recent call last): File "/home/ksrd/miniconda3/envs/maast/share/maast-1.0.8-0/bin/maast.py", line 1395, in main() File "/home/ksrd/miniconda3/envs/maast/share/maast-1.0.8-0/bin/maast.py", line 1388, in main tree_main(args) File "/home/ksrd/miniconda3/envs/maast/share/maast-1.0.8-0/bin/maast.py", line 1321, in tree_main concat_alleles.concat_allele_tree(args) File "/home/ksrd/miniconda3/envs/maast/share/maast-1.0.8-0/snps_io/concat_alleles.py", line 347, in concat_allele_tree concat_snps(allele_aln, aln_fasta, max_gap_ratio, min_site_prev, min_maf, min_mac) File "/home/ksrd/miniconda3/envs/maast/share/maast-1.0.8-0/snps_io/concat_alleles.py", line 225, in concat_snps for i, allele in enumerate(allele_aln[good_names[0]]): IndexError: list index out of range

I tried both 10 and 300 genomes. I attach the file with core snps and can share other output files and genomes as well.

core_snps.vcf.txt