a file I need to extract info from looks like
2 41620 . T G 100 PASS AC=3;AF=0.000599042;AN=5008;NS=2504;DP=18872;EAS_AF=0;AMR_AF=0;AFR_AF=0;EUR_AF=0;SAS_AF=0.0031;AA=.|||;CSQ=G|ENSG00000184731|ENST00000327669|Transcript|missense_variant|954|954|318|K/N|aaA/aaC|||-1|tolerated(0.47)|benign(0)||||;GENCODE=ENST00000327669
the output I need would be
2 41620 CSQ=G missense_variant
the major fields are always divided by ||| but not that the 2 41620 is from the first field and the CSQ=G and missense variant is from the next. It does neither have to be missense_variant nor somethign along the lines but it is always the first and fourth field after the first |||.
How to achieve in perl , awk, sed or so?