# Documentation request, import formats for TPM\_txt files

**URL:** <https://discourse.scverse.org/t/documentation-request-import-formats-for-tpm-txt-files/359>\
**Category:** scanpy\
**Created:** [March 17, 2022, 6:52pm UTC](https://discourse.scverse.org/t/documentation-request-import-formats-for-tpm-txt-files/359 "2022-03-17T18:52:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DRSEI](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/drsei/32/172_2.png) [@DRSEI](https://discourse.scverse.org/u/DRSEI)\
**Post date:** [March 17, 2022, 6:52pm UTC](https://discourse.scverse.org/t/documentation-request-import-formats-for-tpm-txt-files/359/1 "2022-03-17T18:52:52Z")

</div>

I have a TPM file that I am importing in my colab script using pandas and scanpy. The txt file starts with 1 row X 55737 columns or another way around. Scanpy/panda is considering the first-row value as a heading. How to read TXT?  
I have tried multiple ways to read the files such as

data1 = pd.read\_csv(GSE120575\_Sade\_Feldman\_melanoma\_single\_cells\_TPM\_GEO.txt’, sept=’\t’)  
1 rows × 55737 columns  
test1 = pd.read\_csv(‘GSE120575\_Sade\_Feldman\_melanoma\_single\_cells\_TPM\_GEO.txt’)

adata = sc.read\_text(GSE120575\_Sade\_Feldman\_melanoma\_single\_cells\_TPM\_GEO.txt).transpose()

```auto
adata = sc.read(GSE120575_Sade_Feldman_melanoma_single_cells_TPM_GEO.txt, ext='txt').transpose() 

```

 ![Capture](https://canada1.discourse-cdn.com/flex035/uploads/forum11/original/1X/79cea723f9e4ad3bc6809304c857f5de0b0e0cf7.png)

Warning: Total number of columns (55737) exceeds max\_columns (20) limiting to first (20) columns.

same as this file formate too “PP001swap.filtered.matrix.txt”  
the file was downloaded from the below links :

1. [GEO Accession viewer](https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE126030)
2. [GEO Accession viewer](https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE120575)  
I really appreciate your help.

I am very new to bioinformatics/scanpy

---

<div class="post-metadata">

**Author:** ![Valentine\_Svensson](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/valentine_svensson/32/10_2.png) [@Valentine\_Svensson](https://discourse.scverse.org/u/Valentine_Svensson)\
**Post date:** [March 20, 2022, 4:42am UTC](https://discourse.scverse.org/t/documentation-request-import-formats-for-tpm-txt-files/359/2 "2022-03-20T04:42:04Z")

</div>

Hi,

The file you are trying to read in the screenshot is a ‘tab separated values’ (TSV) file. The ‘borders’ between entries in the table are separated by tab characters (`'\t'`), while the `pd.read_csv()` function assumes that entries are separated by comma characters (`','`). So for the `pd.read_csv()` function it looks like there is just one table entry on each row. You can tell `pd.read_csv()` to separate values by tab characters instead by doing e.g. `pd.read_csv(file_path, sep = '\t')`.

/Valentine

---

<div class="post-metadata">

**Author:** ![DRSEI](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.scverse.org/drsei/32/172_2.png) [@DRSEI](https://discourse.scverse.org/u/DRSEI)\
**Post date:** [March 22, 2022, 3:38am UTC](https://discourse.scverse.org/t/documentation-request-import-formats-for-tpm-txt-files/359/3 "2022-03-22T03:38:02Z")

</div>

Thank you @Valentine_Svensson
