Title: | eds: Low-level reader for Alevin EDS format |
---|---|
Description: | This packages provides a single function, readEDS. This is a low-level utility for reading in Alevin EDS format into R. This function is not designed for end-users but instead the package is predominantly for simplifying package dependency graph for other Bioconductor packages. |
Authors: | Avi Srivastava [aut, cre], Michael Love [aut, ctb] |
Maintainer: | Avi Srivastava <[email protected]> |
License: | GPL-2 |
Version: | 1.9.0 |
Built: | 2024-11-29 05:54:23 UTC |
Source: | https://github.com/bioc/eds |
This provides a simple utility for reading in EDS format. Note that most users will prefer to use tximport or tximeta. This function and package exist in order to simplify the dependency graph for other packages.
readEDS(numOfGenes, numOfOriginalCells, countMatFilename, tierImport = FALSE)
readEDS(numOfGenes, numOfOriginalCells, countMatFilename, tierImport = FALSE)
numOfGenes |
number of genes |
numOfOriginalCells |
number of cells |
countMatFilename |
pointer to the EDS file,
|
tierImport |
whether the |
a genes x cells sparse matrix,
of the class dgCMatrix
# point to files dir0 <- system.file("extdata",package="tximportData") samps <- list.files(file.path(dir0, "alevin")) dir <- file.path(dir0,"alevin",samps[3],"alevin") quant.mat.file <- file.path(dir, "quants_mat.gz") barcode.file <- file.path(dir, "quants_mat_rows.txt") gene.file <- file.path(dir, "quants_mat_cols.txt") # readEDS() requires knowing the number of cells and genes cell.names <- readLines(barcode.file) gene.names <- readLines(gene.file) num.cells <- length(cell.names) num.genes <- length(gene.names) # reading in the sparse matrix mat <- readEDS(numOfGenes=num.genes, numOfOriginalCells=num.cells, countMatFilename=quant.mat.file)
# point to files dir0 <- system.file("extdata",package="tximportData") samps <- list.files(file.path(dir0, "alevin")) dir <- file.path(dir0,"alevin",samps[3],"alevin") quant.mat.file <- file.path(dir, "quants_mat.gz") barcode.file <- file.path(dir, "quants_mat_rows.txt") gene.file <- file.path(dir, "quants_mat_cols.txt") # readEDS() requires knowing the number of cells and genes cell.names <- readLines(barcode.file) gene.names <- readLines(gene.file) num.cells <- length(cell.names) num.genes <- length(gene.names) # reading in the sparse matrix mat <- readEDS(numOfGenes=num.genes, numOfOriginalCells=num.cells, countMatFilename=quant.mat.file)