The following awk line will fail when c15 is not defined or is 0. How to modify it so that in such cases it does not attempt the calculation, but instead provides an error message or does nothing:
cat formatted.dsv | awk -F"\t" '{ c12 = $12; c15 = $15; c17 = $17; c16 = $16; c4 = $4; c9 = $9; c5 = $5; c10 = $10; c14 = $14; c8 = $8; c7 = $7 } END { printf "%d\n", ((c12+c17+c16+c4+c9+c5+c10+c14+c8+c7))/c15)*1000 }'