import10xFeatureMatrix.Rd
This function will import the feature matrix from a 10x feature hdf5 file.
import10xFeatureMatrix(
input = NULL,
names = NULL,
strictMatch = TRUE,
verbose = TRUE,
featureType = "Gene Expression",
features = NULL,
genesToExclude = NULL,
force = FALSE
)
A character of paths to 10x feature hdf5 file(s). These will traditionally have a suffix similar to "filtered_feature_bc_matrix.h5".
A character of sample names associated with each input file.
Only relevant when multiple input files are used. A boolean that indictes whether rows (genes) that do not match perfectly in the matrices
should be removed (strictMatch = TRUE
) or coerced (strictMatch = FALSE
). Cell Ranger seems to occassionally use different ensembl ids for the same gene across
different samples. If you are comfortable tolerating such mismatches, you can coerce all matrices to fit together, in which case the gene metadata present in
the first listed sample will be applied to all matrices for that particular gene entry. Sometimes, the h5 files from Cell Ranger have mismatches in the actual gene names.
See the force
paramter for handling mismatched gene names.
Only relevant when multiple input files are used. A boolean that indicates whether messaging about mismatches should be verbose (TRUE
) or minimal (FALSE
)
The name of the feature to extract from the 10x feature file. See https://support.10xgenomics.com/single-cell-gene-expression/software/pipelines/latest/advanced/h5_matrices for more information.
A genomic ranges object containing a "name" column to help fill missing 10x intervals for RSE. With the default CellRanger output, mitochondrial
genes are not given genomic ranges. If you wish to recover these transcripts, for example for QC-based filtering, you must provide ranges for these genes. The same
applies for any genes in the provided h5
files that are missing ranges. As an example, in hg38 you could use Bioconductors
features = genes(EnsDb.Hsapiens.v86::EnsDb.Hsapiens.v86)
. Note that you must load the corresponding Bioconductor package to have access to the genes
function.
A character vector of gene names to be excluded from the returned SummarizedExperiment
object. This can be useful when dealing with very large
datasets because R has an upper limit for how large a given object can be. If you have >1.5 million cells, you cannot create a matrix in R with all ~30,000 genes so you
can use this parameter to remove genes upfront.