Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

setDR

Manually set dimension reduction for a channel


Description

Manually specify the dimension reduction

Usage

setDR(sc, DR, reductName = NULL)

Arguments

sc

A SoupChannel object.

DR

The dimension reduction coordinates (e.g., tSNE). This must be a data.frame, with two columns giving the two dimension reduction coordinates. The data.frame must either have row names matching the row names of sc$metaData, or be ordered in the same order as sc$metaData.

reductName

What to name the reduction (defaults to column names provided).

Value

A modified SoupChannel object for which the dimension reduction has been set.

Examples

sc = load10X(system.file('extdata','toyData',package='SoupX'))
mDat = read.table(system.file('extdata','toyData','metaData.tsv',package='SoupX'),sep='\t')
sc = setDR(sc,mDat[,c('tSNE_1','tSNE_2')])

SoupX

Single Cell mRNA Soup eXterminator

v1.5.2
GPL-2
Authors
Matthew Daniel Young
Initial release
2021-05-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.