Recent techniques increase the amount of our knowledge of interactions between proteins. To filter, interpret and organize this data, many authors have provided tools for querying patterns in the shape of paths or trees in Protein-Protein Interaction networks. In this paper, we propose an exact algorithm for querying graphs pattern based on dynamic programming and color-coding. We provide an implementation which has been validated on real data.