grenaud / glactools

command-line tools for the management of genotype likelihoods and allele counts
http://grenaud.github.io/glactools/
GNU General Public License v3.0
29 stars 2 forks source link

Can not use bed track with glactools bam2acf #16

Open zhujack opened 4 years ago

zhujack commented 4 years ago

Hi,

Thanks for the grear program. It looks like I cannot use bed track with glactools bam2acf:

$ glactools bam2acf --bed $bed $ref_fa $bam test | glactools view - | cut -f 1-3,6

The last 3 arguments are Error: GlacParser tried to read 4 bytes but got 0

But, I can run it without a bed track. My bed track looks like this:

1 11204715 11204717 17 7578460 7578461 17 15978895 15978897

Thanks,

Jack

grenaud commented 4 years ago

Hi Jack, There was a bug due to an omission to increment a counter. A single line did the trick. I have also added a test case using the --bed option to make sure it behaves. Let me know if this fixes your problem. Feel free to close the issue if that is the case.

Gabriel