A novel method is introduced for metagenomic profiling in genome sequencing.The method involves simultaneous basecalling and multi-class genome classification.State-of-the-art accuracy is achieved in both basecalling and classification.The method has implications for improving metagenomic profiling in future studies.