# Reading RNA-seq data into python

**URL:** <https://community.brain-map.org/t/reading-rna-seq-data-into-python/658>\
**Category:** Technical\
**Tags:** atlas-cell-types, rna-seq, allensdk\
**Created:** [August 10, 2020, 11:10pm UTC](https://community.brain-map.org/t/reading-rna-seq-data-into-python/658 "2020-08-10T23:10:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![tabataba](https://avatars.discourse-cdn.com/v4/letter/t/8dc957/32.png) [@tabataba](https://community.brain-map.org/u/tabataba)\
**Post date:** [August 10, 2020, 11:10pm UTC](https://community.brain-map.org/t/reading-rna-seq-data-into-python/658/1 "2020-08-10T23:10:11Z")

</div>

I’m trying to read in this dataset  
[https://portal.brain-map.org/atlases-and-data/rnaseq/mouse-whole-cortex-and-hippocampus-10x](https://portal.brain-map.org/atlases-and-data/rnaseq/mouse-whole-cortex-and-hippocampus-10x)  
with python, but I’m not sure where to start.

Can I use AllenSDK to read in this data? Is there an example code I can use?

Thanks

---

<div class="post-metadata">

**Author:** ![jeremyinseattle](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/jeremyinseattle/32/50_2.png) [@jeremyinseattle](https://community.brain-map.org/u/jeremyinseattle)\
**Post date:** [August 11, 2020, 12:01am UTC](https://community.brain-map.org/t/reading-rna-seq-data-into-python/658/2 "2020-08-11T00:01:35Z")

</div>

Hi @tabataba, I don’t have a great answer, other than to say that this is a known issue that has been partially addressed for reading into R [in this post](https://community.brain-map.org/t/gene-expression-matrix-cvs-is-too-large-to-load-it/566). There is another post about [reading a different sparse matrix format (tome) into python](https://community.brain-map.org/t/gene-expression-matrix-cvs-is-too-large-to-load-it/566) which probably won’t help, but might have something useful. Maybe someone else has a solution?

---

<div class="post-metadata">

**Author:** ![tabataba](https://avatars.discourse-cdn.com/v4/letter/t/8dc957/32.png) [@tabataba](https://community.brain-map.org/u/tabataba)\
**Post date:** [August 11, 2020, 7:30pm UTC](https://community.brain-map.org/t/reading-rna-seq-data-into-python/658/3 "2020-08-11T19:30:37Z")

</div>

Assuming I can read parts of the csv file at a time, is there any tutorial you can recommend that tells me what the other files are for?

Thanks

---

<div class="post-metadata">

**Author:** ![jeremyinseattle](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/jeremyinseattle/32/50_2.png) [@jeremyinseattle](https://community.brain-map.org/u/jeremyinseattle)\
**Post date:** [August 11, 2020, 7:38pm UTC](https://community.brain-map.org/t/reading-rna-seq-data-into-python/658/4 "2020-08-11T19:38:00Z")

</div>

I would suggest you start with the [Readme file](https://brainmapportal-live-4cc80a57cd6e400d854-f7fdcae.divio-media.net/filer_public/87/14/8714d0a3-27d7-4a81-8c77-eebfd605a280/readme_mouse_10x.txt) listed in the first row of the data download table. It has some information about each of the other files, and in some cases links out to more detailed descriptions. The two critical files are the table of cell metadata and the gene expression matrix – for many use cases the other files are not necessary.
