% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/loadSEMCollection.R
\name{loadSEMCollection}
\alias{loadSEMCollection}
\title{Load .sem files and meta data into a SNPEffectMatrixCollection}
\usage{
loadSEMCollection(
  semFiles,
  semMetaData = NULL,
  semMetaKey = "",
  semIds = NULL,
  bls = NULL
)
}
\arguments{
\item{semFiles}{A list of paths to .sem files. Expects header of .sem files
to be in format \verb{#BASELINE:\{bl\}} where \code{bl} is the numeric baseline value.
If matrix does not include baseline header, must be specified in \code{bl}.}

\item{semMetaData}{A \code{data.table} with meta data on each SEM}

\item{semMetaKey}{The name of a column in semData that matches the semIds in
the sems list as a \code{character}. If column entries have a .sem suffix, a new
column named SEM_KEY will be created without the .sem suffixes.}

\item{semIds}{Unique id for the sem as a \code{character} vector in same order
as sems. Defaults to semFile file name without the extension.}

\item{bls}{\code{numeric} vector or baseline values for the SEMs.
Overrides baseline specified in semFile header.}
}
\value{
A SNPEffectMatrix object
}
\description{
Load .sem files and meta data into a SNPEffectMatrixCollection
}
\examples{
# write a tmp file to hold a SEM
m <- matrix(rnorm(16), nrow = 4)
colnames(m) <- c("A", "C", "G", "T")
tf <- tempfile()
write.table(m, tf, quote = FALSE, sep = "\t", row.names = FALSE)

# build a meta data table
md <- data.table::data.table(
    transcription_factor = c("tf1"),
    cell_type = c("HepG2"),
    sem_id = c("sem_id")
)

loadSEMCollection(tf,
    semMetaData = md, semIds = "sem_id",
    semMetaKey = "sem_id", bls = 1
)

}
