I have a VEP annotated VCF file I want to divide it based on consequence, my approach is:
awk '{ gsub(",","-",$4); print $0 >> $4".txt"}' input.txt
I substitute "," by "-" so file naming be convenient, but as a result because I depend on column 4 for naming; also the resulted file will contains "-"
for example if column number 4 is
start_lost,splice_region_variant
The output file will be
start_lost-splice_region_variant.txt
Which what I want. However, the resulted data in the file will be
start_lost-splice_region_variant
instead of start_lost,splice_region_variant
which is incorrect.
Any suggestion?
Could you provide first few lines of the
vcf
? May behead file.vcf
?