When did Cleopatra begin her rule of Egypt?

Cleopatra began her rule (along with her brother) at the death of her father in 51 BC. However she was soon ousted by her brother and did not regain her throne until 47 BC. From 47 to her death she ruled uninterrupted.