marbl / ModDotPlot

MIT License
101 stars 7 forks source link

Cross-chromosome comparison errors out due to string integer in print statement #20

Closed ASLeonard closed 3 months ago

ASLeonard commented 3 months ago

With v0.8.0, I get an error when comparing across two chromosomes (moddotplot interactive -f two_chromosomes.fa --compare-only)

    f"Building pairwise matrices for {seq_list[i]} and {seq_list[j]}, using a minimum window size of {window_lengths[0]}.... \n"
                                                        ~~~~~~~~^^^
TypeError: list indices must be integers or slices, not str

From these lines

https://github.com/marbl/ModDotPlot/blob/ed190c755d6e2daf212b25fa898bb69121b9816a/src/moddotplot/moddotplot.py#L655-L661

Removing the print statement allowed the plots to finish up correctly.

alexsweeten commented 3 months ago

Thanks for the catch, Alex. This should be fixed in v0.8.1 of ModDotPlot.

Certain versions of numpy are unable to parse this. I modified the print statement to work for all np versions.