Understanding the basic principles that govern chromosome organization poses one of the main challenges in mathematical biology of the postgenomic era. In viruses chromosome organization varies greatly across different families and is highly dependent on the assembly pathway of the proteins that form the virus. In this talk I will show how knot theory can be used to understand the three dimensional organization of the bacteriophage genome.In the ealry eighties L. Liu and colleagues found the DNA molecules extracted from P4 bacteriophages where knotted with very high probability. The question of why these knots are formed, or whether they contain any information about the packing of DNA inside the viral capsid have remained open. We have developed experimental protocols (Trigueros et al. 2001) as well as computaitonal methods to address these questions. We have shown that the formation of knots inside the viruses is driven mainly by the effects of the confinement (Arsuaga et al 2002) and that the knot distribution reflects a chiral organization of the genome (Arsuaga et al. 2002, Arsuaga et al. 2005). Our current work aims at establishing a bridge between models of DNA packing in bacteriophages and the topological information drawn from bacteriophage P4.