Hi sorry for the very basic question! I would like to change the tags of the INFO fields of my vcf. I saw the bcftools -reader option but I cannot understand the format of the newheader.vcf that I need. Can anyone help me? I will appreciate help in order to a)create the new file needed for the script b)write the script (is it correct
bcftools reheader -h newheader.vcf filetochange.vcf
?
here an example of part of a header that I want to modify (i would like to change the ID=xxx)
##INFO=<ID=dbNSFP_ExAC_NFE_AF,Number=A,Type=Float,Description="Field 'ExAC_NFE_AF' from dbNSFP">
##INFO=<ID=dbNSFP_ExAC_SAS_AF,Number=A,Type=Float,Description="Field 'ExAC_SAS_AF' from dbNSFP">
##INFO=<ID=dbNSFP_GERP___RS,Number=A,Type=Float,Description="Field 'GERP++_RS' from dbNSFP">
##INFO=<ID=dbNSFP_GERP___NR,Number=A,Type=Float,Description="Field 'GERP++_NR' from dbNSFP">
##INFO=<ID=dbNSFP_ExAC_Adj_AC,Number=A,Type=Integer,Description="Field 'ExAC_Adj_AC' from dbNSFP">
##INFO=<ID=dbNSFP_ExAC_Adj_AF,Number=A,Type=Float,Description="Field 'ExAC_Adj_AF' from dbNSFP">
##INFO=<ID=dbNSFP_ExAC_SAS_AC,Number=A,Type=Integer,Description="Field 'ExAC_SAS_AC' from dbNSFP">
##INFO=<ID=dbNSFP_1000Gp3_AMR_AF,Number=A,Type=Float,Description="Field '1000Gp3_AMR_AF' from dbNSFP">
##INFO=<ID=dbNSFP_1000Gp3_AMR_AC,Number=A,Type=Integer,Description="Field '1000Gp3_AMR_AC' from dbNSFP">
##INFO=<ID=dbNSFP_MetaSVM_pred,Number=A,Type=Character,Description="Field 'MetaSVM_pred' from dbNSFP">
##INFO=<ID=dbNSFP_1000Gp3_EAS_AC,Number=A,Type=Integer,Description="Field '1000Gp3_EAS_AC' from dbNSFP">
thank you!
Hello!
I have come across this thread and am wondering if I open my VCF file as a text file, can I edit the header manually?
I need to remove the
and change :
to
Can I do this in the text editor window and then resave file as a new .vcf? Instead of using bcftools?
thank you!!
try bcftools reheader -f option .fai file option to change contig names and lengths