Question: zinbwave is not generating observational weights (zinbwave_1.8.0)
1
gravatar for bpgrone
3 months ago by
bpgrone10
bpgrone10 wrote:

I have a problem in which I am trying to use the zinbwave R package for differential expression analysis from snRNAseq data, but I cannot get the necessary observational weights.

I am using: R version 3.6.1 zinbwave_1.8.0

I created a SummarizedExperiment object by using data and metadata from a Seurat object:

se <- SummarizedExperiment(seurat@assays$RNA@counts,
                                       colData = seurat@meta.data)

After filtering the se_object by gene counts, I use the 'zinbwave' command to generate a SingleCellObject

singlecell <- zinbwave(se, K=2, X="~genotype", epsilon=1000)

The SingleCellExperiment object ('singlecell') is generated, but after creating the object there is no "weights" data in the object.

Trying to access weights data:

weights <- assay(singlecell, "weights")

results in this error message:

Error in assay(singlecell, "weights") : 
  'assay(<SingleCellExperiment>, i="character", ...)' invalid subscript 'i'
'weights' not in names(assays(<SingleCellExperiment>))

In the documentation, it says that "Since version 1.1.5, zinbwave computes the observational weights by default." However, I also tried specifying "observationalWeights = TRUE" and this did not appear to lead to any weights being generated, either.

Why are the weights not generated by the zinbwave function? Could it be because of a problem with how I set up the SummarizedExperiment? Or is it more likely related to the way I have used the zinbwave command?

rna-seq bioconductor R zinbwave • 150 views
ADD COMMENTlink modified 3 months ago • written 3 months ago by bpgrone10

Output of assayNames(singlecell)?

ADD REPLYlink written 3 months ago by ATpoint30k

Hi, thanks for your question.

The output of 'assayNames(singlecell)' is: NULL

The output of 'singlecell@assays' is: An object of class "SimpleAssays" Slot "data": List of length 1

ADD REPLYlink written 3 months ago by bpgrone10
0
gravatar for bpgrone
3 months ago by
bpgrone10
bpgrone10 wrote:

Hi, thanks for your question.

The output of 'assayNames(singlecell)' is: NULL

The output of 'singlecell@assays' is: An object of class "SimpleAssays" Slot "data": List of length 1

ADD COMMENTlink written 3 months ago by bpgrone10
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1082 users visited in the last hour