% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Read_Write_Data.R
\name{Read_Velocity}
\alias{Read_Velocity}
\title{Load RNA Velocity results}
\usage{
Read_Velocity(
  loom_file = NULL,
  data_dir = NULL,
  multi_dir = TRUE,
  gene_symbol = TRUE,
  sort_type = FALSE,
  sample_list = NULL,
  sample_names = NULL,
  shared_suffix = NULL,
  parallel = FALSE,
  num_cores = NULL
)
}
\arguments{
\item{loom_file}{path and name of loom file to read}

\item{data_dir}{path to data directory containing all loom files to read}

\item{multi_dir}{logical, whether or not files are contained in sub-directories or in single folder,
default is NULL}

\item{gene_symbol}{logical, should row names of returned matrices have gene symbols or accession ID #s,
default is TRUE (symbols).}

\item{sort_type}{logical, default is FALSE and will return list with 1 sample per entry.  Each
sample entry will contain 3 matrices (spliced, unspliced, ambiguous).  If TRUE will return list of
3 matrix types (spliced, unspliced, ambiguous) with one entry per sample}

\item{sample_list}{A vector of file prefixes/names if specific samples are desired.  Default is \code{NULL} and
will load all samples in given directory.}

\item{sample_names}{a set of sample names to use for each sample entry in returned list.  If \code{NULL}
will set names to the file name of each sample.}

\item{shared_suffix}{a suffix and file extension shared by all samples.}

\item{parallel}{logical (default FALSE).  Whether to use multiple cores when reading in data.
Only possible on Linux based systems.}

\item{num_cores}{if \code{parallel = TRUE} indicates the number of cores to use for multi-core processing.}
}
\value{
list of sparse matrices containing spliced, unspliced, and ambiguous counts
}
\description{
Wrapper function to
}
\examples{
\dontrun{
# Read single velocity loom file
velo_res <- Read_Velocity(loom_file = "PATH/sample01.loom")

# Read single velocity loom file with ensembl IDs
velo_res <- Read_Velocity(loom_file = "PATH/sample01.loom", gene_symbol = FALSE)

# Read multiple files from a parent directory with many subdirectories & return 1 list entry per
sample
# Each entry will contain 3 matrices (spliced, unspliced, ambiguous)
velo_res_list <- Read_Velocity(loom_file = "PATH/", secondary_path = "SEC_PATH/")

# Sort returned list by read type instead of by sample
# list will contain 3 entries (spliced, unspliced, ambiguous)
# each entry will contain 1 matrix per sample
velo_res_list <- Read_Velocity(loom_file = "PATH/", secondary_path = "SEC_PATH/",
sort_type = TRUE)

# Read multiple files from a single directory
velo_res_list <- Read_Velocity(loom_file = "PATH/", multi_dir = FALSE)
}
}
\references{
Function is updated from \code{SeuratWrappers::ReadVelocity}
\url{https://github.com/satijalab/seurat-wrappers/blob/master/R/velocity.R} (License: GPL-3).
Function included in scCustomize to avoid installation issues related to other aspects of
velocyto.R package which \code{SeuratWrappers::ReadVelocity} requires.
scCustomize version also adds multi-file and multi-directory support, ability to return Ensembl IDs,
and multi-core parallel file reading.
}
