Take a file and load it into a Seurat
object. Supports
a variety of file types and always returns a Seurat
object
LoadFileInput(path, bridge = FALSE)
Path to input data
A Seurat
object
LoadFileInput
supports several file types to be read in as
Seurat
objects. File type is determined by extension, matched in a
case-insensitive manner See sections below for details about supported
filtypes, required extension, and specifics for how data is loaded
h5
)10X HDF5 files are supported for all versions of Cell Ranger; data is read
in using Read10X_h5
. Note: for multi-modal
10X HDF5 files, only the first matrix is read in
rds
)Rds files are supported as long as they contain one of the following data types:
A Seurat
V3 object
An S4 Matrix
object
An S3 matrix
object
A data.frame
object
For S4 Matrix
, S3 matrix
, and data.frame
objects, a
Seurat
object will be made with
CreateSeuratObject
using the default arguments
h5seurat
)h5Seurat files and all of their features are fully supported. They are read
in via LoadH5Seurat
. Note: only the
“counts” matrices are read in and only the default assay is kept
h5ad
)Only H5AD files from AnnData v0.7 or higher are supported. Data is read from the H5AD file in the following manner
The counts matrix is read from “/raw/X”; if “/raw/X” is not present, the matrix is read from “/X”
Feature names are read from feature-level metadata. Feature level
metadata must be an HDF5 group, HDF5 compound datasets are not
supported. If counts are read from /raw/X
, features names are looked
for in “/raw/var”; if counts are read from “/X”, features
names are looked for in “/var”. In both cases, feature names are read
from the dataset specified by the “_index” attribute, “_index”
dataset, or “index” dataset, in that order
Cell names are read from cell-level metadata. Cell-level metadata must be an HDF5 group, HDF5 compound datasets are not supported. Cell-level metadata is read from “/obs”. Cell names are read from the dataset specified by the “_index” attribute, “_index” dataset, or “index” dataset, in that order
Cell-level metadata is read from the “/obs” dataset. Columns will be returned in the same order as in the “column-order”, if present, or in alphabetical order. If a dataset named “__categories” is present, then all datasets in “__categories” will serve as factor levels for datasets present in “/obs” with the same name (eg. a dataset named “/obs/__categories/leiden” will serve as the levels for “/obs/leiden”). Row names will be set as cell names as described above. All datasets in “/obs” will be loaded except for “__categories” and the cell names dataset