We developed a computational pipeline, MicroPro, for metagenomic data analyses that take into account all the reads from known and unknown microbial organisms and for associating viruses with complex diseases. We utilized MicroPro to analyze metagenomics data related to three diseases: colorectal cancer, type-2 diabetes and liver cirrhosis, and showed that including reads from unknown organisms will markedly increase the prediction accuracy of the disease status based on metagenomics data. We identified new microbial organisms associated with these diseases. Viruses were shown to play important roles in colorectal cancer and liver cirrhosis, but not in type-2 diabetes. MicroPro is available at https://github.com/zifanzhu/MicroPro.