The tumor microenvironment significantly affects the transcriptomic states of tumor cells. Single-cell RNA sequencing (scRNA-seq) helps elucidate the transcriptomes of individual cancer cells and their neighboring cells. However, cell dissociation results in the loss of information on neighboring cells. To address this challenge and comprehensively assess the gene activity in tissue samples, it is imperative to integrate scRNA-seq with spatial transcriptomics. In our previous study on physically interacting cell sequencing (PIC-seq), we demonstrated that gene expression in single cells is affected by neighboring cell information. In the present study, we proposed a strategy to identify niche-specific gene signatures by harmonizing scRNA-seq and spatial transcriptomic data. This approach was applied to the paired or matched scRNA-seq and Visium platform data of five cancer types: breast cancer, gastrointestinal stromal tumor, liver hepatocellular carcinoma, uterine corpus endometrial carcinoma, and ovarian cancer. We observed distinct gene signatures specific to cellular niches and their neighboring counterparts. Intriguingly, these niche-specific genes display considerable dissimilarity to cell type markers and exhibit unique functional attributes independent of the cancer types. Collectively, these results demonstrate the potential of this integrative approach for identifying novel marker genes and their spatial relationships.