SingleCellExperiment convenience function for metadata+expression?
1
0
Entering edit mode
@300a71cc
Last seen 2 days ago
Australia

Hi,

Just wondering if there is a convenience function somewhere in the SCE/SFE/SPE/SE object that allows for pulling out feilds from metadata + expression + reduced dimension coordinates all in one command? ie. For when I want to plot a custom umap with gene expression split by sample group, but with more control than the plot_UMAP function typically allows.

Essentially the direct bioconductor equivalent of Seurat's FetchData() (I wasted ages doing that with custom functions before I realised that was inbuilt!)

I know how to build such a table myself, but since its a common pattern I'm wondering if there's a shortcut?

I imagine it would look like this?

get_table_of_data(sce,
     from_metadata=c('timepoint','individual','cluster'),
    from_reddim=list(UMAP='UMAP_1', 'UMAP_2'), 
    from_assay=list(counts=c('CD63','Hba1'))
)

I couldn't see anything in the reference docs, but I'm not sure I'm looking in the right place! Thanks.

SpatialExperiment SingleCellExperiment SpatialFeatureExperiment • 178 views
ADD COMMENT
1
Entering edit mode
Peter Hickey ▴ 750
@petehaitch
Last seen 9 days ago
WEHI, Melbourne, Australia

Hi Sarah,

scuttle::makePerCellDF() / scuttle::makePerFeatureDF() and scater::ggcells() / scater::ggfeatures(), which build upon the former, will give you what I think you want for SE and SCE. scuttle/scater were designed for single-cell rather than spatial data, but quick testing shows that they may be able to give you the non-spatial components of an _SPE_ and _SFE_. Perhaps you can use these as a starting point or some of the SPE and SPF authors can chime in: dario.righelli, helucro, davide risso, Lukas Weber, lambda

Cheers, Pete

ADD COMMENT

Login before adding your answer.

Traffic: 636 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6