Open AnnaAMonaco opened 1 year ago
I can only assume that you haven't run aggregateAcrossCells
for a while, because that behavior hasn't changed within the current release. Or for many previous releases, actually.
Anyway, the likely problem is that aggregateAcrossCells
is attempting to apply the same aggregation to the alternative Experiment ratio
, which I assume only has the counts
assay. So:
use.altexps=FALSE
, in which case they are ignored. This will be the default behavior as of the next release to avoid exactly this type of error.aggregateAcrossCells
on altExp(sce, "ratio")
and then assign the output into altExp(BLAH, "ratio")
where BLAH
is the return value of your first aggregateAcrossCells
call. I just tried running with use.altexps=FALSE
as you recommend here, but I still only get "counts" as an assay for the aggregated object
> applySCE(sce, aggregateAcrossCells, ids=colData(sce)$subclusters, use.altexps=FALSE)
class: SingleCellExperiment
dim: 9984 89
metadata(0):
assays(1): counts
rownames(9984): pHCl-1 CG9706 ... Nup93-1 CG17841
rowData names(0):
colnames(89): Amnioserosa Cardiac Primordium.1 ... Visceral Muscle.7
Yolk Nuclei
colData names(21): orig.ident nCount_RNA ... ids ncells
reducedDimNames(2): PCA UMAP
mainExpName: RNA
altExpNames(1): ratio
Warning messages:
1: 'use.altexps=' is deprecated.
Use 'applySCE(x, aggregateAcrossCells)' instead.
2: 'use.altexps=' is deprecated.
Use 'applySCE(x, aggregateAcrossCells)' instead.
I'm trying to get an aggregation with three of the assays: counts, logcounts, and mel_counts
> sce
class: SingleCellExperiment
dim: 9984 9466
metadata(0):
assays(5): counts logcounts scaledata ratio mel_counts
rownames(9984): pHCl-1 CG9706 ... Nup93-1 CG17841
rowData names(0):
colnames(9466): CATCCACTCGTCAACA GGATCTAGTCGCTCGA ... ATCACAGGTTCAGGTT
TGCTTGCTCAGCACCG
colData names(19): orig.ident nCount_RNA ... cell_type subclusters
reducedDimNames(2): PCA UMAP
mainExpName: RNA
altExpNames(1): ratio
To be clear, you need to set both use.altexps=FALSE
and use.assay.type=
to your desired assays. The default behavior of aggregateAcrosCells
is to only operate on the counts. I believe this has been the case for the past few releases.
Hi,
I have been using the scuttle package functions quite some time now to analyse my scRNA-seq data (10x, aligned with salmon alevin), and at this point have a pretty streamlined code for what I need to do. In this specific case I am trying to make a new sce from subclustering my original sce, carrying over three specific assays to the new object.
Today all of a sudden my code for
AggregateAcrossCells()
-- which I have been using over and over again without modifications -- doesn't work anymore:I assumed there has been some update to the package, but now I cannot get the new sce that I need, which will contain all three above assays: counts, logcounts, and mel_counts. I tried looking into
applySCE()
and running it, but I can only get it to work for "counts".I appended logcounts and mel_counts as alternative experiments, because that seems to be what the function now works with, but it still won't work.
I have currently resorted to just adding the altExps as assays after aggregating, but I would like to know if there is a more straightforward way of doing this.
Thank you in advance for your reply, and thank you for the super useful package in general :)