Question: Error in validObject(.Object) : invalid class "CompressedGRangesList" object
0
gravatar for yaozhan88
28 days ago by
yaozhan880
yaozhan880 wrote:

Hi, I am trying to subset the sce object, by selecting specific row names. My code is as follow:

sce = SingleCellExperiment(assays = list(counts = as.matrix(count)), colData = colData, rowData = metaData)
select_name = rownames(sce)[300:400]
sce_select = sce[select_name, ]

The console returned error:

Error in validObject(.Object) : 
  invalid class "CompressedGRangesList" object: 
    'mcols(x)' cannot have columns named "seqnames", "ranges", "strand", "start",
    "end", "width", or "element"

Coule you please help to fix the issue?

Thank you!

software error • 42 views
ADD COMMENTlink written 28 days ago by yaozhan880

Please provide a reproducible example and your sessionInfo().

It looks like somewhere in your sce object there is a CompressedGRangesList object that is considered invalid because it has metadata columns that use "forbidden" names.

This restriction on the metadata column names of GRanges and GRangeList derivatives was introduced a long time ago by one of the original creators of these classes. I never really understood the reason for this restriction and always found it arbitrary. However I've kept it for all these years because it has never caused trouble in practice. But maybe it's time to get rid of it.

H.

ADD REPLYlink written 25 days ago by Hervé Pagès ♦♦ 14k
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 16.09
Traffic: 303 users visited in the last hour