bcftools icon indicating copy to clipboard operation
bcftools copied to clipboard

seg fault for reheader -o

Open Ahuiting opened this issue 1 year ago • 3 comments

Hello, I want to change the sample name of .g.vcf.gz files, and it threw seg fault. bcftools reheader -s <(echo "old_name" "new_name") -o folder/output.g,vcf.gz input.g.vcf.gz But i found the problem is permission denied by 'folder', i also tested it with no existing folder path, it threw seg fault too.

The bcftools version is : bcftools 1.21 Using htslib 1.21 Copyright (C) 2024 Genome Research Ltd. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

Ahuiting avatar Oct 30 '24 09:10 Ahuiting

I am unable to reproduce the problem. Can you provide a small test case? This works just fine for me

$ mkdir xx
$ chmod -rxw xx
$ bcftools reheader -s <(echo old_name new_name) rmme.vcf -o xx/rmme.vcf
xx/rmme.vcf: Permission denied

pd3 avatar Oct 31 '24 11:10 pd3

I am unable to reproduce the problem. Can you provide a small test case? This works just fine for me

$ mkdir xx
$ chmod -rxw xx
$ bcftools reheader -s <(echo old_name new_name) rmme.vcf -o xx/rmme.vcf
xx/rmme.vcf: Permission denied

Thanks for replying, I tried same commands, but i still get seg fault.

mkdir test
bcftools reheader -s <(echo 'old' 'new')  -o test/new_name.g.vcf.gz test.g.vcf.gz   

this works for me, but after i changed permission, it threw Seg fault.

chmod -rxw test                                                                                                                       
bcftools reheader -s <(echo 'old' 'new')  -o test/new_name.g.vcf.gz test.g.vcf.gz
Segmentation fault 

I also tried same commands on my own laptop.

bcftools reheader -s <(echo 'old' 'new')  test.g.vcf.gz -o test/new_name.g.vcf.gz 
zsh: segmentation fault  bcftools reheader -s <(echo 'old' 'new') test.g.vcf.gz -o 

Ahuiting avatar Nov 05 '24 09:11 Ahuiting

It seems the problem is not with permissions but with something else. Any chance you could share a small test case to reproduce the problem?

pd3 avatar Nov 06 '24 09:11 pd3