A chemical produced by gut bacteria could be the basis for a non-invasive test for endometriosis – and mouse experiments suggest it might also help treat the condition