Microbial diversity and abundance are significantly altered in patients with endometritis with positive CD138 levels, but are not significantly different in weakly CD138-positive patients and patients with non-endometritis. This evidence concerns the gene SDC1 and endometritis.