ksamuk / pixy

Software for painlessly estimating average nucleotide diversity within and between populations
https://pixy.readthedocs.io/
MIT License
115 stars 14 forks source link

bed file regions (with chromosomes just as numbers) #32

Closed danielwood1992 closed 3 years ago

danielwood1992 commented 3 years ago

Hello,

Thanks a lot for developing pixy, it's very neat! I just had a minor issue (on v1.1.0.beta1, which seemed the same in 1.0.0) when chromosomes in a vcf are named just numbers (0,1,2 etc.), and a bed file is specified to give windows - the bed file chromosomes can't be found in the VCF (WARNING: the following chromosomes in the BED file do not occur in the VCF [1,2,3 etc. for all of them]). It seems to read them in from the bed file as numbers, whereas they are strings from the vcf (this is at lines ~621-624 in core.py, presumably something to do with pandas_read.csv for the bed file at ~608). Works fine if I rename the chromosomes to something which is obviously a string, but just thought I should bring it up in case other people have the same issue. Thanks again!

Best wishes,

Daniel Wood

ksamuk commented 3 years ago

Hi Daniel,

Thanks for the report! Just pushed a fix for this to version 1.1.1.beta1, which should be up on conda-forge later today.

danielwood1992 commented 3 years ago

Great, thanks!