read_sparse_matrix {ChromSCape} | R Documentation

## Read in one or multiple sparse matrices (10X format)

### Description

Given one or multiple directories, look in each directory for a combination of the following files :

- A 'features' file containing unique feature genomic locations -in tab separated format ( *_features.bed / .txt / .tsv / .gz), e.g. chr, start and end

- A 'barcodes' file containing unique barcode names ( _barcode.txt / .tsv / .gz)

- A 'matrix' A file containing indexes of non zero entries (_matrix.mtx / .gz)

### Usage

    read_sparse_matrix(files_dir_list, ref = c("hg38", "mm10")[1], verbose = TRUE)

### Arguments

`files_dir_list` | A named character vector containing the full path towards folders. Each folder should contain only the Feature file, the Barcode file and the Matrix file (see description).
`ref` | Reference genome (used to filter non-canonical chromosomes).
`verbose` | Print ?

### Value

Returns a list containing a datamatrix and cell annotation

### Examples

    ## Not run:
    sample_dirs = c("/path/to/folder1/", "/path/to/folder2/")
    names(sample_dirs) = c("sample_1", "sample_2")
    out <- read_sparse_matrix(sample_dirs, ref = "hg38")
    head(out$datamatrix)
    head(out$annot_raw)

    ## End(Not run)

[Package ChromSCape version 1.2.62 Index]