get_non_zero_coefficients_as_data_frame: Extract the non-zero coefficients from the fit object and...

View source: R/functions.R

get_non_zero_coefficients_as_data_frameR Documentation

Extract the non-zero coefficients from the fit object and return it as a data frame

Description

Extract the coefficients (C) from the fit object where the coefficient has at least one non-zero entry across the response variables. The function also reads the pvar file so that the resulting data frame has the chromosomal position of the genetic variants.

Usage

get_non_zero_coefficients_as_data_frame(
  multiSnpnetResults = NULL,
  fit_obj = NULL,
  genotype_file = NULL,
  withTSVD = FALSE,
  component_prefix = "Component",
  rank = NULL,
  zstdcat_path = "zstdcat"
)

Arguments

multiSnpnetResults

a list containing the results of the multiSnpnet fit

fit_obj

A named list containing the results of the multisnpnet results.

genotype_file

Path to the new suite of genotype files. genotype_file.pvar.zst must exist.

withTSVD

A boolean variable indicating whether to include the SVD loadings on variants

component_prefix

(applicable when withTSVD is TRUE) the prefix of the SVD loadings column

rank

(applicable when withTSVD is TRUE) the rank of SVD

zstdcat_path

Path to zstdcat program, needed when loading variants.


junyangq/multiSnpnet documentation built on Oct. 19, 2023, 8:22 p.m.