Various statistical approaches have been introduced for comparing relative abundances or diversity measures in microbial composition data such as 16s rRNA and shotgun sequencing data. Individual microbial organisms may play an important role for itself, but they share the same host environment and thus their interactions can influence host activity such as immune cell environment and therapeutic response. However, few statistical methods have been developed to compare microbial networks between different sample groups or environments. In addition, some of them utilize only information on data on presence/absence even though their quantitative abundance data is available. We therefore propose a new statistical method, named COCOA, to compare co-abundance networks of microorganisms between different conditions. We applied this method to three cancer microbiome data sets. We found several bacteria with different interplays in melanoma and colorectal cancer patients in the context of immunotherapy response and tumor immune profiles, respectively. The COCOA analysis of microbial composition data will be useful to better understand microbial interactions in different host environments.