corexprsgse,use =“ c”错误:没有完整的元素对

问题描述

我正在尝试绘制“ GSE133399”的热图,我使用GEOquery包检索了GSE,然后分配给了一个对象,然后试图绘制热图,但是我没有成功,我使用了以下代码在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")

我收到此错误

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

我也尝试过:

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

我收到此错误

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

我想实现这个情节:

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)