fused_lasso_complete_fixed_gamma: Building sparse fused lasso models for given genes from their...

Description Usage Arguments Details Value

View source: R/fused_lasso_complete_fixed_gamma.R

Description

Building sparse fused lasso models for given genes from their count data This function was adapted with some changes from Martin Fahrenberger's sflST package (https://github.com/Martin-Fahrenberger/sflST)

Usage

1
2
3
4
5
6
7
fused_lasso_complete_fixed_gamma(
  counts_matrix,
  ids_table,
  name,
  output_folder,
  gamma = 1
)

Arguments

counts_matrix

a matrix with gene expression levels across genes (columns) and associated spots (rows)

ids_table

table associating each rowname of the counts_matrix with an x and y coordinate

name

name of the object to save to

output_folder

folder to save object in

gamma

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

Details

This function will build a sparse fused lasso for each input gene from it's expression vector and the associated spatial coordinates and save the resulting models to an .Rdata object

Value

list containing three elements

  1. counts - matrix containing the fits (Y) for each gene's model

  2. BICs - vector containing the BIC for each model

  3. lls - vector containing the likelihood for each model


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