Entering edit mode
5 months ago
mahlet.teka
•
0
hi all,
I'm trying to add some tags to my vcf file with a simple awk command but it's not working. I'm fairly new to this bioinformatics world and I highly appreciate your help. I'm sure there is a bcftools command that could do this (please let me know) but I found this awk command and tried it. Here is the command,
awk '/^#CHROM/ {printf("##fileformat==VCF4.0\n"); printf("##FORMAT=<ID=GT,Number=1, Type=String,Description=\"Genotype\">\n"); printf("##FORMAT=<ID=AD,Number=.,Type=Integer,Description=\"Alleic depths for the reference and alternate alleles in the order listed\">\n"); printf("##FORMAT=<ID=DP,Number=1,Type=Integer,Description=\"Read Depth (only filtered reads used for calling)\">\n"); printf("##FORMAT=<ID=PL,Number=3,Type=Float,Description=\"Normalized, Phred-scaled likelihoods for AA,AB,BB genotypes where A=ref and B=alt; not applicable if site is not biallelic\">\n"); } {print;} ' chrom1_DCas22_7004.vcf >> chrom1.vcf
best,
I tried;
but I'm getting this error message;
chr1.vcf is a vcf file without the tags/header lines. any thoughts on this?