Question: bcftools reheader -h
0
gravatar for marta.rusmini
4 months ago by
marta.rusmini0 wrote:

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!

bcftools format header • 345 views
ADD COMMENTlink modified 4 months ago by finswimmer11k • written 4 months ago by marta.rusmini0
1
gravatar for finswimmer
4 months ago by
finswimmer11k
Germany
finswimmer11k wrote:

bcftools reheader is for replacing the complete header of your vcf file. If this ist what you want to do, create a text file with the new header as the content, e.g. header.hr:

##fileformat=VCFv4.1
##INFO=<ID=CSQ,Number=.,Type=String,Description="some text">
##INFO=<ID=NEW,Number=.,Type=String,Description="some text">
#CHROM  POS ID  REF ALT QUAL    FILTER  INFO

As you can see you also need to define the columns!

Than you can replace the old header with the new one with:

$ bcftools reheader -h header.hr input.vcf > output.vcf
ADD COMMENTlink written 4 months ago by finswimmer11k
0
gravatar for Pierre Lindenbaum
4 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum121k wrote:

bcftools annotate https://samtools.github.io/bcftools/bcftools.html

-c, --columns list

The imported VCF annotations can be renamed as "DST_TAG:=SRC_TAG" or "FMT/DST_TAG:=FMT/SRC_TAG".

ADD COMMENTlink written 4 months ago by Pierre Lindenbaum121k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1311 users visited in the last hour