Oh Pierre, I knew you would come to help! Thanks so much! That worked like a charm. Sorry that I didn't see that I needed to add a file >.<
• 1 views
•
link
Hi,
I have a sample with a strange name. It has been giving me some issues with some software that I use. I am trying to change the sample name in the VCF file using bcftools reheader
The command I am using is
bcftools reheader -s "99686 C99686\n" input.vcf -o output.reheader.vcf
but when I try looking at the samples name in the file using bcftools query, the name is unchanged.
bcftools query -l /gpfs_backup/meurs_data/TestBCF/output.reheader.vcf
I assuming I am doing something wrong with the reheader command but I am not sure what I am doing wrong.
the option -s of bcftools reheader is a FILE not a string. https://samtools.github.io/bcftools/bcftools.html
-s, --samples FILE
new sample names, one name per line, in the same order as they appear in the VCF file. Alternatively, only samples which need to be renamed can be listed as "old_name new_name\n" pairs separated by whitespaces, each on a separate line. If a sample name contains spaces, the spaces can be escaped using the backslash character, for example "Not\ a\ good\ sample\ name".
Oh Pierre, I knew you would come to help! Thanks so much! That worked like a charm. Sorry that I didn't see that I needed to add a file >.<
Log in to answer this question.