0
$\begingroup$

I'm trying to plot a heat map for a "GSE133399", I retrieved the GSE using GEOquery package and then assigned to an object and then tried to plot a heatmap, but I was not successful, I used the following code in RStudio:

install.packages("BiocManager")
BiocManager::install("GEOquery")
library(GEOquery)
## change my_id to be the dataset that you want.
my_id <- "GSE133399"
gse <- getGEO(my_id)
length(gse)
gse <- gse[[1]]
gse
pData(gse) ## print the sample information
fData(gse) ## print the gene annotation
exprs(gse) ## print the expression data

## exprs get the expression levels as a data frame and get the distribution
summary(exprs(gse))
exprs(gse) <- log2(exprs(gse))
boxplot(exprs(gse),outline=FALSE)
library(dplyr)
sampleInfo <- pData(gse)
sampleInfo
## source_name_ch1 and characteristics_ch1.1 seem to contain factors we might need for the analysis. Let's pick just those columns

sampleInfo <- select(sampleInfo, source_name_ch1,characteristics_ch1.1)

## Optionally, rename to more convenient column names
sampleInfo <- rename(sampleInfo,group = source_name_ch1, patient=characteristics_ch1.1)
sampleInfo
install.packages("pheatmap")
library(pheatmap)
## argument use="c" stops an error if there are any missing data points

corMatrix <- cor(exprs(gse),use="c")

I get this error:

Error in cor(exprs(gse), use = "c") : no complete element pairs

I also tried this:

corMatrix <- cor(exprs(gse),use="c", use="complete.obs")

I get this error:

Error in cor(exprs(gse), use = "c", use = "complete.obs") : 
  formal argument "use" matched by multiple actual arguments

I want to achieve this plot:

enter image description here

$\endgroup$
2
$\begingroup$

The GSE133399 dataset contains both ATAC-seq and RNA-seq data, none of which can be queried with GEOquery which works only for microarray data.

exprs(gse) ## print the expression data returns an empty object as you might have noticed, therefore the errors in the lines that follow this command.

On the bottom of https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE133399 at the Supplementary file section you can download FPKM-transformed count data and use these. I would be careful though as FPKM is not ideal for inter-sample comparison. I personally always (if feasable) download the raw data and then process myself, but for a guess on what is going on the FPKMs probably will do.

$\endgroup$
6
  • $\begingroup$ How do you process the data of GSE in this case? I looked for questions that have the same kind of data, but I couldn’t find any, what do you recommend @ATpoint ? $\endgroup$ – user432797 Oct 18 '20 at 15:28
  • 1
    $\begingroup$ You cannot use GSE data here. It is for microarray as I said above. Download raw data (fastq, this is NGS not array), and then align them. If you are new to this then simply use the FPKM that are provided. $\endgroup$ – ATpoint Oct 18 '20 at 16:15
  • 1
    $\begingroup$ On the bottom of the GEO page, you see the "Relations" category, which points to NCBI BioProject PRJNA551397. There, under "project data", you see "SRA experiments". Click on the number 28, which takes you to the sequence read archive page for the samples. Now click on Send to run selector $\endgroup$ – Bastian Schiffthaler Oct 18 '20 at 19:42
  • 1
    $\begingroup$ The recommended way to download these runs from the SRA is to use the SRA toolkit, specifically the program fasterq-dump from it. See here for the How-to. Basically, just run fasterq-dump <RUN ACCESSION>. E.g.: fasterq-dump SRR9606476 for the first run of you experiment. Download the SRA toolkit here $\endgroup$ – Bastian Schiffthaler Oct 18 '20 at 19:45
  • 1
    $\begingroup$ @user432797 You typically download the fastq files either from NCBI or ENA. Check sra-explorer.info which can search and provide download links for datasets. I also wrote a (today a bit deprecated given sra-explorer exists) tutorial that might be interesting, see biostars.org/p/325010 It is not recommended imho to directly download files via fasterq-dump, that is often unstable in my experience. The tutorial covers recommended approaches, or simply use the download links from-sra.explorer.info to get fastq right away (my preferred approach). $\endgroup$ – ATpoint Oct 18 '20 at 20:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.