# How do I pull singe cell RNA sequencing data from GEO database?

I am new to R and computational biology. I am trying to look through a published data set to check for gene expression for my own project. I am having trouble finding materials to teach me how to analyze single cell RNA sequencing data on R from the GEO NCBI database.

This is the data that I am trying to access https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE138651

I would appreciate any directions or suggestions for tutorials.

Thanks!

Install package

if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")

BiocManager::install("GEOquery")


Use function getGEO to download the files.

expressionSet <- getGEO("GSE138651")
expressionSet <- expressionSet[[1]]


You can then look at the info of the samples:

pData(expressionSet)


And the assay data itself

exprs(expressionSet)

• This is useful because of the very specific instructions but I think it would be even more helpful to also include a brief introductory explanation and links to BioConductor and the GEOquery package to provide context for newcomers. May 7 '20 at 14:51

The simplest would be using a count matrix (at the end of the link you have shared, section "Supplementary file"). For example GSE138651_Vagal_WholeNodoseSeq_raw.mtx.gz corresponds to "raw" count matrices obtained after mapping and counting the reads. This file, along with the GSE138651_barcodes.tsv.gz and GSE138651_genes.tsv.gz can be used to "read" the data into R; to that end there are many options in the form of packages, Seurat is one of the best documented and hence is beginner-friendly.

• Thanks Haci. I am learning Seurat as well. So many things!! I am actually the most interested in the file GSE138651_NGTall_Reads_cap.csv.gz. Do you know if this file type can be "read" into R? Apr 13 '20 at 21:28
• Yes, it is a csv file and once again there are many options to read such files into R. read.csv() is one option. Personally, I use fread() of data.table to read in tabular files.
– haci
Apr 13 '20 at 21:57
• I will try that then. Thank you again! Apr 14 '20 at 13:31

You might want to check out the BioConductor GEOquery package.

Install using

if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")

BiocManager::install("GEOquery")


More information on how to use this package and read in data from GEO can be found in the vignette