# Adata gene intersection problem

**URL:** https://discourse.scverse.org/t/adata-gene-intersection-problem/1029
**Category:** anndata
**Created:** [January 2, 2023, 7:49am UTC](https://discourse.scverse.org/t/adata-gene-intersection-problem/1029 "2023-01-02T07:49:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![navyhoody](https://avatars.discourse-cdn.com/v4/letter/n/71c47a/32.png) [@navyhoody](https://discourse.scverse.org/u/navyhoody)
#### Post date: [January 2, 2023, 7:49am UTC](https://discourse.scverse.org/t/adata-gene-intersection-problem/1029/1 "2023-01-02T07:49:34Z")

</div>

module12=pd.read\_table(‘/Users/mojaeu/Desktop/303\_length\_genes.txt’) #only gene names  
len(module12)=303

ya12=list(module12.Gene.values)

wcc=set(data\_lung.var\_names).intersection(ya12)  
data\_lung\_edit = data\_lung[:,list(wcc)]  
data\_lung\_edit.var\_names  
len(data\_lung\_edit.var\_names )=181

 ![스크린샷 2023-01-02 오후 4.46.26](https://canada1.discourse-cdn.com/flex035/uploads/forum11/original/1X/5e9ed727255350c51d33110d718514a378a65c7b.png)

The number of genes I want to use for analysis is 303, but if you use the code above to find an intersection, only 181 genes are used for analysis. (seek an intersection with adata 9999 genes)

But, genes that are not included in the intersection are expressed in UMAP.(ex…CDH1 gene)  
May I know why this is happening?

Thanks.
