Closed mscharmann closed 3 years ago
Hi Mathias,
This issue should be solved in the new version, can you try updating and see if the problem persists?
Going to go ahead and close this for now, please let me know if the error persists in the new version.
Hello, I am using a genome assembly that contains a few hundred small contigs in addition to large chromosome-scale scaffolds, in combination with very sparse RAD-data. Unfortunately, pixy crashes during the Fst calculation for some "chromosomes", presumably because there were no variants, or only a single one, left after filtering on the "chromosome":
Traceback (most recent call last): File "XXX/pixy", line 13, in
sys.exit(main())
File "/XXX/pixy/main.py", line 626, in main
maf_array = allele_freqs[:,1] > args.fst_maf_filter
IndexError: index 1 is out of bounds for axis 1 with size 1
I propose to except IndexError in this case and simply return "NA". You may argue that this "chromosome" should be removd from the input VCF before running pixy, but I am trying to integrate pixy in a pipeline that calculates various stats for all "chromosomes" in a genome assembly includind these small "junk" contigs, irrespective of how many variants they contain or not.
Cheers, Mathias