Answers.Body: <p>Install package</p>
  
  <pre><code>if (!requireNamespace("BiocManager", quietly = TRUE))
      install.packages("BiocManager")
  
  BiocManager::install("GEOquery")
  </code></pre>
  
  <p>Use function getGEO to download the files.</p>
  
  <pre><code>expressionSet &lt;- getGEO("GSE138651")
  expressionSet &lt;- expressionSet[[1]]
  </code></pre>
  
  <p>You can then look at the info of the samples:</p>
  
  <pre><code>pData(expressionSet)
  </code></pre>
  
  <p>And the assay data itself</p>
  
  <pre><code>exprs(expressionSet)
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-07T14:51:48.490Z
Answers.Text: 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.
Answers.UserDisplayName: Geraldine_VdAuwera
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-17T23:06:15.057Z
Answers.Text: I am sorry but I have to flag this for removal since it's wrong. getGEO only returns expression data for arrays, not for NGS. Output of `exprs(expressionSet)` is empty and this is expected.
Answers.UserDisplayName: ATpoint
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-07T12:44:55.373Z
Answers.LastActivityDate: 2020-05-07T12:44:55.373Z
Answers.UserDisplayName: geom_na
Answers.Body: <p>The simplest would be using a count matrix (at the end of the link you have shared, section "Supplementary file"). For example <code>GSE138651_Vagal_WholeNodoseSeq_raw.mtx.gz</code> corresponds to "raw" count matrices obtained after mapping and counting the reads. This file, along with the <code>GSE138651_barcodes.tsv.gz</code> and <code>GSE138651_genes.tsv.gz</code> can be used to "read" the data into <code>R</code>; to that end there are many options in the form of packages, <a href="https://satijalab.org/seurat/" rel="noreferrer">Seurat</a> is one of the best documented and hence is beginner-friendly.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-13T21:28:34.963Z
Answers.Text: 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?
Answers.UserDisplayName: Diana at Duke
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-13T21:57:02.107Z
Answers.Text: 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.
Answers.UserDisplayName: haci
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-14T13:31:40.277Z
Answers.Text: I will try that then. Thank you again!
Answers.UserDisplayName: Diana at Duke
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-13T21:21:15.620Z
Answers.LastActivityDate: 2020-04-13T21:21:15.620Z
Answers.UserDisplayName: haci
Answers.Body: <p>You might want to check out the <a href="https://bioconductor.org/packages/release/bioc/html/GEOquery.html" rel="nofollow noreferrer">BioConductor <em><code>GEOquery</code></em> package</a>.</p>
  
  <p>Install using </p>
  
  <pre class="lang-r prettyprint-override"><code>if (!requireNamespace("BiocManager", quietly = TRUE))
      install.packages("BiocManager")
  
  BiocManager::install("GEOquery")
  </code></pre>
  
  <p>More information on how to use this package and read in data from GEO can be found in the <a href="https://bioconductor.org/packages/release/bioc/vignettes/GEOquery/inst/doc/GEOquery.html" rel="nofollow noreferrer">vignette</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-17T23:06:50.543Z
Answers.Text: I am sorry but I have to flag this for removal since it's wrong. getGEO only returns expression data for arrays, not for NGS. This package does not apply here.
Answers.UserDisplayName: ATpoint
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-06T19:00:40.243Z
Answers.LastActivityDate: 2020-05-06T19:00:40.243Z
Answers.UserDisplayName: milanmlft
Body: <p>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.</p>
  
  <p>This is the data that I am trying to access <a href="https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE138651" rel="nofollow noreferrer">https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE138651</a></p>
  
  <p>I would appreciate any directions or suggestions for tutorials.</p>
  
  <p>Thanks!</p>
  
Tags: <r><scrnaseq><phylogenetics><geoquery>
Title: How do I pull singe cell RNA sequencing data from GEO database?
ThreadText: # How do I pull singe cell RNA sequencing data from GEO database?
  
  (Asked by: username_0 on 2020-04-13)
  
  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!
  
  **Tags:** r, scrnaseq, phylogenetics, geoquery
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2020-05-07. Score: -1 | Accepted answer
  
  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)
  
  ```
  
  > **Comments:**
  > **username_2**: 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.  
  > **username_3**: I am sorry but I have to flag this for removal since it's wrong. getGEO only returns expression data for arrays, not for NGS. Output of `exprs(expressionSet)` is empty and this is expected.  
  
  ---
  
  ### Answer by username_4 on 2020-04-13. Score: 5
  
  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](https://satijalab.org/seurat/) is one of the best documented and hence is beginner-friendly.
  
  > **Comments:**
  > **username_0**: Thanks username_4. 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?  
  > **username_4**: 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.  
  > **username_0**: I will try that then. Thank you again!  
  
  ---
  
  ### Answer by username_5 on 2020-05-06. Score: -1
  
  You might want to check out the [BioConductor *`GEOquery`* package](https://bioconductor.org/packages/release/bioc/html/GEOquery.html).
  
  Install using
  
  ```r
  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](https://bioconductor.org/packages/release/bioc/vignettes/GEOquery/inst/doc/GEOquery.html)
  
  > **Comments:**
  > **username_3**: I am sorry but I have to flag this for removal since it's wrong. getGEO only returns expression data for arrays, not for NGS. This package does not apply here.  
  
  ---
  
  