微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

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

如何解决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 举报,一经查实,本站将立刻删除。