Another option:
library(dplyr)
df %>%
group_by(gene_id) %>%
summarise_each(funs(sum))
Which gives:
#Source: local data frame [7 x 7]
#
# gene_id KOIN1 KOIN2 KOIN3 KOIP1 KOIP2 KOIP3
# (fctr) (dbl) (dbl) (dbl) (dbl) (dbl) (dbl)
#1 ENSMUSG00000000001 6.0056300 4.677550 6.3490400 9.9992300 9.931780 12.56900000
#2 ENSMUSG00000000003 0.0000000 0.000000 0.0000000 0.0000000 0.000000 0.00000000
#3 ENSMUSG00000000028 0.9988830 0.407537 1.5629300 0.1845460 1.899790 0.85186600
#4 ENSMUSG00000000031 0.0000000 0.818696 0.3708190 0.0419544 0.000000 0.02832700
#5 ENSMUSG00000000037 0.0160579 0.172857 0.0988266 0.0000000 1.174690 0.00726742
#6 ENSMUSG00000000049 0.3923090 0.000000 0.0000000 0.0000000 0.124112 0.01811530
#7 ENSMUSG00000025515 0.6936114 0.134674 1.4382170 0.0000000 0.000000 0.00000000