I have two files that I am going to use diff
to find the differences but need to parse them before I do that. I have include the format of each file1 and file2 with the desired output of each (the first 5 fields in each file). The first file has a "chr" before the # that needs to be removed. I have included an awk
for file2 that I think will work but not sure about file1. Thank you :).
file1
chr1 977330 . T C 1442.18 PASS AF=1;AO=150;DP=150;FAO=151;FDP=151;FR=.;FRO=0;FSAF=86;FSAR=65;FSRF=0;FSRR=0;FWDB=0.0177391;FXX=0;HRUN=1;
LEN=1;MLLD=104.329;OALT=C;OID=.;OMAPALT=C;OPOS=977330;OREF=T;PB=0.5;PBP=1;QD=38.2033;RBI=0.0302247;REFB=0;REVB=-0.0244715;RO=0;SAF=85;SAR=65;
SRF=0;SRR=0;SSEN=0;SSEP=0;SSSB=3.81633e-08;STB=0.5;STBP=1;TYPE=snp;VARB=-1.50479e-05 GT:GQ:DP:FDP:RO:FRO:AO:FAO:AF:SAR:SAF:SRF:SRR:FSAR:FSAF:FSRF:
FSRR 1/1:68:150:151:0:0:150:151:1:65:85:0:0:65:86:0:0
chr1 981931 . A G 773.354 PASS
desired output of file1
1 977330 . T C
file2
1 955597 . G G 256.13 PASS AC=0;AN=2;SF=8;GENE=AGRN
GT:MQRS:FS:DPF:RPRS:QD:BQRS:MQR:AD:GQ:MQ0:VAL:PL:ROI 0/0:.:.:.:.:.:.:.:.:.:.:1:.:1
./.:.:.:.:.:.:.:.:.:.:.:.:.:0 ./.:.:.:.:.:.:.:.:.:.:.:.:.:0 ./.:.:.:.:.:.:.:.:.:.:.:.:.:0 ./.:.:.:.:.:.:.:.:.:.:.:.:.:0 ./.:.:.:.:.:.:.:.:.:.:.:.:.:0
./.:.:.:.:.:.:.:.:.:.:.:.:.:0 ./.:.:.:.:.:.:.:.:.:.:.:.:.:0 0/0:0.252:0.000:94:-0.100:8.83:1.930:59.78:38,0:99:0:1:985,985,985:1
./.:.:.:.:.:.:.:.:.:.:.:.:.:0 ./.:.:.:.:.:.:.:.:.:.:.:.:.:0 ./.:.:.:.:.:.:.:.:.:.:.:.:.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