sooo
sooo

Reputation: 21

Bioconductor single cell RNA seq error, assayData() function doesn't work, why?

I was following the code from the paper "Bioconductor workflow for single-cell RNA sequencing: Normalization, dimensionality reduction, clustering, and lineage inference". But I Encountered an error with the function assayData() during the pre-precessing step. Here is the link of the paper: https://www.bioconductor.org/help/course-materials/2017/BioC2017/Day2/Workshops/singleCell/doc/workshop.html#introduction

I went through the code as follows:

# Bioconductor
library(BiocParallel)
library(clusterExperiment)
library(scone)
library(zinbwave)

# GitHub
library(slingshot)

# CRAN
library(doParallel)
library(gam)
library(RColorBrewer)

set.seed(20)

##Parallel computing
register(SerialParam())
NCORES <- 2
mysystem = Sys.info()[["sysname"]]
if (mysystem == "Darwin"){
  registerDoParallel(NCORES)
  register(DoparParam())
}else if (mysystem == "Linux"){
  register(bpstart(MulticoreParam(workers=NCORES)))
}else{
  print("Please change this to allow parallel computing on your computer.")
  register(SerialParam())
}

## Pre-processing
data_dir <- "C:/Users/kuosh/Documents/"
if (!dir.exists(data_dir)) system(sprintf('mkdir %s', data_dir))

urls = c("https://www.ncbi.nlm.nih.gov/geo/download/?acc=GSE95601&format=file&file=GSE95601%5FoeHBCdiff%5FCufflinks%5FeSet%2ERda%2Egz",
         "https://raw.githubusercontent.com/rufletch/p63-HBC-diff/master/ref/oeHBCdiff_clusterLabels.txt")

if(!file.exists(paste0(data_dir, "GSE95601_oeHBCdiff_Cufflinks_eSet.Rda"))) {
  if (!dir.exists(data_dir)) system(sprintf('mkdir %s', data_dir))
  download.file(urls[1], paste0(data_dir, "GSE95601_oeHBCdiff_Cufflinks_eSet.Rda.gz"))
  R.utils::gunzip(paste0(data_dir, "GSE95601_oeHBCdiff_Cufflinks_eSet.Rda.gz"))
  assayData(Cufflinks_eSet)$exprs = NULL
  assayData(Cufflinks_eSet)$fpkm_table = NULL
  assayData(Cufflinks_eSet)$tpm_table = NULL
  save(Cufflinks_eSet, file='data/GSE95601_oeHBCdiff_Cufflinks_eSet_reduced.Rda')
}

The file has been successfully downloaded and unzipped, but I encountered an error as : Error in assayData(CufflinkseSet)$exprs = NULL : object 'CufflinkseSet' not found. Anyone can help me? Thank you so much.

Upvotes: 0

Views: 90

Answers (1)

Ali T. A.
Ali T. A.

Reputation: 21

If I understand well, you have stored the data in the object "Cufflinks_eSet". But you are fetching the data from "CufflinkseSet". So this should be a typo as underscore "_" is missing. Please try:

assayData(Cufflinks_eSet)$exprs

instead.

Upvotes: 1

Related Questions