exp <- exprs(gset[[1]])
时间: 2023-12-24 14:04:50 浏览: 24
这行代码是用来提取一个基因表达数据集(Gene Expression Dataset)中第一个样本的基因表达值(expression values)。假设gset是一个Gene Expression Dataset对象,其中包含多个样本的基因表达值数据。exprs()函数用于提取Gene Expression Dataset对象中的基因表达值矩阵,而[[1]]用于提取矩阵的第一列,即第一个样本的基因表达值。最终,exp将包含第一个样本的基因表达值向量。
相关问题
library(here) source(here::here("code", "libraries.R")) source(here::here("code", "funcs.R")) ## function to intersect multiple vectors intersect_all <- function(a,b,...){ Reduce(intersect, list(a,b,...)) } ## read data tpm.rsem <- read.table(here::here("data", "tpm_original.txt"), sep = "\t") counts.rsem <- read.table(here::here("data", "counts_original.txt"), sep = "\t") qc <- read.table(here::here("data", "qc_original.txt"), sep = "\t", stringsAsFactors = FALSE) # quality control mappings <- readRDS(here::here("data", "mappings.RDS")) # genes info ## scater intialize min_thresh_log_tpm <- 0.1 sceset_all <- SingleCellExperiment(assays = list(counts = as.matrix(counts.rsem), tpm = as.matrix(tpm.rsem), exprs = log2(as.matrix(tpm.rsem) + 1), expressed = log2(tpm.rsem + 1) > min_thresh_log_tpm), colData = qc, rowData = mappings) ## scater quality control找出错误,使之顺利运行
这段代码是用来加载外部库和函数的。首先使用`library(here)`来加载here库。然后使用`source()`函数来加载两个外部文件,都在当前工作目录下的code文件夹中。其中一个文件名为"libraries.R",另一个文件名为"funcs.R",这些文件包含了一些自定义的函数和库。`here::here()`函数用来指定这些文件的路径,使得它们能够被正确地加载。
gse <- getGEO('GSE183899-GPL19057') Error in open.connection(x, "rb") : HTTP error 404.
根据你提供的错误信息,可能是由于指定的GEO数据集或平台ID不正确或不存在。请确保你输入的ID正确,并在ID前加上"GSE"或"GPL"前缀,以指定数据集或平台类型。
在你的情况下,如果要获取GSE183899数据集中GPL19057平台的数据,应该使用以下命令:
```r
gse <- getGEO('GPL19057')
```
这将获取GPL19057平台的信息和表达数据,并将其存储在一个GEO对象中。如果你只想获取该平台的表达数据而不需要其他信息,可以使用GSEMatrix参数:
```r
exprs <- getGEO('GPL19057', GSEMatrix = TRUE)
```
这将只获取GPL19057平台的表达数据,并将其存储为数值矩阵。希望这可以帮助你解决问题。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)