<p>I'm trying to plot a heat map for a &quot;GSE133399&quot;, 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:</p>
<pre><code>install.packages(&quot;BiocManager&quot;)
BiocManager::install(&quot;GEOquery&quot;)
library(GEOquery)
## change my_id to be the dataset that you want.
my_id &lt;- &quot;GSE133399&quot;
gse &lt;- getGEO(my_id)
length(gse)
gse &lt;- 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) &lt;- log2(exprs(gse))
boxplot(exprs(gse),outline=FALSE)
library(dplyr)
sampleInfo &lt;- 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 &lt;- select(sampleInfo, source_name_ch1,characteristics_ch1.1)

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

corMatrix &lt;- cor(exprs(gse),use=&quot;c&quot;)
</code></pre>
<p>I get this error:</p>
<pre><code>Error in cor(exprs(gse), use = &quot;c&quot;) : no complete element pairs
</code></pre>
<p>I also  tried this:</p>
<pre><code>corMatrix &lt;- cor(exprs(gse),use=&quot;c&quot;, use=&quot;complete.obs&quot;)
</code></pre>
<p>I get this error:</p>
<pre><code>Error in cor(exprs(gse), use = &quot;c&quot;, use = &quot;complete.obs&quot;) : 
  formal argument &quot;use&quot; matched by multiple actual arguments
</code></pre>
<p>I want to achieve this plot:</p>
<p><a href="https://i.sstatic.net/Dk2eV.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Dk2eV.png" alt="enter image description here" /></a></p>

<r><rna-seq>
Error in cor(exprs(gse), use = "c") : no complete element pairs
# Error in cor(exprs(gse), use = "c") : no complete element pairs

(Asked by: username_0 on 2020-10-18)

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:

**Tags:** r, rna-seq

---

## 0 answers

