build_lassos: Calculate 2D fused-lasso solutionpath for a countmatrix and...

Description Usage Arguments Details Value

View source: R/build_lassos.R

Description

Calculate 2D fused-lasso solutionpath for a countmatrix and save as object This function was adapted with some changes from Martin Fahrenberger's sflST package (https://github.com/Martin-Fahrenberger/sflST)

Usage

1
build_lassos(counts, ids, name, output_folder = NULL, ncores = 4, gamma = 1)

Arguments

counts

input matrix of counts with genes in columns and spot identifier in rows

ids

coordinate table which converts the spot identifier into an x and y coordinate on a grid

name

Name of the experiment

output_folder

folder in which to save the results

ncores

number of parallel processes to start (default 8)

gamma

ratio of penalization between sparsity and continuity (default 1, high = sparse)

Details

This function builds a solution path for each gene (column) in a input matrix, selects the models according to the BIC and builds a count matrix

Value

list containing three elements

  1. counts - count matrix in the same format as input count matrix

  2. ids - barcode data frame that assigns spot identifiers to locations on the grid

  3. lls - numeric vector containing least squares fit of model to raw expression for each gene


tmirus/TTT documentation built on April 17, 2021, 11:04 p.m.