setDR {SoupX}R Documentation

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')])

[Package SoupX version 1.6.2 Index]