Abstract: A method of predicting resistance to anti-PD1 therapy in a subject suffering from cancer comprising the steps of a) determining, from a biological sample from a subject, in particular a feces or colonic biopsy sample from the subject, the presence of a bacterial pks island, b) predicting from the result of step a) that the subject is likely to be resistant to anti-PD1 therapy, is provided. Methods of treating cancer in a subject by assessing the presence or absence of bacterial pks island in a biological sample from a subject, in particular a feces or colonic biopsy sample from the subject and administering to the subject an anti-cancer therapy are also provided.