There are 4 ways the user can input data and unfortunately the parse rules for each are slightly different. The first condition works great and the input file is attached for the second condition. Conditions 3 and 4 will follow I'm sure I will have trouble with them and need help as well. The code below parses condition 1 perfectly:
I apologize for the long post but just wanted to provide all the details. Thank you :).
awk 'NR==2 {split($2,a,"[_.>]");b=substr(a[4],1,length(a[4]-1));print a[2]+0,b,b,substr(a[4],length(a[4])),a[5]}' OFS="\t" ${id}_position.txt > ${id}_parse.txt
1. c.79G>A
parse rules:
1 four zeros after the NC_ (not always the case) and the digits before the .
2 g. ### g.###
3 letter before the >
4 letter after the >
Desired Output: 13 20763642 20763642 C T
2. c.35delG
1 four zeros after the NC_ (not always the case) and the digits before the .
2 g. ### g.###
3 letter before the del
4 "-" after the del
Desired Output: 13 20763686 20763686 C -
3. c.575_576delCA
4. .34_35delGGinsT