Skip to contents

This function constructs a design matrix from a `data.table` where each row represents a SNP, each column represents a tissue-gene pair, and the values are z-scores. If a tissue-gene pair does not have a z-score for a SNP, the corresponding entry will be `NA`.

Usage

make_design_matrix(df)

Arguments

df

A `data.table` with three columns: `SNP`, `Variable` (representing tissue-gene pairs), and `Zscore`.

Value

A matrix where rows correspond to SNPs, columns correspond to tissue-gene pairs, and values are z-scores. Missing values (`NA`) indicate that the tissue-gene pair does not have a z-score for that SNP.